169570cc8Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
269570cc8Sopenharmony_ci<!-- Copyright (c) 2021-2022 Huawei Device Co., Ltd.
369570cc8Sopenharmony_ci
469570cc8Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
569570cc8Sopenharmony_ci     you may not use this file except in compliance with the License.
669570cc8Sopenharmony_ci     You may obtain a copy of the License at
769570cc8Sopenharmony_ci
869570cc8Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
969570cc8Sopenharmony_ci
1069570cc8Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
1169570cc8Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
1269570cc8Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1369570cc8Sopenharmony_ci     See the License for the specific language governing permissions and
1469570cc8Sopenharmony_ci     limitations under the License.
1569570cc8Sopenharmony_ci
1669570cc8Sopenharmony_ci-->
1769570cc8Sopenharmony_ci<!-- OSS Audit Tool (OAT) configuration guide:
1869570cc8Sopenharmony_cibasedir: Root dir. basedir + project path is the real source file location.
1969570cc8Sopenharmony_cilicensefile:
2069570cc8Sopenharmony_ciIf the project doesn't have "LICENSE" in root dir, please define all the license files in this project. OAT will check license files according to this rule.
2169570cc8Sopenharmony_ci
2269570cc8Sopenharmony_citasklist (for the batch mode only):
2369570cc8Sopenharmony_ci1. task: OAT check thread. Each task will start a new thread.
2469570cc8Sopenharmony_ci2. task name: Task name.
2569570cc8Sopenharmony_ci3. task policy: Default policy for projects under this task. This field is required and the specified policy must be defined in policylist.
2669570cc8Sopenharmony_ci4. task filter: Default filefilter for projects under this task. This field is required and the specified filefilter must be defined in filefilterlist.
2769570cc8Sopenharmony_ci5. task project: Projects to be checked. The path field defines the source root dir of the project.
2869570cc8Sopenharmony_ci
2969570cc8Sopenharmony_ci
3069570cc8Sopenharmony_cipolicyList:
3169570cc8Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules. The name of policy doesn't affect the OAT check process.
3269570cc8Sopenharmony_ci2. policyitem: The fields type, name, path, desc are required, and the fields rule, group, filefilter are optional. The default value is:
3369570cc8Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
3469570cc8Sopenharmony_ci3. policyitem type:
3569570cc8Sopenharmony_ci    "compatibility" is used to check license compatibility in the specified path.
3669570cc8Sopenharmony_ci    "license" is used to check source license header in the specified path.
3769570cc8Sopenharmony_ci    "copyright" is used to check source copyright header in the specified path.
3869570cc8Sopenharmony_ci    "import" is used to check source dependency in the specified path, such as import and include.
3969570cc8Sopenharmony_ci    "filetype" is used to check file type in the specified path. Supported file types include archive and binary.
4069570cc8Sopenharmony_ci    "filename" is used to check whether the specified file exists in the specified path (support projectroot in the default OAT.xml). Supported file names include LICENSE, README, README.OpenSource.
4169570cc8Sopenharmony_ci
4269570cc8Sopenharmony_ci4. policyitem name: This field is used to define the license, copyright, "*" means match all, the "!" prefix means could not match this value. For example, "!GPL" means can not use GPL license.
4369570cc8Sopenharmony_ci5. policyitem path: This field is used to 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.
4469570cc8Sopenharmony_ci6. policyitem rule and group: These two fields are used together to merge policy results. "may" means that the result will be passed if any policyitem in the same group is passed.
4569570cc8Sopenharmony_ci7. policyitem filefilter: This field is used to bind filefilter which define filter rules.
4669570cc8Sopenharmony_ci8. filefilter: This field is used to define filter rules. filename is used to filter file name, and filepath is used to filter file path.
4769570cc8Sopenharmony_ci
4869570cc8Sopenharmony_ciNote: If the text contains special characters, please escape them according to the following rules:
4969570cc8Sopenharmony_ci" == &gt;
5069570cc8Sopenharmony_ci& == &gt;
5169570cc8Sopenharmony_ci' == &gt;
5269570cc8Sopenharmony_ci< == &gt;
5369570cc8Sopenharmony_ci> == &gt;
5469570cc8Sopenharmony_ci-->
5569570cc8Sopenharmony_ci<configuration>
5669570cc8Sopenharmony_ci    <oatconfig>
5769570cc8Sopenharmony_ci        <licensefile></licensefile>
5869570cc8Sopenharmony_ci        <policylist>
5969570cc8Sopenharmony_ci            <policy name="projectPolicy" desc="">
6069570cc8Sopenharmony_ci            </policy>
6169570cc8Sopenharmony_ci        </policylist>
6269570cc8Sopenharmony_ci        <filefilterlist>
6369570cc8Sopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
6469570cc8Sopenharmony_ci                <filteritem type="filename" name="*.hap|*.rpk" desc="valid and invalid bundle files for tests"/>
6569570cc8Sopenharmony_ci	    </filefilter>
6669570cc8Sopenharmony_ci	    <filefilter name="copyrightPolicyFilter" desc="Files not to compatibility, license header policies">
6769570cc8Sopenharmony_ci                <filteritem type="filename" name="asan.options" desc="file type not support comment"/>
6869570cc8Sopenharmony_ci	    </filefilter>
6969570cc8Sopenharmony_ci	    <filefilter name="defaultPolicyFilter" desc="Files not to compatibility, license header policies">
7069570cc8Sopenharmony_ci                <filteritem type="filename" name="asan.options" desc="file type not support comment"/>
7169570cc8Sopenharmony_ci            </filefilter>
7269570cc8Sopenharmony_ci        <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
7369570cc8Sopenharmony_ci            <filteritem type="filename" name="*.jpg|*.png|*.gif|*.pdf" desc="already checked"/>
7469570cc8Sopenharmony_ci        </filefilter>
7569570cc8Sopenharmony_ci        </filefilterlist>
7669570cc8Sopenharmony_ci    </oatconfig>
7769570cc8Sopenharmony_ci</configuration>
78