1ba991379Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 2ba991379Sopenharmony_ci<!-- Copyright (c) 2023 Huawei Device Co., Ltd. 3ba991379Sopenharmony_ci 4ba991379Sopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 5ba991379Sopenharmony_ci you may not use this file except in compliance with the License. 6ba991379Sopenharmony_ci You may obtain a copy of the License at 7ba991379Sopenharmony_ci 8ba991379Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 9ba991379Sopenharmony_ci 10ba991379Sopenharmony_ci Unless required by applicable law or agreed to in writing, software 11ba991379Sopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 12ba991379Sopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13ba991379Sopenharmony_ci See the License for the specific language governing permissions and 14ba991379Sopenharmony_ci limitations under the License. 15ba991379Sopenharmony_ci 16ba991379Sopenharmony_ci Notes: 17ba991379Sopenharmony_ci This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun. 18ba991379Sopenharmony_ci--> 19ba991379Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide: 20ba991379Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location. 21ba991379Sopenharmony_cilicensefile: 22ba991379Sopenharmony_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. 23ba991379Sopenharmony_ci 24ba991379Sopenharmony_citasklist(only for batch mode): 25ba991379Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread. 26ba991379Sopenharmony_ci2. task name: Only an name, no practical effect. 27ba991379Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist. 28ba991379Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist. 29ba991379Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project. 30ba991379Sopenharmony_ci 31ba991379Sopenharmony_ci 32ba991379Sopenharmony_cipolicyList: 33ba991379Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process. 34ba991379Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 35ba991379Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 36ba991379Sopenharmony_ci3. policyitem type: 37ba991379Sopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 38ba991379Sopenharmony_ci "license" is used to check source license header in the specified path; 39ba991379Sopenharmony_ci "copyright" is used to check source copyright header in the specified path; 40ba991379Sopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 41ba991379Sopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 42ba991379Sopenharmony_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 43ba991379Sopenharmony_ci 44ba991379Sopenharmony_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. 45ba991379Sopenharmony_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. 46ba991379Sopenharmony_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. 47ba991379Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules. 48ba991379Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 49ba991379Sopenharmony_ci 50ba991379Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules: 51ba991379Sopenharmony_ci" == > 52ba991379Sopenharmony_ci& == > 53ba991379Sopenharmony_ci' == > 54ba991379Sopenharmony_ci< == > 55ba991379Sopenharmony_ci> == > 56ba991379Sopenharmony_ci--> 57ba991379Sopenharmony_ci<configuration> 58ba991379Sopenharmony_ci <oatconfig> 59ba991379Sopenharmony_ci <licensefile></licensefile> 60ba991379Sopenharmony_ci <policylist> 61ba991379Sopenharmony_ci <policy name="projectPolicy" desc=""> 62ba991379Sopenharmony_ci </policy> 63ba991379Sopenharmony_ci </policylist> 64ba991379Sopenharmony_ci <filefilterlist> 65ba991379Sopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 66ba991379Sopenharmony_ci <filteritem type="filename" name="*.png|*.jpeg|*.json" desc="Test files"/> 67ba991379Sopenharmony_ci <filteritem type="filename" name="*.bin|*.exe|ReadMe|oeminfo_nvm_test" desc="There are the upgrade tool files"/> 68ba991379Sopenharmony_ci <filteritem type="filepath" name="DeployDevice/.*" desc="There are the smoketest tool files"/> 69ba991379Sopenharmony_ci <filteritem type="filepath" name="tools/.*" desc="There are tools files"/> 70ba991379Sopenharmony_ci <filteritem type="filepath" name="cases/.*" desc="There are smoketest case"/> 71ba991379Sopenharmony_ci </filefilter> 72ba991379Sopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility, license header policies"> 73ba991379Sopenharmony_ci <filteritem type="filename" name="*.png|*.jpeg|*.json|*.hap|*.csv|dhcpc.sh" desc="NoLicenseHeader"/> 74ba991379Sopenharmony_ci <filteritem type="filename" name="*.bin|*.exe|ReadMe|oeminfo_nvm_test" desc="There are the upgrade tool files"/> 75ba991379Sopenharmony_ci <filteritem type="filename" name="go.mod" desc="no need to check"/> 76ba991379Sopenharmony_ci <filteritem type="filename" name="go.sum" desc="no need to check"/> 77ba991379Sopenharmony_ci </filefilter> 78ba991379Sopenharmony_ci <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies"> 79ba991379Sopenharmony_ci <filteritem type="filename" name="*.png|*.jpeg|*.json|*.hap|*.csv|dhcpc.sh" desc="InvalidCopyright file"/> 80ba991379Sopenharmony_ci <filteritem type="filename" name="*.bin|*.exe|ReadMe|oeminfo_nvm_test" desc="There are the upgrade tool files"/> 81ba991379Sopenharmony_ci <filteritem type="filename" name="go.mod" desc="no need to check"/> 82ba991379Sopenharmony_ci <filteritem type="filename" name="go.sum" desc="no need to check"/> 83ba991379Sopenharmony_ci </filefilter> 84ba991379Sopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 85ba991379Sopenharmony_ci <filteritem type="filename" name="*.png|*.jpeg|*.json|*.hap|busybox" desc="already checked"/> 86ba991379Sopenharmony_ci <filteritem type="filename" name="*.bin|*.exe|ReadMe|oeminfo_nvm_test" desc="There are the upgrade tool files"/> 87ba991379Sopenharmony_ci </filefilter> 88ba991379Sopenharmony_ci </filefilterlist> 89ba991379Sopenharmony_ci </oatconfig> 90ba991379Sopenharmony_ci</configuration> 91