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 a name, no practical effect. 273. task policy: Default policy for projects under this task, this field is required and the specified policy must be defined in policylist. 284. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must be 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 excluded 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 anyone 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" == > 52& == > 53' == > 54< == > 55> == > 56--> 57<configuration> 58 <oatconfig> 59 <policylist> 60 <policy name="projectPolicy" desc=""> 61 <policyitem type="license" name="BSDStyleLicense" path=".*" desc="Some chromium build code is modified and used in the build repository, and the license and copyright information are retained."/> 62 <policyitem type="license" name="BSD-3-Clause" path=".*" desc="Some chromium build code is modified and used in the build repository, and the license and copyright information are retained."/> 63 </policy> 64 </policylist> 65 <filefilterlist> 66 <filefilter name="defaultFilter" desc="Files not to check"> 67 <filteritem type="filepath" name="common/musl/ld-musl-aarch64.path" desc="configuration file, this format doesn't support adding license header"/> 68 <filteritem type="filepath" name="common/musl/ld-musl-arm.path" desc="configuration file, this format doesn't support adding license header"/> 69 <filteritem type="filepath" name="common/musl/ld-musl-aarch64-asan.path" desc="configuration file, this format doesn't support adding license header"/> 70 <filteritem type="filepath" name="common/musl/ld-musl-arm-asan.path" desc="configuration file, this format doesn't support adding license header"/> 71 <filteritem type="filepath" name="common/asan/asan.options" desc="configuration file, this format doesn't support adding license header"/> 72 </filefilter> 73 <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies" > 74 <filteritem type="filepath" name="gn_helpers.py" desc="keep the chromium src copyright"/> 75 <filteritem type="filepath" name="print_python_deps.py" desc="keep the chromium src copyright"/> 76 <filteritem type="filepath" name="zip.py" desc="keep the chromium src copyright"/> 77 <filteritem type="filepath" name="config/BUILD.gn" desc="keep the chromium src copyright"/> 78 <filteritem type="filepath" name="config/BUILDCONFIG.gn" desc="keep the chromium src copyright"/> 79 <filteritem type="filepath" name="config/allocator.gni" desc="keep the chromium src copyright"/> 80 <filteritem type="filepath" name="config/arm.gni" desc="keep the chromium src copyright"/> 81 <filteritem type="filepath" name="config/deps_revisions.gni" desc="keep the chromium src copyright"/> 82 <filteritem type="filepath" name="config/features.gni" desc="keep the chromium src copyright"/> 83 <filteritem type="filepath" name="config/python.gni" desc="keep the chromium src copyright"/> 84 <filteritem type="filepath" name="config/sysroot.gni" desc="keep the chromium src copyright"/> 85 <filteritem type="filepath" name="config/v8_target_cpu.gni" desc="keep the chromium src copyright"/> 86 <filteritem type="filepath" name="config/zip.gni" desc="keep the chromium src copyright"/> 87 <filteritem type="filepath" name="config/ohos/BUILD.gn" desc="keep the chromium src copyright"/> 88 <filteritem type="filepath" name="config/ohos/abi.gni" desc="keep the chromium src copyright"/> 89 <filteritem type="filepath" name="config/ohos/config.gni" desc="keep the chromium src copyright"/> 90 <filteritem type="filepath" name="config/c.*/c.*.gni" desc="keep the chromium src copyright"/> 91 <filteritem type="filepath" name="config/clang/BUILD.gn" desc="keep the chromium src copyright"/> 92 <filteritem type="filepath" name="config/clang/clang.gni" desc="keep the chromium src copyright"/> 93 <filteritem type="filepath" name="config/compiler/BUILD.gn" desc="keep the chromium src copyright"/> 94 <filteritem type="filepath" name="config/compiler/compiler.gni" desc="keep the chromium src copyright"/> 95 <filteritem type="filepath" name="config/coverage/BUILD.gn" desc="keep the chromium src copyright"/> 96 <filteritem type="filepath" name="config/coverage/coverage.gni" desc="keep the chromium src copyright"/> 97 <filteritem type="filepath" name="config/gcc/BUILD.gn" desc="keep the chromium src copyright"/> 98 <filteritem type="filepath" name="config/linux/BUILD.gn" desc="keep the chromium src copyright"/> 99 <filteritem type="filepath" name="config/linux/pkg-config.py" desc="keep the chromium src copyright"/> 100 <filteritem type="filepath" name="config/linux/pkg_config.gni" desc="keep the chromium src copyright"/> 101 <filteritem type="filepath" name="config/mac/BUILD.gn" desc="keep the chromium src copyright"/> 102 <filteritem type="filepath" name="config/mac/mac_sdk.gni" desc="keep the chromium src copyright"/> 103 <filteritem type="filepath" name="config/mac/mac_sdk_overrides.gni" desc="keep the chromium src copyright"/> 104 <filteritem type="filepath" name="config/mac/sdk_info.py" desc="keep the chromium src copyright"/> 105 <filteritem type="filepath" name="config/mac/symbols.gni" desc="keep the chromium src copyright"/> 106 <filteritem type="filepath" name="config/mac/xcrun.py" desc="keep the chromium src copyright"/> 107 <filteritem type="filepath" name="config/ohos/copy_ex.gni" desc="keep the chromium src copyright"/> 108 <filteritem type="filepath" name="config/posix/BUILD.gn" desc="keep the chromium src copyright"/> 109 <filteritem type="filepath" name="config/posix/sysroot_ld_path.py" desc="keep the chromium src copyright"/> 110 <filteritem type="filepath" name="config/sanitizers/BUILD.gn" desc="keep the chromium src copyright"/> 111 <filteritem type="filepath" name="config/sanitizers/sanitizers.gni" desc="keep the chromium src copyright"/> 112 <filteritem type="filepath" name="scripts/copy_ex.py" desc="keep the chromium src copyright"/> 113 <filteritem type="filepath" name="scripts/find.py" desc="keep the chromium src copyright"/> 114 <filteritem type="filepath" name="scripts/util/build_utils.py" desc="keep the chromium src copyright"/> 115 <filteritem type="filepath" name="scripts/util/md5_check.py" desc="keep the chromium src copyright"/> 116 <filteritem type="filepath" name="misc/linux/sysroot_ld_path.sh" desc="keep the chromium src copyright"/> 117 <filteritem type="filepath" name="misc/mac/check_return_value.py" desc="keep the chromium src copyright"/> 118 <filteritem type="filepath" name="misc/mac/find_sdk.py" desc="keep the chromium src copyright"/> 119 <filteritem type="filepath" name="misc/overrides/build.gni" desc="keep the chromium src copyright"/> 120 <filteritem type="filepath" name="misc/overrides/gtest.gni" desc="keep the chromium src copyright"/> 121 <filteritem type="filepath" name="misc/sanitizers/asan_suppressions.cc" desc="keep the chromium src copyright"/> 122 <filteritem type="filepath" name="misc/sanitizers/lsan_suppressions.cc" desc="keep the chromium src copyright"/> 123 <filteritem type="filepath" name="misc/sanitizers/sanitizer_options.cc" desc="keep the chromium src copyright"/> 124 <filteritem type="filepath" name="misc/sanitizers/tsan_suppressions.cc" desc="keep the chromium src copyright"/> 125 <filteritem type="filepath" name="scripts/dir_exists.py" desc="keep the chromium src copyright"/> 126 <filteritem type="filepath" name="toolchain/BUILD.gn" desc="keep the chromium src copyright"/> 127 <filteritem type="filepath" name="toolchain/cc_wrapper.gni" desc="keep the chromium src copyright"/> 128 <filteritem type="filepath" name="toolchain/clang_static_analyzer.gni" desc="keep the chromium src copyright"/> 129 <filteritem type="filepath" name="toolchain/clang_static_analyzer_wrapper.py" desc="keep the chromium src copyright"/> 130 <filteritem type="filepath" name="toolchain/concurrent_links.gni" desc="keep the chromium src copyright"/> 131 <filteritem type="filepath" name="toolchain/gcc_link_wrapper.py" desc="keep the chromium src copyright"/> 132 <filteritem type="filepath" name="toolchain/gcc_solink_wrapper.py" desc="keep the chromium src copyright"/> 133 <filteritem type="filepath" name="toolchain/gcc_toolchain.gni" desc="keep the chromium src copyright"/> 134 <filteritem type="filepath" name="toolchain/get_concurrent_links.py" desc="keep the chromium src copyright"/> 135 <filteritem type="filepath" name="toolchain/get_cpu_count.py" desc="keep the chromium src copyright"/> 136 <filteritem type="filepath" name="toolchain/toolchain.gni" desc="keep the chromium src copyright"/> 137 <filteritem type="filepath" name="toolchain/wrapper_utils.py" desc="keep the chromium src copyright"/> 138 <filteritem type="filepath" name="toolchain/ohos/BUILD.gn" desc="keep the chromium src copyright"/> 139 <filteritem type="filepath" name="toolchain/linux/BUILD.gn" desc="keep the chromium src copyright"/> 140 <filteritem type="filepath" name="toolchain/mac/BUILD.gn" desc="keep the chromium src copyright"/> 141 <filteritem type="filepath" name="toolchain/mac/filter_libtool.py" desc="keep the chromium src copyright"/> 142 <filteritem type="filepath" name="toolchain/mac/get_tool_mtime.py" desc="keep the chromium src copyright"/> 143 <filteritem type="filepath" name="toolchain/mac/linker_driver.py" desc="keep the chromium src copyright"/> 144 <filteritem type="filepath" name="toolchain/ohos/BUILD.gn" desc="keep the chromium src copyright"/> 145 <filteritem type="filepath" name="toolchain/ohos/ohos_toolchain.gni" desc="keep the chromium src copyright"/> 146 </filefilter> 147 </filefilterlist> 148 149 </oatconfig> 150</configuration> 151