19b19030aSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
29b19030aSopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
39b19030aSopenharmony_ci
49b19030aSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
59b19030aSopenharmony_ci     you may not use this file except in compliance with the License.
69b19030aSopenharmony_ci     You may obtain a copy of the License at
79b19030aSopenharmony_ci
89b19030aSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
99b19030aSopenharmony_ci
109b19030aSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
119b19030aSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
129b19030aSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
139b19030aSopenharmony_ci     See the License for the specific language governing permissions and
149b19030aSopenharmony_ci     limitations under the License.
159b19030aSopenharmony_ci-->
169b19030aSopenharmony_ci<!--
179b19030aSopenharmony_ci	 Notes:
189b19030aSopenharmony_ci	 This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun.
199b19030aSopenharmony_ci-->
209b19030aSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
219b19030aSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
229b19030aSopenharmony_cilicensefile:
239b19030aSopenharmony_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.
249b19030aSopenharmony_ci
259b19030aSopenharmony_citasklist(only for batch mode):
269b19030aSopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
279b19030aSopenharmony_ci2. task name: Only an name, no practical effect.
289b19030aSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
299b19030aSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
309b19030aSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
319b19030aSopenharmony_ci
329b19030aSopenharmony_ci
339b19030aSopenharmony_cipolicyList:
349b19030aSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
359b19030aSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
369b19030aSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
379b19030aSopenharmony_ci3. policyitem type:
389b19030aSopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
399b19030aSopenharmony_ci    "license" is used to check source license header in the specified path;
409b19030aSopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
419b19030aSopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
429b19030aSopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
439b19030aSopenharmony_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
449b19030aSopenharmony_ci
459b19030aSopenharmony_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. 
469b19030aSopenharmony_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.
479b19030aSopenharmony_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.
489b19030aSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
499b19030aSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
509b19030aSopenharmony_ci
519b19030aSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
529b19030aSopenharmony_ci" == &gt;
539b19030aSopenharmony_ci& == &gt;
549b19030aSopenharmony_ci' == &gt;
559b19030aSopenharmony_ci< == &gt;
569b19030aSopenharmony_ci> == &gt;
579b19030aSopenharmony_ci-->
589b19030aSopenharmony_ci<configuration>
599b19030aSopenharmony_ci    <oatconfig>
609b19030aSopenharmony_ci		<licensefile></licensefile>
619b19030aSopenharmony_ci        <policylist>
629b19030aSopenharmony_ci            <policy name="projectPolicy" desc="">
639b19030aSopenharmony_ci                <!--policyitem type="compatibility" name="curl" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/-->
649b19030aSopenharmony_ci                <!--policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="不使用或者使用但是是独立进程,被X进程调用,自研进程不受GPL影响"/>
659b19030aSopenharmony_ci	            <policyitem type="license" name="LGPL" path=".*" desc="未使用,或者使用了,被X进程以动态链接方式调用"/>
669b19030aSopenharmony_ci				<policyitem type="copyright" name="xxx" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="xxxx开发代码"/-->
679b19030aSopenharmony_ci                <policyitem type="license" name="*" path="hvigorfile.js" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="测试资源文件"/>
689b19030aSopenharmony_ci                <policyitem type="copyright" name="*" path="hvigorfile.js" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="测试资源文件"/>
699b19030aSopenharmony_ci                <policyitem type="license" name="*" path="hvigorfile.ts" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="测试资源文件"/>
709b19030aSopenharmony_ci                <policyitem type="copyright" name="*" path="hvigorfile.ts" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="测试资源文件"/>
719b19030aSopenharmony_ci                <policyitem type="license" name="*" path="feature/ota/hvigorfile.ts" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="测试资源文件"/>
729b19030aSopenharmony_ci                <policyitem type="copyright" name="*" path="feature/ota/hvigorfile.ts" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="测试资源文件"/>
739b19030aSopenharmony_ci                <policyitem type="license" name="*" path="common/hvigorfile.ts" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="测试资源文件"/>
749b19030aSopenharmony_ci                <policyitem type="copyright" name="*" path="common/hvigorfile.ts" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="测试资源文件"/>
759b19030aSopenharmony_ci                <policyitem type="license" name="*" path="product/oh/base/hvigorfile.ts" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="测试资源文件"/>
769b19030aSopenharmony_ci                <policyitem type="copyright" name="*" path="product/oh/base/hvigorfile.ts" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="测试资源文件"/>
779b19030aSopenharmony_ci                <policyitem type="license" name="*" path="common/src/main/resources/base/media/video.mp4" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="测试资源文件"/>
789b19030aSopenharmony_ci                <policyitem type="copyright" name="*" path="common/src/main/resources/base/media/video.mp4" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="测试资源文件"/>
799b19030aSopenharmony_ci            </policy>
809b19030aSopenharmony_ci        </policylist>
819b19030aSopenharmony_ci		<filefilterlist>
829b19030aSopenharmony_ci			<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies" >
839b19030aSopenharmony_ci				<filteritem type="filepath" name="common/src/main/resources/base/media/.*.png" desc="self developed image"/>
849b19030aSopenharmony_ci				<filteritem type="filepath" name="common/src/main/resources/base/media/.*.mp4" desc="self developed image"/>
859b19030aSopenharmony_ci				<filteritem type="filepath" name="feature/ota/src/main/resources/base/media/.*.png" desc="self developed image"/>
869b19030aSopenharmony_ci                <filteritem type="filepath" name="AppScope/resources/base/media/app_icon.png" desc="self developed image"/>
879b19030aSopenharmony_ci			</filefilter>
889b19030aSopenharmony_ci			<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
899b19030aSopenharmony_ci				<filteritem type="filename" name="README|README_zh|.*.json5|.*.json" desc=""/>
909b19030aSopenharmony_ci			</filefilter>
919b19030aSopenharmony_ci			<filefilter name="defaultPolicyFilter" desc="Filters for LICENSE file policies">
929b19030aSopenharmony_ci				<filteritem type="filename" name="README|README_zh|*.json5|*.json" desc="json file"/>
939b19030aSopenharmony_ci			</filefilter>
949b19030aSopenharmony_ci		</filefilterlist>
959b19030aSopenharmony_ci    </oatconfig>
969b19030aSopenharmony_ci</configuration>
97