113498266Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
213498266Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
313498266Sopenharmony_ci
413498266Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
513498266Sopenharmony_ci     you may not use this file except in compliance with the License.
613498266Sopenharmony_ci     You may obtain a copy of the License at
713498266Sopenharmony_ci
813498266Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
913498266Sopenharmony_ci
1013498266Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
1113498266Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
1213498266Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313498266Sopenharmony_ci     See the License for the specific language governing permissions and
1413498266Sopenharmony_ci     limitations under the License.
1513498266Sopenharmony_ci-->
1613498266Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
1713498266Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
1813498266Sopenharmony_cilicensefile:
1913498266Sopenharmony_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.
2013498266Sopenharmony_ci
2113498266Sopenharmony_citasklist(only for batch mode):
2213498266Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
2313498266Sopenharmony_ci2. task name: Only an name, no practical effect.
2413498266Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
2513498266Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
2613498266Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
2713498266Sopenharmony_ci
2813498266Sopenharmony_ci
2913498266Sopenharmony_cipolicyList:
3013498266Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
3113498266Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
3213498266Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
3313498266Sopenharmony_ci3. policyitem type:
3413498266Sopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
3513498266Sopenharmony_ci    "license" is used to check source license header in the specified path;
3613498266Sopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
3713498266Sopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
3813498266Sopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
3913498266Sopenharmony_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
4013498266Sopenharmony_ci
4113498266Sopenharmony_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.
4213498266Sopenharmony_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.
4313498266Sopenharmony_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.
4413498266Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
4513498266Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
4613498266Sopenharmony_ci
4713498266Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
4813498266Sopenharmony_ci" == &gt;
4913498266Sopenharmony_ci& == &gt;
5013498266Sopenharmony_ci' == &gt;
5113498266Sopenharmony_ci< == &gt;
5213498266Sopenharmony_ci> == &gt;
5313498266Sopenharmony_ci-->
5413498266Sopenharmony_ci<configuration>
5513498266Sopenharmony_ci    <oatconfig>
5613498266Sopenharmony_ci    <licensefile>COPYING</licensefile>
5713498266Sopenharmony_ci    <policylist>
5813498266Sopenharmony_ci        <policy name="projectPolicy" desc="">
5913498266Sopenharmony_ci        <policyitem type="compatibility" name="The curl license" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/>
6013498266Sopenharmony_ci        <policyitem type="compatibility" name="curl" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/>
6113498266Sopenharmony_ci        <policyitem type="compatibility" name="ISC License" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/>
6213498266Sopenharmony_ci        </policy>
6313498266Sopenharmony_ci    </policylist>
6413498266Sopenharmony_ci    <licensematcherlist>
6513498266Sopenharmony_ci        <licensematcher name="The curl license" desc="If the scanning result is InvalidLicense, you can define matching rules here. Note that quotation marks must be escaped.">
6613498266Sopenharmony_ci        <licensetext name="
6713498266Sopenharmony_ci            * This software is licensed as described in the file COPYING, which
6813498266Sopenharmony_ci            * you should have received as part of this distribution. The terms
6913498266Sopenharmony_ci            * are also available at https://curl.se/docs/copyright.html.
7013498266Sopenharmony_ci            *
7113498266Sopenharmony_ci            * You may opt to use, copy, modify, merge, publish, distribute and/or sell
7213498266Sopenharmony_ci            * copies of the Software, and permit persons to whom the Software is
7313498266Sopenharmony_ci            * furnished to do so, under the terms of the COPYING file.
7413498266Sopenharmony_ci            " desc=""/>
7513498266Sopenharmony_ci        <licensetext name="
7613498266Sopenharmony_ci             * Permission to use, copy, modify, and distribute this software for any
7713498266Sopenharmony_ci             * purpose with or without fee is hereby granted, provided that the above
7813498266Sopenharmony_ci             * copyright notice and this permission notice appear in all copies.
7913498266Sopenharmony_ci             *
8013498266Sopenharmony_ci             * THE SOFTWARE IS PROVIDED &gt;AS IS&gt; AND INTERNET SOFTWARE CONSORTIUM
8113498266Sopenharmony_ci             * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
8213498266Sopenharmony_ci             * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
8313498266Sopenharmony_ci             * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
8413498266Sopenharmony_ci             * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
8513498266Sopenharmony_ci             * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
8613498266Sopenharmony_ci             * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
8713498266Sopenharmony_ci             * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
8813498266Sopenharmony_ci            " desc=""/>
8913498266Sopenharmony_ci        </licensematcher>
9013498266Sopenharmony_ci    </licensematcherlist>
9113498266Sopenharmony_ci    <filefilterlist>
9213498266Sopenharmony_ci        <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
9313498266Sopenharmony_ci            <filteritem type="filename" name="macos_main.cpp" desc=""/>
9413498266Sopenharmony_ci            <filteritem type="filename" name="config.guess" desc=""/>
9513498266Sopenharmony_ci            <filteritem type="filename" name="config.sub" desc=""/>
9613498266Sopenharmony_ci            <filteritem type="filename" name="depcomp" desc=""/>
9713498266Sopenharmony_ci            <filteritem type="filename" name="missing" desc=""/>
9813498266Sopenharmony_ci            <filteritem type="filename" name="test-driver" desc=""/>
9913498266Sopenharmony_ci            <filteritem type="filename" name="compile" desc=""/>
10013498266Sopenharmony_ci            <filteritem type="filename" name="test17" desc=""/>
10113498266Sopenharmony_ci            <filteritem type="filename" name="*.sh" desc=""/>
10213498266Sopenharmony_ci            <filteritem type="filename" name="*.bat" desc=""/>
10313498266Sopenharmony_ci            <filteritem type="filename" name="*.cmd" desc=""/>
10413498266Sopenharmony_ci            <filteritem type="filename" name="*.m4" desc=""/>
10513498266Sopenharmony_ci            <filteritem type="filepath" name="docs/.*" desc=""/>
10613498266Sopenharmony_ci        </filefilter>
10713498266Sopenharmony_ci        <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
10813498266Sopenharmony_ci        </filefilter>
10913498266Sopenharmony_ci        <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
11013498266Sopenharmony_ci        </filefilter>
11113498266Sopenharmony_ci        <filefilter name="binaryFileTypePolicyFilter" desc="File not used">
11213498266Sopenharmony_ci            <filteritem type="filepath" name="tests/.*" desc=""/>
11313498266Sopenharmony_ci            <filteritem type="filepath" name="cacert.pem" desc=""/>
11413498266Sopenharmony_ci            <filteritem type="filepath" name="curl-7.79.1.tar.xz" desc=""/>
11513498266Sopenharmony_ci        </filefilter>
11613498266Sopenharmony_ci        <filefilter name="publicCAFilePolicyFilter" desc="Filters for public CA file policies">
11713498266Sopenharmony_ci            <filteritem type="filepath" name="cacert.pem" desc="This is a bundle of X.509 certificates of public
11813498266Sopenharmony_ci                Certificate Authorities(CA) downloaded from https://curl.se/docs/caextract.html"/>
11913498266Sopenharmony_ci        </filefilter>
12013498266Sopenharmony_ci    </filefilterlist>
12113498266Sopenharmony_ci    </oatconfig>
12213498266Sopenharmony_ci</configuration>
123