1800b99b8Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
2800b99b8Sopenharmony_ci<!-- Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3800b99b8Sopenharmony_ci
4800b99b8Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
5800b99b8Sopenharmony_ci     you may not use this file except in compliance with the License.
6800b99b8Sopenharmony_ci     You may obtain a copy of the License at
7800b99b8Sopenharmony_ci
8800b99b8Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
9800b99b8Sopenharmony_ci
10800b99b8Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
11800b99b8Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
12800b99b8Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13800b99b8Sopenharmony_ci     See the License for the specific language governing permissions and
14800b99b8Sopenharmony_ci     limitations under the License.
15800b99b8Sopenharmony_ci
16800b99b8Sopenharmony_ci     Notes:
17800b99b8Sopenharmony_ci     This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun.
18800b99b8Sopenharmony_ci-->
19800b99b8Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
20800b99b8Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
21800b99b8Sopenharmony_cilicensefile:
22800b99b8Sopenharmony_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.
23800b99b8Sopenharmony_ci
24800b99b8Sopenharmony_citasklist(only for batch mode):
25800b99b8Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
26800b99b8Sopenharmony_ci2. task name: Only an name, no practical effect.
27800b99b8Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
28800b99b8Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
29800b99b8Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
30800b99b8Sopenharmony_ci
31800b99b8Sopenharmony_ci
32800b99b8Sopenharmony_cipolicyList:
33800b99b8Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
34800b99b8Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
35800b99b8Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
36800b99b8Sopenharmony_ci3. policyitem type:
37800b99b8Sopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
38800b99b8Sopenharmony_ci    "license" is used to check source license header in the specified path;
39800b99b8Sopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
40800b99b8Sopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
41800b99b8Sopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
42800b99b8Sopenharmony_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
43800b99b8Sopenharmony_ci
44800b99b8Sopenharmony_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.
45800b99b8Sopenharmony_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.
46800b99b8Sopenharmony_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.
47800b99b8Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
48800b99b8Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
49800b99b8Sopenharmony_ci
50800b99b8Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
51800b99b8Sopenharmony_ci" == &gt;
52800b99b8Sopenharmony_ci& == &gt;
53800b99b8Sopenharmony_ci' == &gt;
54800b99b8Sopenharmony_ci< == &gt;
55800b99b8Sopenharmony_ci> == &gt;
56800b99b8Sopenharmony_ci-->
57800b99b8Sopenharmony_ci<configuration>
58800b99b8Sopenharmony_ci    <oatconfig>
59800b99b8Sopenharmony_ci        <licensefile></licensefile>
60800b99b8Sopenharmony_ci        <policylist>
61800b99b8Sopenharmony_ci            <policy name="projectPolicy" desc="">
62800b99b8Sopenharmony_ci                <policyitem type="copyright" name="Institute of Software, Chinese Academy of Sciences." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/>
63800b99b8Sopenharmony_ci            </policy>
64800b99b8Sopenharmony_ci        </policylist>
65800b99b8Sopenharmony_ci        <filefilterlist>
66800b99b8Sopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
67800b99b8Sopenharmony_ci            </filefilter>
68800b99b8Sopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility, license header policies">
69800b99b8Sopenharmony_ci                <filteritem type="filename" name="ehdr_from_readelf_32" desc="test resource file, no license header"/>
70800b99b8Sopenharmony_ci                <filteritem type="filename" name="ehdr_from_readelf_64" desc="test resource file, no license header"/>
71800b99b8Sopenharmony_ci                <filteritem type="filename" name="phdrs_from_readelf_32" desc="test resource file, no license header"/>
72800b99b8Sopenharmony_ci                <filteritem type="filename" name="phdrs_from_readelf_64" desc="test resource file, no license header"/>
73800b99b8Sopenharmony_ci                <filteritem type="filename" name="shdrs_from_readelf_32" desc="test resource file, no license header"/>
74800b99b8Sopenharmony_ci                <filteritem type="filename" name="shdrs_from_readelf_64" desc="test resource file, no license header"/>
75800b99b8Sopenharmony_ci                <filteritem type="filename" name="syms_from_readelf_32" desc="test resource file, no license header"/>
76800b99b8Sopenharmony_ci                <filteritem type="filename" name="syms_from_readelf_64" desc="test resource file, no license header"/>
77800b99b8Sopenharmony_ci                <filteritem type="filename" name="testmaps_32" desc="test resource file, no license header"/>
78800b99b8Sopenharmony_ci                <filteritem type="filename" name="testmaps_64" desc="test resource file, no license header"/>
79800b99b8Sopenharmony_ci                <filteritem type="filename" name="dwarf_test_aarch64_elf_result" desc="test resource file, no license header"/>
80800b99b8Sopenharmony_ci            </filefilter>
81800b99b8Sopenharmony_ci            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
82800b99b8Sopenharmony_ci                <filteritem type="filename" name="ehdr_from_readelf_32" desc="test resource file, no copyright header"/>
83800b99b8Sopenharmony_ci                <filteritem type="filename" name="ehdr_from_readelf_64" desc="test resource file, no copyright header"/>
84800b99b8Sopenharmony_ci                <filteritem type="filename" name="phdrs_from_readelf_32" desc="test resource file, no copyright header"/>
85800b99b8Sopenharmony_ci                <filteritem type="filename" name="phdrs_from_readelf_64" desc="test resource file, no copyright header"/>
86800b99b8Sopenharmony_ci                <filteritem type="filename" name="shdrs_from_readelf_32" desc="test resource file, no copyright header"/>
87800b99b8Sopenharmony_ci                <filteritem type="filename" name="shdrs_from_readelf_64" desc="test resource file, no copyright header"/>
88800b99b8Sopenharmony_ci                <filteritem type="filename" name="syms_from_readelf_32" desc="test resource file, no copyright header"/>
89800b99b8Sopenharmony_ci                <filteritem type="filename" name="syms_from_readelf_64" desc="test resource file, no copyright header"/>
90800b99b8Sopenharmony_ci                <filteritem type="filename" name="testmaps_32" desc="test resource file, no copyright header"/>
91800b99b8Sopenharmony_ci                <filteritem type="filename" name="testmaps_64" desc="test resource file, no copyright header"/>
92800b99b8Sopenharmony_ci                <filteritem type="filename" name="dwarf_test_aarch64_elf_result" desc="test resource file, no copyright header"/>
93800b99b8Sopenharmony_ci            </filefilter>
94800b99b8Sopenharmony_ci            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
95800b99b8Sopenharmony_ci            </filefilter>
96800b99b8Sopenharmony_ci            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
97800b99b8Sopenharmony_ci            </filefilter>
98800b99b8Sopenharmony_ci            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
99800b99b8Sopenharmony_ci            </filefilter>
100800b99b8Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
101800b99b8Sopenharmony_ci                <filteritem type="filepath" name="figures/.*" desc="self developed pictures used in readme documents"/>
102800b99b8Sopenharmony_ci                <filteritem type="filename" name="dwarf_test_aarch64_elf" desc="the binary file for test, the file is self-developed"/>
103800b99b8Sopenharmony_ci                <filteritem type="filename" name="elf32_test" desc="the binary file for test, the file is self-developed"/>
104800b99b8Sopenharmony_ci                <filteritem type="filename" name="elf_test" desc="the binary file for test, the file is self-developed"/>
105800b99b8Sopenharmony_ci            </filefilter>
106800b99b8Sopenharmony_ci        </filefilterlist>
107800b99b8Sopenharmony_ci        <licensematcherlist>
108800b99b8Sopenharmony_ci        </licensematcherlist>
109800b99b8Sopenharmony_ci    </oatconfig>
110800b99b8Sopenharmony_ci</configuration>
111