17c2aad20Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 27c2aad20Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 37c2aad20Sopenharmony_ci 47c2aad20Sopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 57c2aad20Sopenharmony_ci you may not use this file except in compliance with the License. 67c2aad20Sopenharmony_ci You may obtain a copy of the License at 77c2aad20Sopenharmony_ci 87c2aad20Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 97c2aad20Sopenharmony_ci 107c2aad20Sopenharmony_ci Unless required by applicable law or agreed to in writing, software 117c2aad20Sopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 127c2aad20Sopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 137c2aad20Sopenharmony_ci See the License for the specific language governing permissions and 147c2aad20Sopenharmony_ci limitations under the License. 157c2aad20Sopenharmony_ci 167c2aad20Sopenharmony_ci 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. 177c2aad20Sopenharmony_ci 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. 187c2aad20Sopenharmony_ci 197c2aad20Sopenharmony_ci licensefile: 207c2aad20Sopenharmony_ci 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. 217c2aad20Sopenharmony_ci 227c2aad20Sopenharmony_ci policylist: 237c2aad20Sopenharmony_ci 1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here. 247c2aad20Sopenharmony_ci 2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 257c2aad20Sopenharmony_ci <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 267c2aad20Sopenharmony_ci 3. policyitem type: 277c2aad20Sopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 287c2aad20Sopenharmony_ci "license" is used to check source license header in the specified path; 297c2aad20Sopenharmony_ci "copyright" is used to check source copyright header in the specified path; 307c2aad20Sopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 317c2aad20Sopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 327c2aad20Sopenharmony_ci "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 337c2aad20Sopenharmony_ci 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. 347c2aad20Sopenharmony_ci 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. 357c2aad20Sopenharmony_ci 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. 367c2aad20Sopenharmony_ci 7. policyitem filefilter: Used to bind filefilter which define filter rules. 377c2aad20Sopenharmony_ci 7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code. 387c2aad20Sopenharmony_ci 8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 397c2aad20Sopenharmony_ci 407c2aad20Sopenharmony_ci Note:If the text contains special characters, please escape them according to the following rules: 417c2aad20Sopenharmony_ci " == " 427c2aad20Sopenharmony_ci & == & 437c2aad20Sopenharmony_ci ' == ' 447c2aad20Sopenharmony_ci < == < 457c2aad20Sopenharmony_ci > == > 467c2aad20Sopenharmony_ci--> 477c2aad20Sopenharmony_ci 487c2aad20Sopenharmony_ci<configuration> 497c2aad20Sopenharmony_ci <oatconfig> 507c2aad20Sopenharmony_ci <licensefile></licensefile> 517c2aad20Sopenharmony_ci <policylist> 527c2aad20Sopenharmony_ci <policy name="projectPolicy" desc=""> 537c2aad20Sopenharmony_ci <policyitem type="compatibility" name="GPL-2.0 WITH Linux-syscall-note" path="include/uapi/linux/.*" desc="Linux kernel license"/> 547c2aad20Sopenharmony_ci <policyitem type="compatibility" name="GPL-2.0" path="docs/conf.py" desc="Configuration file, nonparticipation in compilation"/> 557c2aad20Sopenharmony_ci <policyitem type="compatibility" name="LGPL-2.1" path=".*" desc="Dynamically linked by module hiprofiler"/> 567c2aad20Sopenharmony_ci <policyitem type="license" name="BSD-2-Clause" path=".*" desc="USDT license"/> 577c2aad20Sopenharmony_ci <policyitem type="copyright" name="Meta Platforms, Inc. and affiliates." path=".*" desc=""/> 587c2aad20Sopenharmony_ci <policyitem type="compatibility" path="BUILD.gn" desc="They are used in dynamic link mode."/> 597c2aad20Sopenharmony_ci <policyitem type="copyright" name="*" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/> 607c2aad20Sopenharmony_ci <policyitem type="license" name="*" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/> 617c2aad20Sopenharmony_ci </policy> 627c2aad20Sopenharmony_ci </policylist> 637c2aad20Sopenharmony_ci <filefilterlist> 647c2aad20Sopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 657c2aad20Sopenharmony_ci <filteritem type="filepath" name="fuzz/bpf-object-fuzzer_seed_corpus.zip" desc="The binary file in third party"/> 667c2aad20Sopenharmony_ci </filefilter> 677c2aad20Sopenharmony_ci <filefilter name="licenseFileNamePolicyFilter" desc="The source file in third party" > 687c2aad20Sopenharmony_ci <filteritem type="filename" name="LICENSE" desc="The source file in third party"/> 697c2aad20Sopenharmony_ci <filteritem type="filename" name="LICENSE.LGPL-2.1" desc="The source file in third party"/> 707c2aad20Sopenharmony_ci <filteritem type="filename" name="NOTICE" desc="The source file in third party"/> 717c2aad20Sopenharmony_ci </filefilter> 727c2aad20Sopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 737c2aad20Sopenharmony_ci <filteritem type="filename" name="*.sh|*.png|*.sym|*.bash|*.yaml|*.yml" desc="desc files"/> 747c2aad20Sopenharmony_ci <filteritem type="filepath" name="ci/.*" desc="ci files"/> 757c2aad20Sopenharmony_ci <filteritem type="filepath" name="docs/.*" desc="docs files"/> 767c2aad20Sopenharmony_ci <filteritem type="filepath" name="fuzz/.*" desc="fuzz files"/> 777c2aad20Sopenharmony_ci <filteritem type="filename" name="BPF-CHECKPOINT-COMMIT" desc="bpf checkpoint"/> 787c2aad20Sopenharmony_ci <filteritem type="filename" name="CHECKPOINT-COMMIT" desc="checkpoint commit"/> 797c2aad20Sopenharmony_ci <filteritem type="filepath" name="include/linux/.*" desc=""/> 807c2aad20Sopenharmony_ci <filteritem type="filepath" name="include/uapi/linux/.*" desc=""/> 817c2aad20Sopenharmony_ci <filteritem type="filepath" name="include/asm/.*" desc=""/> 827c2aad20Sopenharmony_ci </filefilter> 837c2aad20Sopenharmony_ci <filefilter name="copyrightPolicyFilter" desc=""> 847c2aad20Sopenharmony_ci <filteritem type="filepath" name="include/uapi/linux/*.h" desc="The file in third party"/> 857c2aad20Sopenharmony_ci <filteritem type="filepath" name="include/linux/*.h" desc="The file in third party"/> 867c2aad20Sopenharmony_ci <filteritem type="filename" name="LICENSE.BSD-2-Clause" desc="The file in third party"/> 877c2aad20Sopenharmony_ci <filteritem type="filename" name="src/bpf_helpers.h" desc="The file in third party"/> 887c2aad20Sopenharmony_ci </filefilter> 897c2aad20Sopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies"> 907c2aad20Sopenharmony_ci <filteritem type="filepath" name="include/uapi/linux/.*" desc="The file in third party"/> 917c2aad20Sopenharmony_ci <filteritem type="filename" name="LICENSE.BSD-2-Clause" desc="license bsd-2"/> 927c2aad20Sopenharmony_ci <filteritem type="filename" name="BUILD.gn" desc=""/> 937c2aad20Sopenharmony_ci <filteritem type="filename" name="LICENSE" desc="license bsd-2"/> 947c2aad20Sopenharmony_ci <filteritem type="filename" name="src/libbpf.map" desc=""/> 957c2aad20Sopenharmony_ci <filteritem type="filename" name="LICENSE.LGPL-2.1" desc=""/> 967c2aad20Sopenharmony_ci <filteritem type="filename" name="NOTICE" desc=""/> 977c2aad20Sopenharmony_ci <filteritem type="filename" name="src/bpf_helper_defs.h" desc=""/> 987c2aad20Sopenharmony_ci </filefilter> 997c2aad20Sopenharmony_ci </filefilterlist> 1007c2aad20Sopenharmony_ci </oatconfig> 1017c2aad20Sopenharmony_ci</configuration>