<?xml version="1.0" encoding="UTF-8"?>
<!--   Copyright (c) 2026 Huawei Technologies Co., Ltd.
       This program is free software, you can redistribute it and/or modify it under the terms and conditions of
       CANN Open Software License Agreement Version 2.0 (the "License").
       Please refer to the License for details. You may not use this file except in compliance with the License.
       THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
       INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
       See LICENSE in the root of the software repository for the full text of the License.
-->

<configuration>
    <oatconfig>
        <licensefile></licensefile>
        <policylist>
            <policy name="projectPolicy" desc="Project allowed licenses">
                <policyitem type="license" name="CANN-2.0" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="Approved CANN license"/>
                <policyitem type="license" name="BSD-style" path="src/ccu/xxhash_impl\.inc" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="Approved xxHash BSD 2-Clause license"/>
                <policyitem type="copyright" name="Huawei Technologies Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Approved copyright owner"/>
                <policyitem type="copyright" name="Yann Collet" path="src/ccu/xxhash_impl\.inc" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Approved xxHash copyright owner"/>
                <policyitem type="filetype" name="!binary" path=".*" rule="must" group="defaultGroup" filefilter="binaryFileTypePolicyFilter" desc="Reject binary files unless explicitly filtered"/>
            </policy>
        </policylist>
        <filefilterlist>
            <filefilter name="defaultFilter" desc="Files not to check">
            </filefilter>
            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility, license header policies">
                <filteritem type="filename" name="*.gitignore" desc="git ignore file"/>
                <filteritem type="filename" name="*.info" desc="metadata file"/>
                <filteritem type="filename" name="*.md" desc="documentation file"/>
                <filteritem type="filename" name="*.xml" desc="configuration file"/>
                <filteritem type="filename" name="*.yaml" desc="configuration file"/>
                <filteritem type="filename" name="*.yml" desc="configuration file"/>
                <filteritem type="filename" name=".clang-format" desc="tool configuration file"/>
                <filteritem type="filename" name="LICENSE" desc="license text"/>
                <filteritem type="filename" name="OAT.xml" desc="audit tool configuration file"/>
                <filteritem type="filename" name="SECURITY.md" desc="security statement"/>
                <filteritem type="filename" name="Third_Party_Open_Source_Software_List.yaml" desc="third party software list"/>
                <filteritem type="filename" name="Third_Party_Open_Source_Software_Notice" desc="third party notice"/>
                <filteritem type="filename" name="*.png" desc="image file"/>
            </filefilter>
            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
                <filteritem type="filename" name="*.gitignore" desc="git ignore file"/>
                <filteritem type="filename" name="*.info" desc="metadata file"/>
                <filteritem type="filename" name="*.md" desc="documentation file"/>
                <filteritem type="filename" name="*.xml" desc="configuration file"/>
                <filteritem type="filename" name="*.yaml" desc="configuration file"/>
                <filteritem type="filename" name="*.yml" desc="configuration file"/>
                <filteritem type="filename" name=".clang-format" desc="tool configuration file"/>
                <filteritem type="filename" name="LICENSE" desc="license text"/>
                <filteritem type="filename" name="OAT.xml" desc="audit tool configuration file"/>
                <filteritem type="filename" name="SECURITY.md" desc="security statement"/>
                <filteritem type="filename" name="Third_Party_Open_Source_Software_List.yaml" desc="third party software list"/>
                <filteritem type="filename" name="Third_Party_Open_Source_Software_Notice" desc="third party notice"/>
                <filteritem type="filename" name="*.png" desc="image file"/>
            </filefilter>
            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
            </filefilter>
            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
            </filefilter>
            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
            </filefilter>
            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
                <filteritem type="filename" name="*.png" desc="image file"/>
            </filefilter>
        </filefilterlist>
        <licensematcherlist>
            <licensematcher name="cann License" desc="If the scanning result is InvalidLicense, you can define matching rules here. Note that quotation marks must be escaped.">
                <licensetext name="
                    This program is free software, you can redistribute it and/or modify it under the terms and conditions of
                    CANN Open Software License Agreement Version 2.0 (the &quot;License&quot;).
                    Please refer to the License for details. You may not use this file except in compliance with the License.
                    THIS SOFTWARE IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
                    INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
                    See LICENSE in the root of the software repository for the full text of the License.
                " desc=""/>
            </licensematcher>
        </licensematcherlist>
    </oatconfig>
</configuration>