All Products
Search
Document Center

Secure Access Service Edge:Configure outbound file classification rules

Last Updated:Mar 31, 2026

When employees send files outside your organization, SASE inspects each transfer against your classification and categorization detection rules. Files that match a rule trigger the enforcement action defined in your outbound policy. This topic explains how to define those rules.

Prerequisites

Before you begin, ensure that you have:

  • Purchased the Office Data Protection Edition of SASE for Internet access security. For more information, see Billing overview and Get started

  • SASE app version 4.3.1 or later installed on your corporate endpoints

Configuration methods

SASE provides three ways to configure detection rules for outbound files. Choose the one that fits your situation:

MethodWhen to use
Built-in rulesStart here. SASE includes detection rules for common file types. Select them when creating an outbound policy—no additional setup required.
Custom rulesUse when built-in rules do not cover your requirements. Define conditions across multiple dimensions: file content, filename, file extension, and data source.
AI Recommendation libraryUse when you have completed asset mapping. The large model learns from your files and generates detection rules automatically.
Warning

To use detection rules from the AI Recommendation library, complete asset mapping first. The large model then learns from your files to intelligently generate the corresponding detection rules. For more information, see Create an asset mapping task.

Configure custom rules

Custom rules are built in two stages:

  1. Create data elements — Define the raw detection ingredients: sensitive word libraries (dictionaries and regular expressions), file extensions, and data sources.

  2. Create a detection rule — Combine those elements into a rule with conditions and a sensitivity level. SASE evaluates this rule against each outbound file.

Step 1: Create data elements

Data elements are the building blocks of custom detection rules. SASE organizes them across four tabs under Data Protection > Data Classification > Data Elements.

  1. Log on to the Secure Access Service Edge console.

  2. In the left navigation pane, choose Data Protection > Data Classification.

  3. On the Data Classification page, click the Data Elements tab.

image

Configure each tab as needed:

Dictionaries and regular expressions

Build sensitive word libraries that SASE matches against file names and file content.

To create a sensitive word library:

  1. Click Create Sensitive Word Library.

  2. In the Create Sensitive Word Library panel, set the following parameters and click OK.

    • Dictionary: Enter the words or phrases to detect. Add multiple entries at once by separating them with commas (,) and pressing Enter.

    • Regular Expression: Enter a custom regular expression. For example, ([A-Za-z0-9]+) matches one or more uppercase or lowercase letters or numbers. After entering the expression, click Test Regular Expression and enter a test string to validate it.

    ParameterDescription
    NameA name for the sensitive word library
    TypeSelect Dictionary or Regular Expression

Other operations:

  • Filter libraries by type or data source.

  • To delete a library, click Delete in the Actions column.

Important

A library associated with a detection rule cannot be deleted. Remove the association from the rule first.

Data types

SASE provides built-in algorithm classifications. When you configure a detection rule, select the appropriate algorithm classification. SASE uses it together with the file type to detect file content.

To see which detection rules use a given algorithm classification, check the Associated Rules column.

Data levels

SASE provides built-in algorithm categorizations. When you configure a detection rule, select the appropriate algorithm categorization. SASE uses it together with general definitions of data sensitivity and the amount of sensitive data to detect file content.

To see which detection rules use a given algorithm categorization, check the Associated Rules column.

File name extensions

SASE includes built-in file extensions. Add custom extensions to detect files by their extension.

To add a file extension:

  1. Click Add File Extension.

  2. In the Add File Extension panel, enter the file extension and click OK.

Other operations:

  • Filter extensions by data source.

  • To delete a custom extension, click Delete in the Actions column.

Data source

Register Web Applications and Code Repository as data sources. When a file downloaded from a registered source is sent outbound, SASE automatically triggers detection.

To add a data source:

  1. Click Create Application.

  2. In the Add Data Source panel, configure the fields for your source type:

    Web Applications:

    ParameterDescriptionExample
    Application NameA name for the application
    Application AddressThe URL and file path. Click Add to register multiple addresses.URL: www.aliyun.com/api/file; Path: /api/file

    Code Repository:

    ParameterDescription
    Repository NameA name for the repository
    Git Repository URLThe Git repository address
  3. Click OK.

