18d6344f9Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
28d6344f9Sopenharmony_ci<!-- Copyright (c) 2022 Huawei Device Co., Ltd.
38d6344f9Sopenharmony_ci
48d6344f9Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
58d6344f9Sopenharmony_ci     you may not use this file except in compliance with the License.
68d6344f9Sopenharmony_ci     You may obtain a copy of the License at
78d6344f9Sopenharmony_ci
88d6344f9Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
98d6344f9Sopenharmony_ci
108d6344f9Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
118d6344f9Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
128d6344f9Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138d6344f9Sopenharmony_ci     See the License for the specific language governing permissions and
148d6344f9Sopenharmony_ci     limitations under the License.
158d6344f9Sopenharmony_ci
168d6344f9Sopenharmony_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.
178d6344f9Sopenharmony_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.
188d6344f9Sopenharmony_ci
198d6344f9Sopenharmony_ci    licensefile:
208d6344f9Sopenharmony_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.
218d6344f9Sopenharmony_ci
228d6344f9Sopenharmony_ci    policylist:
238d6344f9Sopenharmony_ci    1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
248d6344f9Sopenharmony_ci    2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
258d6344f9Sopenharmony_ci    <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
268d6344f9Sopenharmony_ci    3. policyitem type:
278d6344f9Sopenharmony_ci        "compatibility" is used to check license compatibility in the specified path;
288d6344f9Sopenharmony_ci        "license" is used to check source license header in the specified path;
298d6344f9Sopenharmony_ci        "copyright" is used to check source copyright header in the specified path;
308d6344f9Sopenharmony_ci        "import" is used to check source dependency in the specified path, such as import ... ,include ...
318d6344f9Sopenharmony_ci        "filetype" is used to check file type in the specified path, supported file types: archive, binary
328d6344f9Sopenharmony_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
338d6344f9Sopenharmony_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.
348d6344f9Sopenharmony_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.
358d6344f9Sopenharmony_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.
368d6344f9Sopenharmony_ci    7. policyitem filefilter: Used to bind filefilter which define filter rules.
378d6344f9Sopenharmony_ci    7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
388d6344f9Sopenharmony_ci    8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
398d6344f9Sopenharmony_ci
408d6344f9Sopenharmony_ci    Note:If the text contains special characters, please escape them according to the following rules:
418d6344f9Sopenharmony_ci    " == &quot;
428d6344f9Sopenharmony_ci    & == &amp;
438d6344f9Sopenharmony_ci    ' == &apos;
448d6344f9Sopenharmony_ci    < == &lt;
458d6344f9Sopenharmony_ci    > == &gt;
468d6344f9Sopenharmony_ci-->
478d6344f9Sopenharmony_ci
488d6344f9Sopenharmony_ci<configuration>
498d6344f9Sopenharmony_ci    <oatconfig>
508d6344f9Sopenharmony_ci        <licensefile>LICENSE</licensefile>
518d6344f9Sopenharmony_ci        <policylist>
528d6344f9Sopenharmony_ci            <policy name="projectPolicy" desc="">
538d6344f9Sopenharmony_ci                <!--policyitem type="compatibility" name="GPL-2.0+" path="abc/.*" desc="Process that runs independently, invoked by the X process."/-->
548d6344f9Sopenharmony_ci                <!--policyitem type="license" name="LGPL" path=".*" desc="Dynamically linked by module X"/-->
558d6344f9Sopenharmony_ci                <policyitem type="copyright" name="Huawei Technologies Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by Huawei Technologies"/>
568d6344f9Sopenharmony_ci                <policyitem type="copyright" name="Huawei Device Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by Huawei Device"/>
578d6344f9Sopenharmony_ci                <policyitem type="copyright" name="Rockchip Electronics Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed By Rockchip"/>
588d6344f9Sopenharmony_ci                <policyitem type="copyright" name="HiHope Open Source Organization ." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed By Hihope"/>
598d6344f9Sopenharmony_ci                <policyitem type="copyright" name="Institute of Software, CAS." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed By ISCAS"/>           
608d6344f9Sopenharmony_ci                <policyitem type="license" name="GPL" path=".*" desc="linux kernel adapter codes"/>
618d6344f9Sopenharmony_ci                <policyitem type="license" name="BSD" path=".*" desc="huawei codes"/>
628d6344f9Sopenharmony_ci	        </policy>
638d6344f9Sopenharmony_ci        </policylist>
648d6344f9Sopenharmony_ci        <filefilterlist>
658d6344f9Sopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
668d6344f9Sopenharmony_ci                <filteritem type="filepath" name="LICENSE-Apache" desc="license file"/>
678d6344f9Sopenharmony_ci                <filteritem type="filepath" name="LICENSE-GPL-2.0" desc="license file"/>
688d6344f9Sopenharmony_ci                <filteritem type="filepath" name="rk3568/cfg/fstab.rk3568" desc="配置文件,不能加其他注释"/>
698d6344f9Sopenharmony_ci                <filteritem type="filepath" name="dayu210/cfg/fstab.dayu210" desc="配置文件,不能加其他注释"/>
708d6344f9Sopenharmony_ci                <filteritem type="filepath" name="rk3568/cfg/fstab.required" desc="配置文件,不能加其他注释"/>
718d6344f9Sopenharmony_ci                <filteritem type="filepath" name="dayu210/cfg/fstab.required" desc="配置文件,不能加其他注释"/>
728d6344f9Sopenharmony_ci                <filteritem type="filepath" name="rk3568/loader/*" desc="mirror image file"/>
738d6344f9Sopenharmony_ci                <filteritem type="filepath" name="dayu210/loader/*" desc="mirror image file"/>
748d6344f9Sopenharmony_ci                <filteritem type="filepath" name="rk3568/bootanimation/*" desc="raw files"/>
758d6344f9Sopenharmony_ci                <filteritem type="filepath" name="dayu210/bootanimation/*" desc="raw files"/>
768d6344f9Sopenharmony_ci                <filteritem type="filepath" name="rk3568/updater/config/fstab.updater" desc="配置文件,不能加其他注释"/>
778d6344f9Sopenharmony_ci                <filteritem type="filepath" name="dayu210/updater/config/fstab.updater" desc="配置文件,不能加其他注释"/>
788d6344f9Sopenharmony_ci                <filteritem type="filename" name="*.pdf" desc="desc files"/>
798d6344f9Sopenharmony_ci                <!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
808d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
818d6344f9Sopenharmony_ci		<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
828d6344f9Sopenharmony_ci            </filefilter>
838d6344f9Sopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
848d6344f9Sopenharmony_ci                <!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
858d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
868d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
878d6344f9Sopenharmony_ci            </filefilter>
888d6344f9Sopenharmony_ci            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
898d6344f9Sopenharmony_ci                <!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
908d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
918d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
928d6344f9Sopenharmony_ci            </filefilter>
938d6344f9Sopenharmony_ci            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
948d6344f9Sopenharmony_ci                <!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
958d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
968d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
978d6344f9Sopenharmony_ci            </filefilter>
988d6344f9Sopenharmony_ci            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
998d6344f9Sopenharmony_ci                <!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
1008d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
1018d6344f9Sopenharmony_ci            </filefilter>
1028d6344f9Sopenharmony_ci            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
1038d6344f9Sopenharmony_ci                <!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
1048d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
1058d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
1068d6344f9Sopenharmony_ci            </filefilter>
1078d6344f9Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
1088d6344f9Sopenharmony_ci                <filteritem type="filepath" name="rk3568/loader/*" desc="rk3568 uboot image"/>
1098d6344f9Sopenharmony_ci                <filteritem type="filepath" name="dayu210/loader/*" desc="rk3588 uboot image"/>
1108d6344f9Sopenharmony_ci                <filteritem type="filename" name="*.png" desc="png"/>
1118d6344f9Sopenharmony_ci                <filteritem type="filename" name="*.jpg" desc="jpg"/>
1128d6344f9Sopenharmony_ci                <filteritem type="filename" name="*.bmp" desc="bmp"/>
1138d6344f9Sopenharmony_ci                <!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
1148d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
1158d6344f9Sopenharmony_ci                <!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
1168d6344f9Sopenharmony_ci            </filefilter>
1178d6344f9Sopenharmony_ci
1188d6344f9Sopenharmony_ci        </filefilterlist>
1198d6344f9Sopenharmony_ci        <licensematcherlist>
1208d6344f9Sopenharmony_ci            <!--licensematcher name="uvwxyz License" desc="If the scanning result is InvalidLicense, you can define matching rules here. Note that quotation marks must be escaped.">
1218d6344f9Sopenharmony_ci                <licensetext name="
1228d6344f9Sopenharmony_ci                    uvwxyz license textA xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1238d6344f9Sopenharmony_ci				 " desc=""/>
1248d6344f9Sopenharmony_ci                <licensetext name="
1258d6344f9Sopenharmony_ci                    uvwxyz license textB xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1268d6344f9Sopenharmony_ci				 " desc=""/>
1278d6344f9Sopenharmony_ci            </licensematcher-->
1288d6344f9Sopenharmony_ci        </licensematcherlist>
1298d6344f9Sopenharmony_ci    </oatconfig>
1308d6344f9Sopenharmony_ci</configuration>
131