xref: /base/security/certificate_manager/OAT.xml (revision 4e56987c)
14e56987cSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
24e56987cSopenharmony_ci<!-- Copyright (c) 2022 Huawei Device Co., Ltd.
34e56987cSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
44e56987cSopenharmony_ci     you may not use this file except in compliance with the License.
54e56987cSopenharmony_ci     You may obtain a copy of the License at
64e56987cSopenharmony_ci
74e56987cSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
84e56987cSopenharmony_ci
94e56987cSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
104e56987cSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
114e56987cSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
124e56987cSopenharmony_ci     See the License for the specific language governing permissions and
134e56987cSopenharmony_ci     limitations under the License.
144e56987cSopenharmony_ci
154e56987cSopenharmony_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.
164e56987cSopenharmony_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.
174e56987cSopenharmony_ci
184e56987cSopenharmony_ci    licensefile:
194e56987cSopenharmony_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.
204e56987cSopenharmony_ci
214e56987cSopenharmony_ci    policylist:
224e56987cSopenharmony_ci    1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
234e56987cSopenharmony_ci    2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
244e56987cSopenharmony_ci    <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
254e56987cSopenharmony_ci    3. policyitem type:
264e56987cSopenharmony_ci        "compatibility" is used to check license compatibility in the specified path;
274e56987cSopenharmony_ci        "license" is used to check source license header in the specified path;
284e56987cSopenharmony_ci        "copyright" is used to check source copyright header in the specified path;
294e56987cSopenharmony_ci        "import" is used to check source dependency in the specified path, such as import ... ,include ...
304e56987cSopenharmony_ci        "filetype" is used to check file type in the specified path, supported file types: archive, binary
314e56987cSopenharmony_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
324e56987cSopenharmony_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.
334e56987cSopenharmony_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.
344e56987cSopenharmony_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.
354e56987cSopenharmony_ci    7. policyitem filefilter: Used to bind filefilter which define filter rules.
364e56987cSopenharmony_ci    7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
374e56987cSopenharmony_ci    8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
384e56987cSopenharmony_ci
394e56987cSopenharmony_ci    Note:If the text contains special characters, please escape them according to the following rules:
404e56987cSopenharmony_ci    " == &quot;
414e56987cSopenharmony_ci    & == &amp;
424e56987cSopenharmony_ci    ' == &apos;
434e56987cSopenharmony_ci    < == &lt;
444e56987cSopenharmony_ci    > == &gt;
454e56987cSopenharmony_ci-->
464e56987cSopenharmony_ci
474e56987cSopenharmony_ci<configuration>
484e56987cSopenharmony_ci    <oatconfig>
494e56987cSopenharmony_ci        <licensefile></licensefile>
504e56987cSopenharmony_ci        <policylist>
514e56987cSopenharmony_ci            <policy name="projectPolicy" desc="">
524e56987cSopenharmony_ci            </policy>
534e56987cSopenharmony_ci        </policylist>
544e56987cSopenharmony_ci
554e56987cSopenharmony_ci        <filefilterlist>
564e56987cSopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
574e56987cSopenharmony_ci            </filefilter>
584e56987cSopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
594e56987cSopenharmony_ci                <filteritem type="filepath" name="config/systemCertificates/.*" desc="system certificate files"/>
604e56987cSopenharmony_ci            </filefilter>
614e56987cSopenharmony_ci            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
624e56987cSopenharmony_ci                <filteritem type="filepath" name="config/systemCertificates/.*" desc="system certificate files"/>
634e56987cSopenharmony_ci            </filefilter>
644e56987cSopenharmony_ci            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
654e56987cSopenharmony_ci            </filefilter>
664e56987cSopenharmony_ci            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
674e56987cSopenharmony_ci            </filefilter>
684e56987cSopenharmony_ci            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
694e56987cSopenharmony_ci            </filefilter>
704e56987cSopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
714e56987cSopenharmony_ci                <filteritem type="filepath" name="config/systemCertificates/.*" desc="system certificate files"/>
724e56987cSopenharmony_ci                <filteritem type="filepath" name="figures/zh-cn_certificate_manager_architecture.png" desc="self developed image"/>
734e56987cSopenharmony_ci            </filefilter>
744e56987cSopenharmony_ci        </filefilterlist>
754e56987cSopenharmony_ci    </oatconfig>
764e56987cSopenharmony_ci</configuration>
77