19ce3a3fcSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 29ce3a3fcSopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 39ce3a3fcSopenharmony_ci 49ce3a3fcSopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 59ce3a3fcSopenharmony_ci you may not use this file except in compliance with the License. 69ce3a3fcSopenharmony_ci You may obtain a copy of the License at 79ce3a3fcSopenharmony_ci 89ce3a3fcSopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 99ce3a3fcSopenharmony_ci 109ce3a3fcSopenharmony_ci Unless required by applicable law or agreed to in writing, software 119ce3a3fcSopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 129ce3a3fcSopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 139ce3a3fcSopenharmony_ci See the License for the specific language governing permissions and 149ce3a3fcSopenharmony_ci limitations under the License. 159ce3a3fcSopenharmony_ci 169ce3a3fcSopenharmony_ci Notes: 179ce3a3fcSopenharmony_ci This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun. 189ce3a3fcSopenharmony_ci--> 199ce3a3fcSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide: 209ce3a3fcSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location. 219ce3a3fcSopenharmony_cilicensefile: 229ce3a3fcSopenharmony_ci1.If the project don't have "LICENSE" in root dir, please define all the license files in this project in , OAT will check license files according to this rule. 239ce3a3fcSopenharmony_ci 249ce3a3fcSopenharmony_citasklist(only for batch mode): 259ce3a3fcSopenharmony_ci1. task: Define oat check thread, each task will start a new thread. 269ce3a3fcSopenharmony_ci2. task name: Only an name, no practical effect. 279ce3a3fcSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist. 289ce3a3fcSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist. 299ce3a3fcSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project. 309ce3a3fcSopenharmony_ci 319ce3a3fcSopenharmony_ci 329ce3a3fcSopenharmony_cipolicyList: 339ce3a3fcSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process. 349ce3a3fcSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 359ce3a3fcSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 369ce3a3fcSopenharmony_ci3. policyitem type: 379ce3a3fcSopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 389ce3a3fcSopenharmony_ci "license" is used to check source license header in the specified path; 399ce3a3fcSopenharmony_ci "copyright" is used to check source copyright header in the specified path; 409ce3a3fcSopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 419ce3a3fcSopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 429ce3a3fcSopenharmony_ci "filename" is used to check whether the specified file exists in the specified path(support projectroot in default OAT.xml), supported file names: LICENSE, README, README.OpenSource 439ce3a3fcSopenharmony_ci 449ce3a3fcSopenharmony_ci4. policyitem name: This field is used for define the license, copyright, "*" means match all, the "!" prefix means could not match this value. For example, "!GPL" means can not use GPL license. 459ce3a3fcSopenharmony_ci5. policyitem path: This field is used for define the source file scope to apply this policyitem, the "!" prefix means exclude the files. For example, "!.*/lib/.*" means files in lib dir will be exclude while process this policyitem. 469ce3a3fcSopenharmony_ci6. policyitem rule and group: These two fields are used together to merge policy results. "may" policyitems in the same group means any one in this group passed, the result will be passed. 479ce3a3fcSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules. 489ce3a3fcSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 499ce3a3fcSopenharmony_ci 509ce3a3fcSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules: 519ce3a3fcSopenharmony_ci" == > 529ce3a3fcSopenharmony_ci& == > 539ce3a3fcSopenharmony_ci' == > 549ce3a3fcSopenharmony_ci< == > 559ce3a3fcSopenharmony_ci> == > 569ce3a3fcSopenharmony_ci--> 579ce3a3fcSopenharmony_ci<configuration> 589ce3a3fcSopenharmony_ci <oatconfig> 599ce3a3fcSopenharmony_ci <licensefile></licensefile> 609ce3a3fcSopenharmony_ci <policylist></policylist> 619ce3a3fcSopenharmony_ci <filefilterlist> 629ce3a3fcSopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 639ce3a3fcSopenharmony_ci <filteritem type="filepath" name="tests/.*" desc="test files"/> 649ce3a3fcSopenharmony_ci <filteritem type="filepath" name="doc/.*" desc="doc files"/> 659ce3a3fcSopenharmony_ci </filefilter> 669ce3a3fcSopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility, license header policies"> 679ce3a3fcSopenharmony_ci <filteritem type="filepath" name="scripts/.*.js" desc="no license header"/> 689ce3a3fcSopenharmony_ci <filteritem type="filepath" name="scripts/build/.*.js" desc="no license header"/> 699ce3a3fcSopenharmony_ci <filteritem type="filepath" name="Gulpfile.js" desc="no license header"/> 709ce3a3fcSopenharmony_ci <filteritem type="filepath" name=".dockerignore" desc="no license header"/> 719ce3a3fcSopenharmony_ci <filteritem type="filepath" name=".mailmap" desc="no license header"/> 729ce3a3fcSopenharmony_ci <filteritem type="filepath" name=".npmignore" desc="no license header"/> 739ce3a3fcSopenharmony_ci <filteritem type="filepath" name=".yarnrc" desc="no license header"/> 749ce3a3fcSopenharmony_ci <filteritem type="filepath" name="scripts/VSDevMode.ps1" desc="no license header"/> 759ce3a3fcSopenharmony_ci <filteritem type="filepath" name="Dockerfile" desc="no license header"/> 769ce3a3fcSopenharmony_ci <filteritem type="filepath" name="bin/tsc" desc="no license header"/> 779ce3a3fcSopenharmony_ci <filteritem type="filepath" name="bin/tsserver" desc="no license header"/> 789ce3a3fcSopenharmony_ci <filteritem type="filepath" name="scripts/hooks/post-checkout" desc="no license header"/> 799ce3a3fcSopenharmony_ci </filefilter> 809ce3a3fcSopenharmony_ci <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies"> 819ce3a3fcSopenharmony_ci <filteritem type="filepath" name="scripts/.*.js" desc="Describe the reason for filtering scan results"/> 829ce3a3fcSopenharmony_ci <filteritem type="filepath" name="scripts/build/.*.js" desc="Describe the reason for filtering scan results"/> 839ce3a3fcSopenharmony_ci <filteritem type="filepath" name=".dockerignore" desc="Describe the reason for filtering scan results"/> 849ce3a3fcSopenharmony_ci <filteritem type="filepath" name=".mailmap" desc="Describe the reason for filtering scan results"/> 859ce3a3fcSopenharmony_ci <filteritem type="filepath" name=".npmignore" desc="Describe the reason for filtering scan results"/> 869ce3a3fcSopenharmony_ci <filteritem type="filepath" name=".yarnrc" desc="Describe the reason for filtering scan results"/> 879ce3a3fcSopenharmony_ci <filteritem type="filepath" name="scripts/VSDevMode.ps1" desc="Describe the reason for filtering scan results"/> 889ce3a3fcSopenharmony_ci <filteritem type="filepath" name="Dockerfile" desc="Describe the reason for filtering scan results"/> 899ce3a3fcSopenharmony_ci <filteritem type="filepath" name="bin/tsc" desc="Describe the reason for filtering scan results"/> 909ce3a3fcSopenharmony_ci <filteritem type="filepath" name="bin/tsserver" desc="Describe the reason for filtering scan results"/> 919ce3a3fcSopenharmony_ci <filteritem type="filepath" name="scripts/hooks/post-checkout" desc="Describe the reason for filtering scan results"/> 929ce3a3fcSopenharmony_ci </filefilter> 939ce3a3fcSopenharmony_ci <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies"> 949ce3a3fcSopenharmony_ci </filefilter> 959ce3a3fcSopenharmony_ci <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies"> 969ce3a3fcSopenharmony_ci </filefilter> 979ce3a3fcSopenharmony_ci <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies"> 989ce3a3fcSopenharmony_ci </filefilter> 999ce3a3fcSopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 1009ce3a3fcSopenharmony_ci <filteritem type="filepath" name="build_package/.*" desc="binary file"/> 1019ce3a3fcSopenharmony_ci </filefilter> 1029ce3a3fcSopenharmony_ci </filefilterlist> 1039ce3a3fcSopenharmony_ci </oatconfig> 1049ce3a3fcSopenharmony_ci</configuration>