All Products
Search
Document Center

AI Guardrails:QwenWork integration guide

Last Updated:Dec 02, 2026

QwenWork faces security risks at runtime, including prompt injection, sensitive data leakage, and malicious command execution, which are difficult to defend against relying solely on the model's own capabilities. This topic describes how to use AI Guardrails to build runtime security protection through a QwenWork native plugin, detecting and blocking potential threats in real time at the user input and model output stages, so that the Agent runs securely and under control.

Solution overview

QwenWork is a next-generation desktop AI workbench that supports calling large models through natural language instructions to complete various work tasks. However, at runtime, AI Agents face the following security risks:

  • Prompt Injection: Attackers use carefully crafted inputs to manipulate the model into outputting malicious content or performing unauthorized operations.

  • Sensitive data leakage: The model may accidentally expose sensitive content such as corporate secrets, API keys, or internal interface addresses when generating content.

  • Malicious command execution: Attackers induce the model to visit phishing links or download trojan files, threatening the security of the work environment.

Alibaba Cloud AI Guardrails provides protection for Agent inputs and outputs. Through the QwenWork native plugin, it detects risks in real time at both the user input (Prompt) and model output (Response) stages and blocks threatening requests. The protection mechanisms include:

  • Prompt injection detection: Performs input detection before a request is sent to the large model, identifies prompt injection and jailbreak attacks, and blocks maliciously crafted instructions to prevent the model from being manipulated into outputting malicious content or performing unauthorized operations.

  • Sensitive data leakage detection: At the input stage, masks sensitive information such as enterprise source code, API keys, and internal interface addresses so that real sensitive data does not reach the model side. At the output stage, detects and blocks sensitive information leakage in responses. It also supports reverting masked content, avoiding exposure of sensitive data during transmission and on the model side without affecting the normal user experience.

  • Malicious command execution detection: Performs output detection before the model response is returned to the user, identifies and filters malicious links and dangerous content such as phishing links and trojan file downloads, to prevent the AI Agent from being induced to perform operations that threaten the environment.

Prerequisites

Before installing the plugin, make sure that the environment meets the following requirements.

Environment dependencies

Confirm that the following installation is complete:

Item

Installation requirement

QwenWork

The QwenWork client is installed

Permission requirements

  • You must have an Alibaba Cloud account with access to the AI Guardrails console.

Install the plugin

Log on to the AI Guardrails console. In the left-side navigation pane, click Overview, find QwenWork in the Integrated Products section, and hover over it to see the complete integration steps in the popup.

The overall steps are as follows:

  1. Authorize the security plugin to call the AI Guardrails service

  2. Obtain the installation command

  3. Run the installation command

  4. Upload the installation package

Step 1: Authorize the security plugin to call the AI Guardrails service

  1. In the Service-Linked Role Authorization section, click Go to Authorize and follow the instructions to complete the authorization.

Step 2: Obtain the installation command

  1. In the popup, click the Add Configuration button to create a configuration with one click. The system generates the integration configuration and installation command. Alternatively, click Provisioning in the left-side navigation pane to create an integration configuration.

  2. Copy the installation command for the configuration. The command format is as follows:

    curl -fsSL https://update.aegis.aliyun.com/download/agent-security-installer/1.3.6/installer.sh -o installer.sh && chmod +x installer.sh && ./installer.sh pack --agent qoderwork --key <installation credential> --region cn
The installation credential is included in the --key parameter and is valid for 24 hours. After it expires, obtain it again from the console.

Step 3: Run the installation command

Open a local command-line tool, paste the installation command obtained in Step 2, and run it. The system automatically downloads the plugin installation package to your local machine.

macOS: Press Command + Space and type "Terminal" to open it.

Windows: Press Win + R and type cmd to open it.

After successful execution, the installation package is downloaded to the current execution directory by default. To specify an output path, add the --output parameter:

./installer.sh pack --agent qwenwork --key "<installation credential>" --region cn --output ./coding-agent-security.zip

Step 4: Upload the installation package

QwenWork has not yet launched enterprise-level management capabilities. The administrator unified installation method is coming soon. Currently, only personal installation is supported, where you upload the package yourself through the QwenWork client, suitable for individual users to integrate quickly.

Administrator installation

Not yet available. Stay tuned.

Personal installation

In the QwenWork client, go to Settings > Extension Management, click the Add button on the right side of the plugin list, and upload the coding-agent-security.zip plugin package generated in Step 3 to complete the installation.

Verify the installation result