Step 2: Create a detection rule

Detection rules combine data elements into conditions that SASE evaluates against each outbound file. Each rule belongs to a data category and carries a sensitivity level.

Create a detection rule

  1. Log on to the Secure Access Service Edge console.

  2. In the left navigation pane, choose Data Protection > Data Classification.

  3. On the Data Classification page, click the Identification Rules tab.

  4. In the Data Category area on the left, click Create, then click Create Category.

    image

  5. In the Create Category dialog box, enter a classification name and click OK.

  6. To the right of the data classification you created, click Create Rule Group.

    image

  7. In the Create Group panel, configure the following and click OK.

    ParameterDescription
    Rule name2–32 characters. Supports Chinese characters, letters, digits, hyphens (-), and underscores (_).
    Data categoryThe data classification this rule belongs to.
    Sensitivity levelThe sensitivity tier of the files this rule targets. See Sensitivity levels below.
    Rule configurationThe detection conditions. For example, a rule "Filename contains salary" flags any file whose name includes "salary". image Configure multiple conditions and set the logical relationship to AND or OR to match your business needs.

Sensitivity levels

LevelScope
L4: Confidential dataCustomers' sensitive personal information; macro-level feature data, predictive data, and credit data aggregated across departments. Unauthorized disclosure causes severe negative impacts, systemic threats, or major legal liability. Covers communication records of personnel involved in major decisions, investments, and financing.
L3: Secret/private dataCustomer information and business data aggregated at department level. Unauthorized disclosure could directly or indirectly harm the company, customers, or employees—leading to financial, commercial, or reputational losses and potential legal liability.
L2: Internal dataCompany data and customer information accessible only to employees or third parties who have signed a non-disclosure agreement. Unauthorized disclosure causes minor negative impacts.
L1: Public dataData that is publicly accessible or approved for public release. No security or legal risk from public dissemination.

Detection rule parameters

The Rule configuration section supports conditions across six dimensions. Set the logical relationship between conditions to AND or OR.

File name

OptionLogical connectionContent
KeywordInclude All, Include Any, Not IncludeEnter the text to detect.
DictionaryInclude All, Not IncludeSelect a dictionary from Data Elements > Dictionaries and regular expressions and set the number of hits.
Regular expressionInclude All, Not IncludeSelect a regular expression from Data Elements > Dictionaries and regular expressions and set the number of hits.

File content

OptionLogical connectionContent
KeywordInclude All, Include Any, Not IncludeEnter the text to detect.
DictionaryInclude All, Not IncludeSelect a dictionary from Data Elements > Dictionaries and regular expressions and set the number of hits.
Regular expressionInclude All, Not IncludeSelect a regular expression from Data Elements > Dictionaries and regular expressions and set the number of hits.
Algorithm recommended data typeInclude All, Include Any, Not IncludeSelect an algorithm classification from Data Elements > Data types.
Algorithm recommended data levelInclude Any, Not IncludeSelect an algorithm categorization from Data Elements > Data levels.

Data source

Logical connectionContent
Include Any, Not IncludeSelect applications by type. Multiple selections allowed.

Supported application types:

  • Instant messaging application: Lark, DingTalk, WeCom, WeChat, QQ, and others.

  • Web Applications: Applications configured on the Data Elements > Data source tab.

File type

OptionLogical connectionContent
File formatInclude Any, Not IncludeSelect common file formats. Multiple selections allowed.
File name extensionInclude Any, Not IncludeSelect a file extension configured on the Data Elements > File name extensions tab.

File size

Logical connectionContent
Greater Than or Equal To, Less Than or Equal To, Within [A,B]Enter the file size detection range.

File encryption

OptionContent
EncryptionSelect Yes or No.

Manage detection rules

You can edit, enable, disable, or extend custom detection rules and rules generated by the large model.

  • Edit: Click Edit Group Information to view and modify a detection rule.

  • Enable/Disable: Click the Rule status switch to toggle a detection rule.

  • Sub-rules: Create sub-rules under an existing detection rule for more granular control.

image

What's next