1195972f6Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
2195972f6Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
3195972f6Sopenharmony_ci
4195972f6Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
5195972f6Sopenharmony_ci     you may not use this file except in compliance with the License.
6195972f6Sopenharmony_ci     You may obtain a copy of the License at
7195972f6Sopenharmony_ci
8195972f6Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
9195972f6Sopenharmony_ci
10195972f6Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
11195972f6Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
12195972f6Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13195972f6Sopenharmony_ci     See the License for the specific language governing permissions and
14195972f6Sopenharmony_ci     limitations under the License.
15195972f6Sopenharmony_ci
16195972f6Sopenharmony_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.
17195972f6Sopenharmony_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.
18195972f6Sopenharmony_ci
19195972f6Sopenharmony_ci    licensefile:
20195972f6Sopenharmony_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.
21195972f6Sopenharmony_ci
22195972f6Sopenharmony_ci    policylist:
23195972f6Sopenharmony_ci    1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
24195972f6Sopenharmony_ci    2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
25195972f6Sopenharmony_ci    <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
26195972f6Sopenharmony_ci    3. policyitem type:
27195972f6Sopenharmony_ci        "compatibility" is used to check license compatibility in the specified path;
28195972f6Sopenharmony_ci        "license" is used to check source license header in the specified path;
29195972f6Sopenharmony_ci        "copyright" is used to check source copyright header in the specified path;
30195972f6Sopenharmony_ci        "import" is used to check source dependency in the specified path, such as import ... ,include ...
31195972f6Sopenharmony_ci        "filetype" is used to check file type in the specified path, supported file types: archive, binary
32195972f6Sopenharmony_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
33195972f6Sopenharmony_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.
34195972f6Sopenharmony_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.
35195972f6Sopenharmony_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.
36195972f6Sopenharmony_ci    7. policyitem filefilter: Used to bind filefilter which define filter rules.
37195972f6Sopenharmony_ci    7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
38195972f6Sopenharmony_ci    8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
39195972f6Sopenharmony_ci
40195972f6Sopenharmony_ci    Note:If the text contains special characters, please escape them according to the following rules:
41195972f6Sopenharmony_ci    " == &gt;
42195972f6Sopenharmony_ci    & == &gt;
43195972f6Sopenharmony_ci    ' == &gt;
44195972f6Sopenharmony_ci    < == &gt;
45195972f6Sopenharmony_ci    > == &gt;
46195972f6Sopenharmony_ci-->
47195972f6Sopenharmony_ci
48195972f6Sopenharmony_ci<configuration>
49195972f6Sopenharmony_ci    <oatconfig>
50195972f6Sopenharmony_ci        <licensefile>COPYING</licensefile>
51195972f6Sopenharmony_ci        <licensematcherlist>
52195972f6Sopenharmony_ci            <licensematcher name="BSD 3-Clause license" desc="如果工具扫描是InvalidLicense,可在此定义匹配规则,注意引号要转义">
53195972f6Sopenharmony_ci                <licensetext name='Redistribution and use in source' desc=""/>
54195972f6Sopenharmony_ci            </licensematcher>
55195972f6Sopenharmony_ci            <licensematcher name="BSD 3-Clause license" desc="如果工具扫描是InvalidLicense,可在此定义匹配规则,注意引号要转义">
56195972f6Sopenharmony_ci                <licensetext name='Non-exclusive rights to redistribute' desc=""/>
57195972f6Sopenharmony_ci            </licensematcher>
58195972f6Sopenharmony_ci            <licensematcher name="BSD 3-Clause license" desc="如果工具扫描是InvalidLicense,可在此定义匹配规则,注意引号要转义">
59195972f6Sopenharmony_ci                <licensetext name='Permission to use, copy, modify' desc=""/>
60195972f6Sopenharmony_ci            </licensematcher>
61195972f6Sopenharmony_ci        </licensematcherlist>
62195972f6Sopenharmony_ci        <policylist>
63195972f6Sopenharmony_ci            <policy name="defaultPolicy" desc="use lwip by independent process">
64195972f6Sopenharmony_ci                <policyitem type="compatibility" name="BSD 3-Clause license" path="src/include/netif/ppp/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="ppp相关功能不使用"/>
65195972f6Sopenharmony_ci                <policyitem type="compatibility" name="BSD 3-Clause license" path="src/netif/ppp/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="ppp相关功能不使用"/>
66195972f6Sopenharmony_ci            </policy>
67195972f6Sopenharmony_ci        </policylist>
68195972f6Sopenharmony_ci        <filefilterlist>
69195972f6Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
70195972f6Sopenharmony_ci                <filteritem type="filename" name="lwip-2.1.3.tar.xz"/>
71195972f6Sopenharmony_ci            </filefilter>
72195972f6Sopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
73195972f6Sopenharmony_ci                <filteritem type="filename" name="*Doxyfile*" desc="doxy file, not license statement."/>
74195972f6Sopenharmony_ci                <filteritem type="filepath" name="lwip.spec" desc="上游更新记录说明"/>
75195972f6Sopenharmony_ci            </filefilter>
76195972f6Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">^M
77195972f6Sopenharmony_ci                <!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->^M
78195972f6Sopenharmony_ci                <filteritem type="filepath" name="test/.*" desc="官方自带文件"/>^M
79195972f6Sopenharmony_ci                <filteritem type="filepath" name="src/apps/http/fs/img/.*" desc="官方自带文件"/>^M
80195972f6Sopenharmony_ci                <!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->^M
81195972f6Sopenharmony_ci            </filefilter>
82195972f6Sopenharmony_ci        </filefilterlist>
83195972f6Sopenharmony_ci    </oatconfig>
84195972f6Sopenharmony_ci</configuration>
85