• 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    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.
17    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.
18
19    licensefile:
20    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.
21
22    policylist:
23    1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
24    2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
25    <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
26    3. policyitem type:
27        "compatibility" is used to check license compatibility in the specified path;
28        "license" is used to check source license header in the specified path;
29        "copyright" is used to check source copyright header in the specified path;
30        "import" is used to check source dependency in the specified path, such as import ... ,include ...
31        "filetype" is used to check file type in the specified path, supported file types: archive, binary
32        "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
33    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.
34    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.
35    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.
36    7. policyitem filefilter: Used to bind filefilter which define filter rules.
37    7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
38    8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
39
40    Note:If the text contains special characters, please escape them according to the following rules:
41    " == &quot; ;
42    & == &amp;
43    ' == &apos;
44    < == &lt;
45    > == &gt;
46-->
47
48<configuration>
49    <oatconfig>
50        <licensefile></licensefile>
51        <policylist>
52            <policy name="projectPolicy" desc="">
53                <!--policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="Process that runs independently, invoked by the X process."/-->
54                <!--policyitem type="license" name="LGPL" path=".*" desc="Dynamically linked by module X"/-->
55	 	        <!--policyitem type="copyright" name="xxx" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by X Company"/-->
56		        <policyitem type="compatibility" name="CC0 1.0 Universal" path="LICENSE" desc="compatible with license"/>
57                <policyitem type="license" name="CC0 1.0 Universal" path="LICENSE" desc="compatible with license"/>
58            </policy>
59        </policylist>
60        <filefilterlist>
61            <filefilter name="defaultFilter" desc="Files not to check">
62                <filteritem type="filepath" name="images/*" desc="not to check"/>
63                <filteritem type="filepath" name="vectors/*" desc="not to check"/>
64                <filteritem type="filename" name="*.sh" desc="not to check"/>
65            </filefilter>
66	        <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
67		        <filteritem type="filepath" name=".*.c" desc="no license header"/>
68		        <filteritem type="filepath" name=".*.h" desc="no license header"/>
69            </filefilter>
70	        <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
71                <filteritem type="filepath" name=".*.c" desc="no copyright header"/>
72                <filteritem type="filepath" name=".*.h" desc="no copyright header"/>
73            </filefilter>
74            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
75            </filefilter>
76            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
77            </filefilter>
78            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
79            </filefilter>
80            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
81            </filefilter>
82        </filefilterlist>
83        <licensematcherlist>
84            <licensematcher name="CC0 1.0 Universal" desc="If the scanning result is InvalidLicense, you can define matching rules here. Note that quotation marks must be escaped.">
85                <licensetext name="
86                        CC0 1.0 Universal
87
88                        Statement of Purpose
89
90                        The laws of most jurisdictions throughout the world automatically confer
91                        exclusive Copyright and Related Rights (defined below) upon the creator and
92                        subsequent owner(s) (each and all, an &quot;owner&quot;) of an original work of
93                        authorship and/or a database (each, a &quot;Work&quot; ).
94
95                        Certain owners wish to permanently relinquish those rights to a Work for the
96                        purpose of contributing to a commons of creative, cultural and scientific
97                        works (&quot;Commons&quot;) that the public can reliably and without fear of later
98                        claims of infringement build upon, modify, incorporate in other works, reuse
99                        and redistribute as freely as possible in any form whatsoever and for any
100                        purposes, including without limitation commercial purposes. These owners may
101                        contribute to the Commons to promote the ideal of a free culture and the
102                        further production of creative, cultural and scientific works, or to gain
103                        reputation or greater distribution for their Work in part through the use and
104                        efforts of others.
105
106                        For these and/or other purposes and motivations, and without any expectation
107                        of additional consideration or compensation, the person associating CC0 with a
108                        Work (the &quot;Affirmer&quot;), to the extent that he or she is an owner of Copyright
109                        and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
110                        and publicly distribute the Work under its terms, with knowledge of his or her
111                        Copyright and Related Rights in the Work and the meaning and intended legal
112                        effect of CC0 on those rights.
113
114                        1. Copyright and Related Rights. A Work made available under CC0 may be
115                        protected by copyright and related or neighboring rights (&quot;Copyright and
116                        Related Rights&quot;). Copyright and Related Rights include, but are not limited
117                        to, the following:
118
119                        i. the right to reproduce, adapt, distribute, perform, display, communicate,
120                        and translate a Work;
121
122                        ii. moral rights retained by the original author(s) and/or performer(s);
123
124                        iii. publicity and privacy rights pertaining to a person's image or likeness
125                        depicted in a Work;
126
127                        iv. rights protecting against unfair competition in regards to a Work,
128                        subject to the limitations in paragraph 4(a), below;
129
130                        v. rights protecting the extraction, dissemination, use and reuse of data in
131                        a Work;
132
133                        vi. database rights (such as those arising under Directive 96/9/EC of the
134                        European Parliament and of the Council of 11 March 1996 on the legal
135                        protection of databases, and under any national implementation thereof,
136                        including any amended or successor version of such directive); and
137
138                        vii. other similar, equivalent or corresponding rights throughout the world
139                        based on applicable law or treaty, and any national implementations thereof.
140
141                        2. Waiver. To the greatest extent permitted by, but not in contravention of,
142                        applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
143                        unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
144                        and Related Rights and associated claims and causes of action, whether now
145                        known or unknown (including existing as well as future claims and causes of
146                        action), in the Work (i) in all territories worldwide, (ii) for the maximum
147                        duration provided by applicable law or treaty (including future time
148                        extensions), (iii) in any current or future medium and for any number of
149                        copies, and (iv) for any purpose whatsoever, including without limitation
150                        commercial, advertising or promotional purposes (the &quot;Waiver&quot;). Affirmer makes
151                        the Waiver for the benefit of each member of the public at large and to the
152                        detriment of Affirmer's heirs and successors, fully intending that such Waiver
153                        shall not be subject to revocation, rescission, cancellation, termination, or
154                        any other legal or equitable action to disrupt the quiet enjoyment of the Work
155                        by the public as contemplated by Affirmer's express Statement of Purpose.
156
157                        3. Public License Fallback. Should any part of the Waiver for any reason be
158                        judged legally invalid or ineffective under applicable law, then the Waiver
159                        shall be preserved to the maximum extent permitted taking into account
160                        Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
161                        is so judged Affirmer hereby grants to each affected person a royalty-free,
162                        non transferable, non sublicensable, non exclusive, irrevocable and
163                        unconditional license to exercise Affirmer's Copyright and Related Rights in
164                        the Work (i) in all territories worldwide, (ii) for the maximum duration
165                        provided by applicable law or treaty (including future time extensions), (iii)
166                        in any current or future medium and for any number of copies, and (iv) for any
167                        purpose whatsoever, including without limitation commercial, advertising or
168                        promotional purposes (the &quot;License&quot;). The License shall be deemed effective as
169                        of the date CC0 was applied by Affirmer to the Work. Should any part of the
170                        License for any reason be judged legally invalid or ineffective under
171                        applicable law, such partial invalidity or ineffectiveness shall not
172                        invalidate the remainder of the License, and in such case Affirmer hereby
173                        affirms that he or she will not (i) exercise any of his or her remaining
174                        Copyright and Related Rights in the Work or (ii) assert any associated claims
175                        and causes of action with respect to the Work, in either case contrary to
176                        Affirmer's express Statement of Purpose.
177
178                        4. Limitations and Disclaimers.
179
180                        a. No trademark or patent rights held by Affirmer are waived, abandoned,
181                        surrendered, licensed or otherwise affected by this document.
182
183                        b. Affirmer offers the Work as-is and makes no representations or warranties
184                        of any kind concerning the Work, express, implied, statutory or otherwise,
185                        including without limitation warranties of title, merchantability, fitness
186                        for a particular purpose, non infringement, or the absence of latent or
187                        other defects, accuracy, or the present or absence of errors, whether or not
188                        discoverable, all to the greatest extent permissible under applicable law.
189
190                        c. Affirmer disclaims responsibility for clearing rights of other persons
191                        that may apply to the Work or any use thereof, including without limitation
192                        any person's Copyright and Related Rights in the Work. Further, Affirmer
193                        disclaims responsibility for obtaining any necessary consents, permissions
194                        or other rights required for any use of the Work.
195
196                        d. Affirmer understands and acknowledges that Creative Commons is not a
197                        party to this document and has no duty or obligation with respect to this
198                        CC0 or use of the Work.
199
200                        For more information, please see
201                        &lt;http://creativecommons.org/publicdomain/zero/1.0/&lt;
202                " desc=""/>
203	        </licensematcher>
204       </licensematcherlist>
205    </oatconfig>
206</configuration>
207