1570af302Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 2570af302Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 3570af302Sopenharmony_ci 4570af302Sopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 5570af302Sopenharmony_ci you may not use this file except in compliance with the License. 6570af302Sopenharmony_ci You may obtain a copy of the License at 7570af302Sopenharmony_ci 8570af302Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 9570af302Sopenharmony_ci 10570af302Sopenharmony_ci Unless required by applicable law or agreed to in writing, software 11570af302Sopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 12570af302Sopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13570af302Sopenharmony_ci See the License for the specific language governing permissions and 14570af302Sopenharmony_ci limitations under the License. 15570af302Sopenharmony_ci 16570af302Sopenharmony_ci This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README. 17570af302Sopenharmony_ci All configurations in this file will be merged to OAT-Default.xml, if you have any questions or concerns, please create issue in OpenHarmony/tools_oat and @jalenchen or chenyaxun. 18570af302Sopenharmony_ci 19570af302Sopenharmony_ci licensefile: 20570af302Sopenharmony_ci 1.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. 21570af302Sopenharmony_ci 22570af302Sopenharmony_ci policylist: 23570af302Sopenharmony_ci 1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here. 24570af302Sopenharmony_ci 2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 25570af302Sopenharmony_ci <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 26570af302Sopenharmony_ci 3. policyitem type: 27570af302Sopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 28570af302Sopenharmony_ci "license" is used to check source license header in the specified path; 29570af302Sopenharmony_ci "copyright" is used to check source copyright header in the specified path; 30570af302Sopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 31570af302Sopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 32570af302Sopenharmony_ci "filename" is used to check whether the specified file exists in the specified path(projectroot means the root dir of the project), supported file names: LICENSE, README, README.OpenSource 33570af302Sopenharmony_ci 4. 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. 34570af302Sopenharmony_ci 5. 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. 35570af302Sopenharmony_ci 6. 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. 36570af302Sopenharmony_ci 7. policyitem filefilter: Used to bind filefilter which define filter rules. 37570af302Sopenharmony_ci 7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code. 38570af302Sopenharmony_ci 8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 39570af302Sopenharmony_ci 40570af302Sopenharmony_ci Note:If the text contains special characters, please escape them according to the following rules: 41570af302Sopenharmony_ci " == " 42570af302Sopenharmony_ci & == & 43570af302Sopenharmony_ci ' == ' 44570af302Sopenharmony_ci < == < 45570af302Sopenharmony_ci > == > 46570af302Sopenharmony_ci--> 47570af302Sopenharmony_ci 48570af302Sopenharmony_ci<configuration> 49570af302Sopenharmony_ci <oatconfig> 50570af302Sopenharmony_ci <licensefile>COPYRIGHT</licensefile> 51570af302Sopenharmony_ci <policylist> 52570af302Sopenharmony_ci <policy name="projectPolicy" desc=""> 53570af302Sopenharmony_ci <!--policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="Process that runs independently, invoked by the X process."/--> 54570af302Sopenharmony_ci <!--policyitem type="license" name="LGPL" path=".*" desc="Dynamically linked by module X"/--> 55570af302Sopenharmony_ci <!--policyitem type="copyright" name="xxx" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by X Company"/--> 56570af302Sopenharmony_ci </policy> 57570af302Sopenharmony_ci </policylist> 58570af302Sopenharmony_ci 59570af302Sopenharmony_ci <filefilterlist> 60570af302Sopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 61570af302Sopenharmony_ci <filteritem type="filename" name="*.iml|*.json|*.txt" desc="desc files"/> 62570af302Sopenharmony_ci <filteritem type="filepath" name="target/.*" desc="Compile output files"/> 63570af302Sopenharmony_ci <filteritem type="filepath" name="out/.*" desc="Compile output files"/> 64570af302Sopenharmony_ci <filteritem type="filepath" name="log/.*" desc="log files"/> 65570af302Sopenharmony_ci <filteritem type="filepath" name=".idea/.*" desc="IDE temp files"/> 66570af302Sopenharmony_ci <filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/> 67570af302Sopenharmony_ci <filteritem type="filepath" name="src/test/.*" desc="Test files"/> 68570af302Sopenharmony_ci </filefilter> 69570af302Sopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies"> 70570af302Sopenharmony_ci <filteritem type="filepath" name="porting/liteos_a/kernel/src/math/.*" desc="No License specified while permission to use, copy, modify, and distribute are granted"/> 71570af302Sopenharmony_ci <filteritem type="filepath" name="porting/liteos_m/kernel/src/math/.*" desc="No License specified while permission to use, copy, modify, and distribute are granted"/> 72570af302Sopenharmony_ci <filteritem type="filepath" name="src/complex/.*" desc="No License specified while permission to use, copy, modify, and distribute are granted"/> 73570af302Sopenharmony_ci <filteritem type="filepath" name="src/crypt/crypt_blowfish.c" desc="No License specified while permission to use, copy, modify, and distribute are granted"/> 74570af302Sopenharmony_ci <filteritem type="filepath" name="src/math/.*" desc="No License specified while permission to use, copy, modify, and distribute are granted"/> 75570af302Sopenharmony_ci <filteritem type="filepath" name="src/string/arm/memcpy_le.S" desc="No License specified while requirements for receving permission to use, copy, modify, and distribute are satisfied"/> 76570af302Sopenharmony_ci <filteritem type="filepath" name="libc-test/src/math/crlibm/.*" desc="GPLV2协议,测试代码,进程独立,不会造成GPL协议污染"/> 77570af302Sopenharmony_ci <filteritem type="filepath" name="libc-test/src/math/ucb/.*" desc="GPLV2协议,测试代码,进程独立,不会造成GPL协议污染"/> 78570af302Sopenharmony_ci <filteritem type="filepath" name="libc-test/COPYRIGHT" desc="License本身"/> 79570af302Sopenharmony_ci </filefilter> 80570af302Sopenharmony_ci <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies"> 81570af302Sopenharmony_ci </filefilter> 82570af302Sopenharmony_ci <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies"> 83570af302Sopenharmony_ci </filefilter> 84570af302Sopenharmony_ci <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies"> 85570af302Sopenharmony_ci </filefilter> 86570af302Sopenharmony_ci <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies"> 87570af302Sopenharmony_ci </filefilter> 88570af302Sopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 89570af302Sopenharmony_ci </filefilter> 90570af302Sopenharmony_ci </filefilterlist> 91570af302Sopenharmony_ci </oatconfig> 92570af302Sopenharmony_ci</configuration> 93