1<?xml version="1.0" encoding="UTF-8"?> 2<!-- Copyright (c) 2022 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 <licensematcherlist> 51 <licensematcher name="zlib-acknowledgement" desc=""> 52 <licensetext name="For conditions of distribution and use, see copyright notice in zlib.h" desc=""/> 53 </licensematcher> 54 <licensematcher name="CC0 1.0" desc=""> 55 <licensetext name="This file is made available under the Creative Commons CC0 1.0" desc=""/> 56 </licensematcher> 57 <licensematcher name="MIT" desc=""> 58 <licensetext name="Licensed under MIT" desc=""/> 59 </licensematcher> 60 <licensematcher name="MIT" desc=""> 61 <licensetext name="This version is MIT like the rest of libwebsockets" desc=""/> 62 </licensematcher> 63 <licensematcher name="Andy Green" desc=""> 64 <licensetext name=' * Permission is hereby granted, free of charge, to any person obtaining a copy 65 * of this software and associated documentation files (the "Software"), to 66 * deal in the Software without restriction, including without limitation the 67 * rights to use, copy, modify, merge, publish, distribute, sublicefsme, and/or 68 * sell copies of the Software, and to permit persofsm to whom the Software is 69 * furnished to do so, subject to the following conditiofsm' desc=""/> 70 </licensematcher> 71 </licensematcherlist> 72 <filefilterlist> 73 <filefilter name="binaryFileTypePolicyFilter" desc="Files not to check"> 74 <filteritem type="filename" name="*.png" desc="Ignore this file, we do not use it."/> 75 <filteritem type="filename" name="*.jpg" desc="Ignore this file, we do not use it."/> 76 <filteritem type="filename" name="*.ico" desc="Ignore this file, we do not use it."/> 77 <filteritem type="filename" name="*.cert" desc="Ignore this file, we do not use it."/> 78 <filteritem type="filename" name="*.zip" desc="Ignore this file, we do not use it."/> 79 <filteritem type="filename" name="*.wav" desc="Ignore this file, we do not use it."/> 80 <filteritem type="filename" name="*.bz2" desc="Ignore this file, we do not use it."/> 81 <filteritem type="filename" name="*.index" desc="Ignore this file, we do not use it."/> 82 <filteritem type="filename" name="*.pv" desc="Ignore this file, we do not use it."/> 83 <filteritem type="filename" name="*.ppn" desc="Ignore this file, we do not use it."/> 84 <filteritem type="filename" name="*.exe" desc="Ignore this file, we do not use it."/> 85 <filteritem type="filename" name="*.pem" desc="Ignore this file, we do not use it."/> 86 <filteritem type="filename" name="*.bin" desc="Ignore this file, we do not use it."/> 87 </filefilter> 88 <filefilter name="defaultFilter" desc=""> 89 <filteritem type="filename" name="lws-mqtt.h" desc="Ignore this file, we do not use it."/> 90 <filteritem type="filename" name="smtp-sequencer.c" desc="Ignore this file, we do not use it."/> 91 </filefilter> 92 </filefilterlist> 93 <policylist> 94 <policy name="defaultPolicy" desc=""> 95 <policyitem type="compatibility" name="zlib-acknowledgement" path="win32port/zlib/.*" rule="may" 96 group="defaultGroup" 97 filefilter="defaultPolicyFilter" desc=""/> 98 <policyitem type="compatibility" name="CC0 1.0" path=".*" rule="may" 99 group="defaultGroup" 100 filefilter="defaultPolicyFilter" desc=""/> 101 <policyitem type="compatibility" name="Andy Green" path="lib/misc/fsmount.c" rule="may" 102 group="defaultGroup" 103 filefilter="defaultPolicyFilter" desc=""/> 104 </policy> 105 </policylist> 106 </oatconfig> 107</configuration> 108