11d68314aSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
21d68314aSopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
31d68314aSopenharmony_ci
41d68314aSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
51d68314aSopenharmony_ci     you may not use this file except in compliance with the License.
61d68314aSopenharmony_ci     You may obtain a copy of the License at
71d68314aSopenharmony_ci
81d68314aSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
91d68314aSopenharmony_ci
101d68314aSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
111d68314aSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
121d68314aSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
131d68314aSopenharmony_ci     See the License for the specific language governing permissions and
141d68314aSopenharmony_ci     limitations under the License.
151d68314aSopenharmony_ci
161d68314aSopenharmony_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.
171d68314aSopenharmony_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.
181d68314aSopenharmony_ci
191d68314aSopenharmony_ci    licensefile:
201d68314aSopenharmony_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.
211d68314aSopenharmony_ci
221d68314aSopenharmony_ci    policylist:
231d68314aSopenharmony_ci    1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
241d68314aSopenharmony_ci    2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
251d68314aSopenharmony_ci    <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
261d68314aSopenharmony_ci    3. policyitem type:
271d68314aSopenharmony_ci        "compatibility" is used to check license compatibility in the specified path;
281d68314aSopenharmony_ci        "license" is used to check source license header in the specified path;
291d68314aSopenharmony_ci        "copyright" is used to check source copyright header in the specified path;
301d68314aSopenharmony_ci        "import" is used to check source dependency in the specified path, such as import ... ,include ...
311d68314aSopenharmony_ci        "filetype" is used to check file type in the specified path, supported file types: archive, binary
321d68314aSopenharmony_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
331d68314aSopenharmony_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.
341d68314aSopenharmony_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.
351d68314aSopenharmony_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.
361d68314aSopenharmony_ci    7. policyitem filefilter: Used to bind filefilter which define filter rules.
371d68314aSopenharmony_ci    7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
381d68314aSopenharmony_ci    8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
391d68314aSopenharmony_ci
401d68314aSopenharmony_ci    Note:If the text contains special characters, please escape them according to the following rules:
411d68314aSopenharmony_ci    " == &quot;
421d68314aSopenharmony_ci    & == &amp;
431d68314aSopenharmony_ci    ' == &apos;
441d68314aSopenharmony_ci    < == &lt;
451d68314aSopenharmony_ci    > == &gt;
461d68314aSopenharmony_ci-->
471d68314aSopenharmony_ci
481d68314aSopenharmony_ci<configuration>
491d68314aSopenharmony_ci    <oatconfig>
501d68314aSopenharmony_ci        <licensefile>COPYING</licensefile>
511d68314aSopenharmony_ci        <policylist>
521d68314aSopenharmony_ci            <policy name="projectPolicy" desc="">
531d68314aSopenharmony_ci                <policyitem type="compatibility" name="LGPL-2.1+" path="COPYING" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="the License of this file is LGPL"/>
541d68314aSopenharmony_ci                <policyitem type="compatibility" name="LGPL" path="BUILD.gn" desc="They are used in dynamic link mode."/>
551d68314aSopenharmony_ci                <policyitem type="compatibility" name="LGPL" path="install.sh" desc="They are used in dynamic link mode."/>
561d68314aSopenharmony_ci                <policyitem type="compatibility" name="LGPL" path="libnl3.spec" desc="They are used in dynamic link mode."/>
571d68314aSopenharmony_ci            </policy>
581d68314aSopenharmony_ci        </policylist>
591d68314aSopenharmony_ci        <filefilterlist>
601d68314aSopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
611d68314aSopenharmony_ci                <filteritem type="filename" name="*.8|*.png|*.sym" desc="desc files"/>
621d68314aSopenharmony_ci                <filteritem type="filepath" name="tests/.*" desc="Test files"/>
631d68314aSopenharmony_ci            </filefilter>
641d68314aSopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
651d68314aSopenharmony_ci            </filefilter>
661d68314aSopenharmony_ci            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
671d68314aSopenharmony_ci            </filefilter>
681d68314aSopenharmony_ci            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
691d68314aSopenharmony_ci            </filefilter>
701d68314aSopenharmony_ci            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
711d68314aSopenharmony_ci            </filefilter>
721d68314aSopenharmony_ci            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
731d68314aSopenharmony_ci            </filefilter>
741d68314aSopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
751d68314aSopenharmony_ci            </filefilter>
761d68314aSopenharmony_ci        </filefilterlist>
771d68314aSopenharmony_ci        <licensematcherlist>
781d68314aSopenharmony_ci            <licensematcher name="LGPL" desc="">
791d68314aSopenharmony_ci                <licensetext name="License:       LGPLv2" desc=""/>
801d68314aSopenharmony_ci            </licensematcher>
811d68314aSopenharmony_ci        </licensematcherlist>
821d68314aSopenharmony_ci    </oatconfig>
831d68314aSopenharmony_ci</configuration>
84