• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15
16     Notes:
17     This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun.
18-->
19<!-- OAT(OSS Audit Tool) configuration guide:
20basedir: Root dir, the basedir + project path is the real source file location.
21licensefile:
221.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.
23
24tasklist(only for batch mode):
251. task: Define oat check thread, each task will start a new thread.
262. task name: Only an name, no practical effect.
273. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
284. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
295. task project: Projects to be checked, the path field define the source root dir of the project.
30
31
32policyList:
331. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
342. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
35<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
363. policyitem type:
37    "compatibility" is used to check license compatibility in the specified path;
38    "license" is used to check source license header in the specified path;
39    "copyright" is used to check source copyright header in the specified path;
40    "import" is used to check source dependency in the specified path, such as import ... ,include ...
41    "filetype" is used to check file type in the specified path, supported file types: archive, binary
42    "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
43
444. 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.
455. 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.
466. 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.
477. policyitem filefilter: Used to bind filefilter which define filter rules.
488. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
49
50Note:If the text contains special characters, please escape them according to the following rules:
51" == &gt;
52& == &gt;
53' == &gt;
54< == &gt;
55> == &gt;
56-->
57<configuration>
58    <oatconfig>
59        <licensefile></licensefile>
60        <policylist>
61            <policy name="projectPolicy" desc="">
62            </policy>
63        </policylist>
64        <filefilterlist>
65            <filefilter name="defaultFilter" desc="Files not to check">
66            </filefilter>
67            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
68                <filteritem type="filepath" name="release.sh" desc="the header of the file is not license" />
69                <filteritem type="filepath" name="src/bindings/ejdb2_flutter/ios/ejdb2_flutter.podspec" desc="the header of the file is not license" />
70            </filefilter>
71            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
72            </filefilter>
73            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
74            </filefilter>
75            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
76            </filefilter>
77            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
78                <filteritem type="filepath" name=".*" desc="Describe the reason for filtering scan results"/>
79            </filefilter>
80            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
81                <filteritem type="filename" name=".png" desc="the picture of iowow"/>
82            </filefilter>
83        </filefilterlist>
84        <licensematcherlist>
85            <licensematcher name="BSD-3-Clause" desc="">
86                <licensetext name="
87                A C-program for MT19937, with initialization improved 2002/1/26.
88                Coded by Takuji Nishimura and Makoto Matsumoto.
89
90                Before using, initialize the state by using init_genrand(seed)
91                or init_by_array(init_key, key_length).
92
93                Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
94                All rights reserved.
95                Copyright (C) 2005, Mutsuo Saito,
96                All rights reserved.
97
98                Redistribution and use in source and binary forms, with or without
99                modification, are permitted provided that the following conditions
100                are met:
101
102                    1. Redistributions of source code must retain the above copyright
103                        notice, this list of conditions and the following disclaimer.
104
105                    2. Redistributions in binary form must reproduce the above copyright
106                        notice, this list of conditions and the following disclaimer in the
107                        documentation and/or other materials provided with the distribution.
108
109                    3. The names of its contributors may not be used to endorse or promote
110                        products derived from this software without specific prior written
111                        permission.
112
113                THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
114                &gt;AS IS&gt; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
115                LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
116                A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
117                CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
118                EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
119                PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
120                PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
121                LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
122                NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
123                SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
124
125
126                Any feedback is very welcome.
127                http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
128                email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)"
129                desc=""/>
130            </licensematcher>
131            <licensematcher name="BSD-3-Clause" desc="">
132                <licensetext name="
133                Copyright (c) 2011, Willem-Hendrik Thiart
134                Copyright (c) 2012-2020 Softmotions Ltd &gt; info@softmotions.com &gt;
135                All rights reserved.
136
137                Redistribution and use in source and binary forms, with or without
138                modification, are permitted provided that the following conditions are met:
139                    * Redistributions of source code must retain the above copyright
140                    notice, this list of conditions and the following disclaimer.
141                    * Redistributions in binary form must reproduce the above copyright
142                    notice, this list of conditions and the following disclaimer in the
143                    documentation and/or other materials provided with the distribution.
144                    * The names of its contributors may not be used to endorse or promote
145                    products derived from this software without specific prior written
146                    permission.
147
148                THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &gt; AS IS &gt; AND
149                ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
150                WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
151                DISCLAIMED. IN NO EVENT SHALL WILLEM-HENDRIK THIART BE LIABLE FOR ANY
152                DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
153                (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
154                LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
155                ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
156                (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
157                SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
158                desc=""/>
159            </licensematcher>
160        </licensematcherlist>
161    </oatconfig>
162</configuration>