10a7ce71fSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 20a7ce71fSopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 30a7ce71fSopenharmony_ci 40a7ce71fSopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 50a7ce71fSopenharmony_ci you may not use this file except in compliance with the License. 60a7ce71fSopenharmony_ci You may obtain a copy of the License at 70a7ce71fSopenharmony_ci 80a7ce71fSopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 90a7ce71fSopenharmony_ci 100a7ce71fSopenharmony_ci Unless required by applicable law or agreed to in writing, software 110a7ce71fSopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 120a7ce71fSopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130a7ce71fSopenharmony_ci See the License for the specific language governing permissions and 140a7ce71fSopenharmony_ci limitations under the License. 150a7ce71fSopenharmony_ci 160a7ce71fSopenharmony_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. 170a7ce71fSopenharmony_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. 180a7ce71fSopenharmony_ci 190a7ce71fSopenharmony_ci licensefile: 200a7ce71fSopenharmony_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. 210a7ce71fSopenharmony_ci 220a7ce71fSopenharmony_ci policylist: 230a7ce71fSopenharmony_ci 1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here. 240a7ce71fSopenharmony_ci 2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 250a7ce71fSopenharmony_ci <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 260a7ce71fSopenharmony_ci 3. policyitem type: 270a7ce71fSopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 280a7ce71fSopenharmony_ci "license" is used to check source license header in the specified path; 290a7ce71fSopenharmony_ci "copyright" is used to check source copyright header in the specified path; 300a7ce71fSopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 310a7ce71fSopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 320a7ce71fSopenharmony_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 330a7ce71fSopenharmony_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. 340a7ce71fSopenharmony_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. 350a7ce71fSopenharmony_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. 360a7ce71fSopenharmony_ci 7. policyitem filefilter: Used to bind filefilter which define filter rules. 370a7ce71fSopenharmony_ci 7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code. 380a7ce71fSopenharmony_ci 8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 390a7ce71fSopenharmony_ci 400a7ce71fSopenharmony_ci Note:If the text contains special characters, please escape them according to the following rules: 410a7ce71fSopenharmony_ci " == " 420a7ce71fSopenharmony_ci & == & 430a7ce71fSopenharmony_ci ' == ' 440a7ce71fSopenharmony_ci < == < 450a7ce71fSopenharmony_ci > == > 460a7ce71fSopenharmony_ci--> 470a7ce71fSopenharmony_ci 480a7ce71fSopenharmony_ci<configuration> 490a7ce71fSopenharmony_ci <oatconfig> 500a7ce71fSopenharmony_ci <licensefile></licensefile> 510a7ce71fSopenharmony_ci <policylist> 520a7ce71fSopenharmony_ci <policy name="projectPolicy" desc=""> 530a7ce71fSopenharmony_ci <!--policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="Process that runs independently, invoked by the X process."/--> 540a7ce71fSopenharmony_ci <!--policyitem type="license" name="LGPL" path=".*" desc="Dynamically linked by module X"/--> 550a7ce71fSopenharmony_ci <policyitem type="copyright" name="Huawei Technologies Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="华为技术有限公司版权声明"/> 560a7ce71fSopenharmony_ci <policyitem type="copyright" name="Huawei Device Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="华为终端有限公司版权声明"/> 570a7ce71fSopenharmony_ci <policyitem type="copyright" name="Hisilicon (Shanghai) Technologies Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="小海思开发代码"/> 580a7ce71fSopenharmony_ci <policyitem type="copyright" name="Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED." path=".*" desc="HiSilicon copyright"/> 590a7ce71fSopenharmony_ci <policyitem type="copyright" name="Copyright (C) 2022 HiHope Open Source Organization" path=".*" desc="HiHope copyright"/> 600a7ce71fSopenharmony_ci </policy> 610a7ce71fSopenharmony_ci </policylist> 620a7ce71fSopenharmony_ci 630a7ce71fSopenharmony_ci <filefilterlist> 640a7ce71fSopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 650a7ce71fSopenharmony_ci <filteritem type="filename" name="*.iml|*.json|*.txt" desc="desc files"/> 660a7ce71fSopenharmony_ci <filteritem type="filepath" name="target/.*" desc="Compile output files"/> 670a7ce71fSopenharmony_ci <filteritem type="filepath" name="out/.*" desc="Compile output files"/> 680a7ce71fSopenharmony_ci <filteritem type="filepath" name="log/.*" desc="log files"/> 690a7ce71fSopenharmony_ci <filteritem type="filepath" name=".idea/.*" desc="IDE temp files"/> 700a7ce71fSopenharmony_ci <filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/> 710a7ce71fSopenharmony_ci <filteritem type="filepath" name="src/test/.*" desc="Test files"/> 720a7ce71fSopenharmony_ci </filefilter> 730a7ce71fSopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies"> 740a7ce71fSopenharmony_ci <filteritem type="filename" name="BUILD.gn" desc="Compilation scripts do not declare license"/> 750a7ce71fSopenharmony_ci <filteritem type="filename" name="fstab" desc="This type configuration file can not declare license"/> 760a7ce71fSopenharmony_ci </filefilter> 770a7ce71fSopenharmony_ci <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies"> 780a7ce71fSopenharmony_ci <filteritem type="filename" name="fstab" desc="This type configuration file can not declare copyright"/> 790a7ce71fSopenharmony_ci </filefilter> 800a7ce71fSopenharmony_ci <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies"> 810a7ce71fSopenharmony_ci </filefilter> 820a7ce71fSopenharmony_ci <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies"> 830a7ce71fSopenharmony_ci </filefilter> 840a7ce71fSopenharmony_ci <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies"> 850a7ce71fSopenharmony_ci </filefilter> 860a7ce71fSopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 870a7ce71fSopenharmony_ci <filteritem type="filename" name="*.a|*.so|*.bin|*.png" desc="Temp files"/> 880a7ce71fSopenharmony_ci <filteritem type="filename" name="*.img|*.gif" desc="prebuilt boot images"/> 890a7ce71fSopenharmony_ci </filefilter> 900a7ce71fSopenharmony_ci </filefilterlist> 910a7ce71fSopenharmony_ci </oatconfig> 920a7ce71fSopenharmony_ci</configuration> 93