Enable the Security Guardrail

Updated at:

The Security Guardrail detects security risks such as sensitive words, compliance violations, prompt poisoning, and brute-force attacks in content that you publish through MSE Nacos. Enable the Security Guardrail to check configurations and MCP services for security and compliance issues before they take effect.

Prerequisites

  • An MSE Nacos instance is created. For more information, see Create an MSE Nacos instance.

  • The Nacos instance runs Enterprise Edition with engine version 3.1.1.0 or later. Developer Edition and Professional Edition instances do not support the Security Guardrail feature.

  • For first-time use, you must complete service access authorization. Follow the on-screen instructions to authorize the AliyunServiceRoleForMSEEngineService service-linked role.

Features

The Security Guardrail provides the following detection capabilities:

Protection dimensionDescriptionProtection level options
Malicious URL detectionDetects whether the content contains dangerous URLs, such as malicious links and phishing sitesBlock None / Low-risk / Medium-risk / High-risk
Prompt attack detectionDetects malicious prompts, such as prompt injection attacks and jailbreak attacksBlock None / Low-risk / Medium-risk / High-risk
Content compliance detectionDetects whether the content meets regulatory requirements, including political, violent or terrorism-related, and prohibited contentBlock None / Low-risk / Medium-risk / High-risk
Sensitive content detectionDetects whether the content contains private information leaks, sensitive data, or similar contentBlock None / Low-risk / Medium-risk / High-risk

Protection levels

The protection level determines how the system handles detected risks. The levels range from the strictest policy (blocks the most content) to the most tolerant policy (blocks only the highest-severity content):

  • Block None: Logs the event only. Does not block any content or affect the publishing workflow.

  • Low-risk: Blocks content classified as low-risk or above, including medium-risk and high-risk content. This is the strictest policy.

  • Medium-risk: Blocks content classified as medium-risk or above, including high-risk content. Low-risk content is logged but not blocked.

  • High-risk: Blocks only content classified as high-risk. This is the most tolerant policy.

Configure the Security Guardrail

Enable the Security Guardrail

  1. Log on to the MSE console.

  2. In the left-side navigation pane, choose Microservices Registry > Instances.

  3. On the Instances page, click the name of the target instance to go to the instance details page.

  4. In the left-side navigation pane, choose Security Protection > Content Moderation Guardrail.

    Note

    The Security Guardrail feature is labeled as Content Moderation Guardrail in the MSE console navigation.

  5. Click Enable to enable the Security Guardrail feature.

    Note
    • After you enable the feature, the system checks published content for security and compliance risks, including private information leaks, malicious script injection, and non-compliant content.

    • First-time users must complete service access authorization. Follow the on-screen instructions to authorize the AliyunServiceRoleForMSEEngineService role.

Configure the protection strategy

  1. On the Protection Strategy Settings page, configure the Interception Policy for each protection dimension based on your business requirements.

    For each of the four dimensions -- Malicious URL detection, Prompt attack detection, Content compliance detection, and Sensitive content detection -- select a protection level: Block None, Low-risk, Medium-risk, or High-risk. For more information about each level, see Protection levels.

  2. Configure the Protection Scope and select the scenarios that require security checks:

    Configuration itemDescription
    Configuration creation and changeWhen selected, the system performs security checks when Nacos configurations are created or changed.
    MCP service creation and changeWhen selected, the system performs security checks when MCP servers are created or changed.
  3. Click Save Changes.

    Important

    The Security Guardrail takes effect immediately after you save the configuration. All subsequent publishing operations are checked based on the configured policies.

Verify the Security Guardrail

After you configure the Security Guardrail, the following actions occur when you publish a configuration or an MCP service:

  1. The system automatically checks the published content for security and compliance risks.

  2. Based on the configured protection policies, the system logs or blocks the content.

  3. You can go to the Security Guardrail console to view interception records.