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