142103316Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
242103316Sopenharmony_ci<!-- Copyright (c) 2021-2023 Huawei Device Co., Ltd.
342103316Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
442103316Sopenharmony_ci     you may not use this file except in compliance with the License.
542103316Sopenharmony_ci     You may obtain a copy of the License at
642103316Sopenharmony_ci
742103316Sopenharmony_ci         http://www.apache.org/licenses/LICENSE-2.0
842103316Sopenharmony_ci
942103316Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
1042103316Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
1142103316Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1242103316Sopenharmony_ci     See the License for the specific language governing permissions and
1342103316Sopenharmony_ci     limitations under the License.
1442103316Sopenharmony_ci-->
1542103316Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
1642103316Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
1742103316Sopenharmony_cilicensefile:
1842103316Sopenharmony_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.
1942103316Sopenharmony_ci
2042103316Sopenharmony_citasklist(only for batch mode):
2142103316Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
2242103316Sopenharmony_ci2. task name: Only an name, no practical effect.
2342103316Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
2442103316Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
2542103316Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
2642103316Sopenharmony_ci
2742103316Sopenharmony_ci
2842103316Sopenharmony_cipolicyList:
2942103316Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
3042103316Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
3142103316Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
3242103316Sopenharmony_ci3. policyitem type:
3342103316Sopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
3442103316Sopenharmony_ci    "license" is used to check source license header in the specified path;
3542103316Sopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
3642103316Sopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
3742103316Sopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
3842103316Sopenharmony_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
3942103316Sopenharmony_ci
4042103316Sopenharmony_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.
4142103316Sopenharmony_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.
4242103316Sopenharmony_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.
4342103316Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
4442103316Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
4542103316Sopenharmony_ci
4642103316Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
4742103316Sopenharmony_ci" == &gt;
4842103316Sopenharmony_ci& == &gt;
4942103316Sopenharmony_ci' == &gt;
5042103316Sopenharmony_ci< == &gt;
5142103316Sopenharmony_ci> == &gt;
5242103316Sopenharmony_ci-->
5342103316Sopenharmony_ci<configuration>
5442103316Sopenharmony_ci    <oatconfig>
5542103316Sopenharmony_ci        <licensefile></licensefile>
5642103316Sopenharmony_ci        <policylist>
5742103316Sopenharmony_ci            <policy name="projectPolicy" desc="">
5842103316Sopenharmony_ci                <policyitem type="copyright" name="Huawei Technologies Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by Huawei Technologies"/>
5942103316Sopenharmony_ci                <policyitem type="copyright" name="Huawei Device Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by Huawei Device"/>
6042103316Sopenharmony_ci                <policyitem type="copyright" name="Rockchip Electronics Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed By Rockchip"/>
6142103316Sopenharmony_ci                <policyitem type="copyright" name="Shenzhen Kaihong DID Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by Shenzhen Kaihong DID"/>
6242103316Sopenharmony_ci                <policyitem type="license" name="GPL" path=".*" desc="linux kernel adapter codes"/>
6342103316Sopenharmony_ci                <policyitem type="license" name="BSD" path=".*" desc="huawei codes"/>
6442103316Sopenharmony_ci            </policy>
6542103316Sopenharmony_ci        </policylist>
6642103316Sopenharmony_ci        <filefilterlist>
6742103316Sopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
6842103316Sopenharmony_ci                <filteritem type="filename" name="*.lds|*.pod"/>
6942103316Sopenharmony_ci                <filteritem type="filename" name="*.a|*.d|*.o|*.so|*.cmd|*.hcb|*.swp"/>
7042103316Sopenharmony_ci                <filteritem type="filename" name="*.clang-format"/>
7142103316Sopenharmony_ci                <filteritem type="filepath" name="dir name underproject/.*" desc="Describe the reason for filtering scan results"/>
7242103316Sopenharmony_ci            </filefilter>
7342103316Sopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
7442103316Sopenharmony_ci                <filteritem type="filename" name="README.OpenSource"/>
7542103316Sopenharmony_ci                <filteritem type="filename" name="README"/>
7642103316Sopenharmony_ci                <filteritem type="filename" name="BUILD.gn"/>
7742103316Sopenharmony_ci                <filteritem type="filename" name="*.gni"/>
7842103316Sopenharmony_ci                <filteritem type="filepath" name="dir name underproject/.*" desc="Describe the reason for filtering scan results"/>
7942103316Sopenharmony_ci            </filefilter>
8042103316Sopenharmony_ci            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies" >
8142103316Sopenharmony_ci                <filteritem type="filename" name="README.OpenSource"/>
8242103316Sopenharmony_ci                <filteritem type="filename" name="README"/>
8342103316Sopenharmony_ci                <filteritem type="filename" name="BUILD.gn"/>
8442103316Sopenharmony_ci                <filteritem type="filename" name="*.gni"/>
8542103316Sopenharmony_ci                <filteritem type="filepath" name="dir name underproject/.*" desc="Describe the reason for filtering scan results"/>
8642103316Sopenharmony_ci            </filefilter>
8742103316Sopenharmony_ci            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies" >
8842103316Sopenharmony_ci                <filteritem type="filepath" name="dir name underproject/.*" desc="Describe the reason for filtering scan results"/>
8942103316Sopenharmony_ci                <filteritem type="filename" name="BUILD.gn"/>
9042103316Sopenharmony_ci                <filteritem type="filename" name="*.gni"/>
9142103316Sopenharmony_ci            </filefilter>
9242103316Sopenharmony_ci            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies" >
9342103316Sopenharmony_ci                <filteritem type="filepath" name="README.md" desc="Describe the reason for filtering scan results"/>
9442103316Sopenharmony_ci            </filefilter>
9542103316Sopenharmony_ci            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies" >
9642103316Sopenharmony_ci                <filteritem type="filepath" name="dir name underproject/.*" desc="Describe the reason for filtering scan results"/>
9742103316Sopenharmony_ci            </filefilter>
9842103316Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies" >
9942103316Sopenharmony_ci                <filteritem type="filepath" name="figures/.*.png" desc="USB architecture diagram"/>
10042103316Sopenharmony_ci                <filteritem type="filepath" name="frameworks/dialog/dialog_ui/signature/am.p7b" desc="signature file"/>
10142103316Sopenharmony_ci                <filteritem type="filepath" name="frameworks/dialog/dialog_ui/AppScope/resources/base/media/app_icon.png" desc="app icon"/>
10242103316Sopenharmony_ci                <filteritem type="filepath" name="frameworks/dialog/dialog_ui/usb_right_dialog/src/main/resources/base/media/icon.png" desc="icon"/>
10342103316Sopenharmony_ci                <filteritem type="filepath" name="frameworks/dialog/functionswitch_ui/signature/com.ohos.functionswitchdialog.p7b" desc="signature file"/>
10442103316Sopenharmony_ci                <filteritem type="filepath" name="frameworks/dialog/functionswitch_ui/usb_function_dialog/src/main/resources/base/media/app_icon.png" desc="app icon"/>
10542103316Sopenharmony_ci                <filteritem type="filepath" name="frameworks/dialog/functionswitch_ui/usb_function_dialog/src/main/resources/base/media/icon.png" desc="icon"/>
10642103316Sopenharmony_ci                <filteritem type="filepath" name="frameworks/dialog/dialog_ui/usb_right_dialog/src/main/resources/base/media/notification_icon.png" desc="icon"/>
10742103316Sopenharmony_ci            </filefilter>
10842103316Sopenharmony_ci        </filefilterlist>
10942103316Sopenharmony_ci    </oatconfig>
11042103316Sopenharmony_ci</configuration>
11142103316Sopenharmony_ci
112