After the plugin is installed, verify that the protection works properly.

  1. Confirm that the plugin is installed.

    Open the plugin management page of the QwenWork client and confirm that the plugin is installed and enabled.

  2. Test the protection effect.

    1. Send a test request.

      Send a test request through QwenWork that contains risky content such as sensitive words or abnormal commands.

    2. View the interception logs in the console.

      • Log on to the AI Guardrails console. In the left-side navigation pane, choose Detection Results > Result Query.

      • On the Real-Time Protection tab, filter by Service agent_runtime_guard and the relevant time conditions to view the interception logs.

  3. View the Agent protection status.

    Log on to the AI Guardrails console. In the left-side navigation pane, choose Agent Threat > Agent Overview. In the Agent List on the left, switch to Real-Time Protection to view the offline and online status of all Agents that have the protection plugin installed.

Modify the protection policy

After the plugin is installed, you can adjust the protection policy based on your business needs.

  1. Log on to the AI Guardrails console. In the left-side navigation pane, click Provisioning.

  2. On the Provisioning page, search for Security Plugins and find the configuration whose source is QwenWork.

  3. Click Edit, adjust the protection dimensions and disposition rules based on your business needs, and click Save when done. It takes effect immediately after saving, without reinstalling the plugin.

Uninstall the plugin

If you no longer need AI Guardrails to protect QwenWork, you can uninstall the plugin. Uninstalling removes the plugin and its configuration, and protection stops immediately.

Before uninstalling, we recommend that you:

  • Confirm in the console that there are no active protection policies.

  • Confirm that business traffic has been switched to another protection solution.

Administrator operations

Not yet available. Stay tuned.

Personal operations

In the Expert Suite of the QwenWork client, find the security protection plugin and select Uninstall / Remove.

Troubleshooting

If you encounter problems during installation or verification, refer to the following troubleshooting table.

Symptom

Possible cause

Troubleshooting steps

The pack command fails

The installer script is missing or lacks execute permissions

Confirm that the install.sh/install.ps1 file exists. On macOS/Linux, run chmod +x install.sh to grant execute permissions

The installation credential is invalid or expired

Return to the console to obtain the installation credential again and use it within its validity period

Network connection fails

Check the network connection and make sure that the Alibaba Cloud API is accessible

Plugin installed but not activated

The plugin is not loaded correctly

Restart QwenWork and check the plugin status again

The plugin configuration file is corrupted

Run the packaging and installation process again

Interception does not take effect

Console authorization is not completed

Log on to the console to check the authorization status and perform the authorization in Step 1 again

Console policy configuration is not enabled

Go to the policy configuration page and confirm that the protection dimensions are enabled

The test request does not trigger detection rules

Strengthen the risk characteristics of the test request (for example, add more obvious sensitive words)

No detection results in the console

The plugin is not properly connected to the Protection Server

Check the network connection and confirm that the plugin can access the Protection Server

Detection result reporting is delayed

Wait 1 to 2 minutes and refresh the console page

Data collection checklist

This plugin collects the following data for runtime protection, consistent with the data collection scope in OpenClaw integration guide.

This plugin does not collect the following sensitive information from standard HTTP request headers: Authorization, X-API-Key, API-Key, apikey, X-Auth-Token, auth-token, Cookie, Set-Cookie

Device and environment information

Data item

Description

Purpose

machine_id

Unique device identifier

Identifies the device for security auditing

platform

Operating system platform (such as macOS, Windows)

Identifies the runtime environment type

arch

CPU architecture (such as x64, arm64)

Adapts to platform characteristics

agent_type

Agent type (qoderwork)

Identifies the Agent source

agent_version

Agent version number

Adapts to version characteristics

LLM request/response content (security audit)

Data item

Description

Purpose

user_prompt

The prompt entered by the user

Detects prompt attacks and sensitive content

system_prompt

System prompt

Detects configuration risks

llm_response

Response content generated by the LLM

Detects content compliance and sensitive information leakage

model_name

Name of the model called

Analyzes model behavior characteristics

Tool Call information (security audit)

Data item

Description

Purpose

tool_name

Name of the tool called

Detects malicious tool calls

tool_input

Input parameters of the tool call

Detects injection attacks and sensitive information

tool_output

Return result of tool execution

Detects information leakage

error_message

Tool execution error message (if any)

Detects abnormal behavior

Data transmission description

Server endpoint

Transmitted data type

Transmission frequency

Encryption method

Management Server

Device information, Agent configuration

Once at plugin startup, and in real time on configuration changes

HTTPS + TLS 1.2+

Protection Server

LLM request/response, Tool Call information

In real time for each request

HTTPS + TLS 1.2+