1<?xml version="1.0" encoding="UTF-8"?> 2<!-- Copyright (c) 2021 Huawei Device Co.|Ltd. 3 Licensed under the Apache License|Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing|software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND|either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 15 Notes: 16 This is project config file for OpenHarmony OSS Audit Tool|if you have any questions or concerns|please email chenyaxun. 17--> 18<!-- OAT(OSS Audit Tool) configuration guide: 19basedir: Root dir|the basedir + project path is the real source file location. 20licensefile: 211.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. 22 23tasklist(only for batch mode): 241. task: Define oat check thread|each task will start a new thread. 252. task name: Only an name|no practical effect. 263. task policy: Default policy for projects under this task|this field is required and the specified policy must defined in policylist. 274. task filter: Default filefilter for projects under this task|this field is required and the specified filefilter must defined in filefilterlist. 285. task project: Projects to be checked|the path field define the source root dir of the project. 29 30 31policyList: 321. policy: All policyitems will be merged to default OAT.xml rules|the name of policy doesn't affect OAT check process. 332. policyitem: The fields type|name|path|desc is required|and the fields rule|group|filefilter is optional,the default value is: 34<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 353. policyitem type: 36 "compatibility" is used to check license compatibility in the specified path; 37 "license" is used to check source license header in the specified path; 38 "copyright" is used to check source copyright header in the specified path; 39 "import" is used to check source dependency in the specified path|such as import ... ,include ... 40 "filetype" is used to check file type in the specified path|supported file types: archive|binary 41 "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 42 434. 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. 445. 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. 456. 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. 467. policyitem filefilter: Used to bind filefilter which define filter rules. 478. filefilter: Filter rules|the type filename is used to filter file name|the type filepath is used to filter file path. 48 49Note:If the text contains special characters|please escape them according to the following rules: 50" == > 51& == > 52' == > 53< == > 54> == > 55--> 56<configuration> 57 <oatconfig> 58 <licensefile>COPYING</licensefile> 59 <policylist> 60 <policy name="projectPolicy" desc=""> 61 <policyitem type="compatibility" name="GPL-2.0" path="filter/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="imagetoraster独立进程使用,依赖的cups和cupsfilters动态链接库"/> 62 <policyitem type="compatibility" name="GPL-2.0" path="cupsfilters/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="cupsfilters动态链接库, imagetoraster独立进程使用"/> 63 <policyitem type="compatibility" name="GPL-2.0+" path="mime/cupsfilters.types" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="配置文件, 被cups服务读取"/> 64 <policyitem type="compatibility" name="LGPLStyleLicense" path="cupsfilters/ipp.h" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="cupsfilters动态链接库, imagetoraster独立进程使用"/> 65 <policyitem type="compatibility" name="LGPLStyleLicense" path="cupsfilters/ipp.c" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="cupsfilters动态链接库, imagetoraster独立进程使用"/> 66 </policy> 67 </policylist> 68 <licensematcherlist> 69 <licensematcher name="GPL-2.0" desc="" > 70 <licensetext name=" 71 * These coded instructions, statements, and computer programs are the 72 * property of Apple Inc. and are protected by Federal copyright 73 * law. Distribution and use rights are outlined in the file "COPYING" 74 * which should have been included with this file. 75 " desc=""/> 76 <licensetext name=" 77 PDF file output routines. 78 " desc=""/> 79 <licensetext name=" 80 # License: GPL-2.0 81 " desc=""/> 82 </licensematcher> 83 <licensematcher name="LGPL-2.1+" desc="" > 84 <licensetext name=" 85 under the terms of the GNU Lesser General Public License as 86 " desc=""/> 87 </licensematcher> 88 <licensematcher name="MIT License" desc="" > 89 <licensetext name=" 90 // MIT Licensed. 91 " desc=""/> 92 </licensematcher> 93 </licensematcherlist> 94 <filefilterlist> 95 <filefilter name="defaultFilter" desc="Files not to check"> 96 <filteritem type="filename" name="ChangeLog" desc="修改日志信息"/> 97 <filteritem type="filename" name="COPYING" desc="COPYING信息"/> 98 <filteritem type="filename" name="AUTHORS" desc="作者信息"/> 99 <filteritem type="filename" name="INSTALL" desc="安装指导信息"/> 100 <filteritem type="filename" name="install-sh" desc="安装脚本信息"/> 101 <filteritem type="filename" name="Makefile.am" desc="编译脚本信息"/> 102 </filefilter> 103 <filefilter name="copyrightPolicyFilter" desc="Files not to check"> 104 <filteritem type="filepath" name="cupsfilters/.*" desc="动态链接方式使用"/> 105 <filteritem type="filepath" name="filter/.*" desc="动态链接方式使用"/> 106 <filteritem type="filepath" name="backend/.*" desc="动态链接方式使用"/> 107 <filteritem type="filepath" name="mime/.*" desc="驱动配置文件,只读,没有修改"/> 108 <filteritem type="filepath" name="drv/.*" desc="没有使用"/> 109 <filteritem type="filepath" name="banners/.*" desc="没有使用"/> 110 <filteritem type="filepath" name="utils/.*" desc="没有使用"/> 111 <filteritem type="filepath" name="fontembed/.*" desc="没有使用"/> 112 <filteritem type="filepath" name="ppd/.*" desc="没有使用"/> 113 <filteritem type="filepath" name="m4/.*" desc="没有使用"/> 114 <filteritem type="filepath" name="data/.*" desc="没有使用"/> 115 <filteritem type="filepath" name="scripting/.*" desc="没有使用"/> 116 <filteritem type="filepath" name="charset/.*" desc="没有使用"/> 117 <filteritem type="filepath" name="autogen.sh" desc="没有使用"/> 118 <filteritem type="filepath" name="configure.ac" desc="没有使用"/> 119 <filteritem type="filepath" name="ln-srf" desc="没有使用"/> 120 </filefilter> 121 <filefilter name="defaultPolicyFilter" desc="Files not to check"> 122 <filteritem type="filepath" name="cupsfilters/.*" desc="除了单列,其它动态链接方式使用"/> 123 <filteritem type="filepath" name="fontembed/.*" desc="没有使用"/> 124 <filteritem type="filepath" name="banners/.*" desc="没有使用"/> 125 <filteritem type="filepath" name="drv/.*" desc="没有使用"/> 126 <filteritem type="filepath" name="mime/.*" desc="除了单列,其它驱动配置文件只读,没有修改"/> 127 <filteritem type="filepath" name="charset/.*" desc="没有使用"/> 128 <filteritem type="filepath" name="autogen.sh" desc="没有使用"/> 129 <filteritem type="filepath" name="configure.ac" desc="没有使用"/> 130 <filteritem type="filepath" name="ln-srf" desc="没有使用"/> 131 <filteritem type="filepath" name="filter/.*" desc="除了单列,其它都没有参与编译使用"/> 132 <filteritem type="filepath" name="filter/common.c" desc="动态链接方式使用"/> 133 <filteritem type="filepath" name="filter/common.h" desc="动态链接方式使用"/> 134 <filteritem type="filepath" name="filter/imagetoraster.c" desc="动态链接方式使用"/> 135 <filteritem type="filepath" name="cupsfilters/testdriver.c" desc="代码没有参与编译"/> 136 <filteritem type="filepath" name="cupsfilters/testimage.c" desc="代码没有参与编译"/> 137 <filteritem type="filepath" name="pcl-common.h" desc="代码没有参与编译"/> 138 <filteritem type="filepath" name="mime/cupsfilters-ghostscript.convs" desc="代码没有参与编译"/> 139 <filteritem type="filepath" name="cupsfilters/testrgb.c" desc="代码没有参与编译"/> 140 <filteritem type="filepath" name="cupsfilters/testdither.c" desc="代码没有参与编译"/> 141 <filteritem type="filepath" name="cupsfilters/testcmyk.c" desc="代码没有参与编译"/> 142 <filteritem type="filepath" name="mime/cupsfilters-mupdf.convs" desc="代码没有参与编译"/> 143 <filteritem type="filepath" name="mime/cupsfilters-poppler.convs" desc="代码没有参与编译"/> 144 <filteritem type="filepath" name="implicitclass.c" desc="代码没有参与编译"/> 145 <filteritem type="filepath" name="scripting/.*" desc="代码没有参与编译"/> 146 <filteritem type="filepath" name="backend/.*" desc="代码没有参与编译"/> 147 <filteritem type="filepath" name="ppd/.*" desc="代码没有参与编译"/> 148 <filteritem type="filepath" name="data/.*" desc="代码没有参与编译"/> 149 <filteritem type="filepath" name="utils/.*" desc="代码没有参与编译"/> 150 <filteritem type="filepath" name="m4/.*" desc="代码没有参与编译"/> 151 <filteritem type="filepath" name="data/unclassified.ps" desc="PostScript文件, 没有参与编译"/> 152 <filteritem type="filepath" name="data/confidential.ps" desc="PostScript文件, 没有参与编译"/> 153 <filteritem type="filepath" name="data/topsecret.ps" desc="PostScript文件, 没有参与编译"/> 154 <filteritem type="filepath" name="data/classified.ps" desc="PostScript文件, 没有参与编译"/> 155 <filteritem type="filepath" name="data/standard.ps" desc="PostScript文件, 没有参与编译"/> 156 <filteritem type="filepath" name="data/secret.ps" desc="PostScript文件, 没有参与编译"/> 157 </filefilter> 158 <filefilter name="binaryFileTypePolicyFilter" desc="二进制文件校验策略的过滤条件" > 159 <filteritem type="filepath" name="data/confidential.pdf" desc="pdf文件"/> 160 <filteritem type="filepath" name="data/unclassified.pdf" desc="pdf文件"/> 161 <filteritem type="filepath" name="data/default-testpage.pdf" desc="pdf文件"/> 162 <filteritem type="filepath" name="data/default.pdf" desc="pdf文件"/> 163 <filteritem type="filepath" name="drv/cupsfilters.drv" desc="drv驱动示例文件"/> 164 <filteritem type="filepath" name="data/form_english.pdf" desc="pdf文件"/> 165 <filteritem type="filepath" name="data/form_english_in.odt" desc="odt文档文件"/> 166 <filteritem type="filepath" name="drv/generic-brf.drv" desc="drv驱动示例文件"/> 167 <filteritem type="filepath" name="data/form_russian.pdf" desc="pdf文件"/> 168 <filteritem type="filepath" name="drv/generic-ubrl.drv" desc="drv驱动示例文件"/> 169 <filteritem type="filepath" name="data/form_russian_in.odt" desc="odt文档文件"/> 170 <filteritem type="filepath" name="drv/indexv3.drv" desc="drv驱动示例文件"/> 171 <filteritem type="filepath" name="drv/indexv4.drv" desc="drv驱动示例文件"/> 172 <filteritem type="filepath" name="data/secret.pdf" desc="pdf文件"/> 173 <filteritem type="filepath" name="data/standard.pdf" desc="pdf文件"/> 174 <filteritem type="filepath" name="data/classified.pdf" desc="pdf文件"/> 175 <filteritem type="filepath" name="data/topsecret.pdf" desc="pdf文件"/> 176 </filefilter> 177 </filefilterlist> 178 </oatconfig> 179</configuration>