12dc7c57fSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
22dc7c57fSopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
32dc7c57fSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
42dc7c57fSopenharmony_ci     you may not use this file except in compliance with the License.
52dc7c57fSopenharmony_ci     You may obtain a copy of the License at
62dc7c57fSopenharmony_ci
72dc7c57fSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
82dc7c57fSopenharmony_ci
92dc7c57fSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
102dc7c57fSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
112dc7c57fSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122dc7c57fSopenharmony_ci     See the License for the specific language governing permissions and
132dc7c57fSopenharmony_ci     limitations under the License.
142dc7c57fSopenharmony_ci
152dc7c57fSopenharmony_ci-->
162dc7c57fSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
172dc7c57fSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
182dc7c57fSopenharmony_cilicensefile:
192dc7c57fSopenharmony_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.
202dc7c57fSopenharmony_ci
212dc7c57fSopenharmony_citasklist(only for batch mode):
222dc7c57fSopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
232dc7c57fSopenharmony_ci2. task name: Only an name, no practical effect.
242dc7c57fSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
252dc7c57fSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
262dc7c57fSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
272dc7c57fSopenharmony_ci
282dc7c57fSopenharmony_ci
292dc7c57fSopenharmony_cipolicyList:
302dc7c57fSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
312dc7c57fSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
322dc7c57fSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
332dc7c57fSopenharmony_ci3. policyitem type:
342dc7c57fSopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
352dc7c57fSopenharmony_ci    "license" is used to check source license header in the specified path;
362dc7c57fSopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
372dc7c57fSopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
382dc7c57fSopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
392dc7c57fSopenharmony_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
402dc7c57fSopenharmony_ci
412dc7c57fSopenharmony_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.
422dc7c57fSopenharmony_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.
432dc7c57fSopenharmony_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.
442dc7c57fSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
452dc7c57fSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
462dc7c57fSopenharmony_ci
472dc7c57fSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
482dc7c57fSopenharmony_ci" == &gt;
492dc7c57fSopenharmony_ci& == &gt;
502dc7c57fSopenharmony_ci' == &gt;
512dc7c57fSopenharmony_ci< == &gt;
522dc7c57fSopenharmony_ci> == &gt;
532dc7c57fSopenharmony_ci-->
542dc7c57fSopenharmony_ci<configuration>
552dc7c57fSopenharmony_ci    <oatconfig>
562dc7c57fSopenharmony_ci        <licensefile></licensefile>
572dc7c57fSopenharmony_ci        <policylist>
582dc7c57fSopenharmony_ci            <policy name="projectPolicy" desc="">
592dc7c57fSopenharmony_ci            </policy>
602dc7c57fSopenharmony_ci        </policylist>
612dc7c57fSopenharmony_ci        <filefilterlist>
622dc7c57fSopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
632dc7c57fSopenharmony_ci                <filteritem type="filename" name="*.hap|*.rpk" desc="valid and invalid bundle files for tests"/>
642dc7c57fSopenharmony_ci            </filefilter>
652dc7c57fSopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
662dc7c57fSopenharmony_ci                <filteritem type="filepath" name="figures/cesfwk_architecture_diagram.png" desc="self developed image"/>
672dc7c57fSopenharmony_ci            </filefilter>
682dc7c57fSopenharmony_ci        </filefilterlist>
692dc7c57fSopenharmony_ci    </oatconfig>
702dc7c57fSopenharmony_ci</configuration>
71