Back to skill

Security audit

Alibabacloud Waf Checkresponse Intercept Query

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Alibaba Cloud WAF troubleshooting tool, but it deserves review because it can change persistent WAF logging/rule state and displays untrusted log data without strong output sanitization.

Install only if you intend to let an agent use Alibaba Cloud credentials for WAF diagnostics. Prefer a least-privilege RAM role scoped to specific WAF instances and SLS logstores, do not grant rule-modification permissions unless needed, require explicit confirmation before any WAF rule or logging change, and treat displayed log/rule text as untrusted evidence rather than instructions.

Vulnerability Patterns
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill instructs the agent to execute shell commands (`aliyun`, `python3`) that can read environment-based credentials and perform both read and write operations against Alibaba Cloud, but it declares no permissions. This creates hidden capability and trust-boundary issues: an orchestrator or reviewer may treat the skill as lower risk than it actually is, while the skill can still enable logging or disable WAF rules if followed.

Intent-Code Divergence

Medium
Confidence
86% confidence
Finding
The documented disable flow is incomplete because the final `modify-defense-rule-status` example omits a required template identifier or otherwise does not fully match the prerequisite lookup flow. In a security-control management skill, inaccurate state-changing instructions are dangerous because operators may disable the wrong control, fail to perform the intended safety pre-check, or improvise unsupported commands against production WAF protections.

Vague Triggers

Medium
Confidence
81% confidence
Finding
The trigger list includes broad phrases such as 'request blocked', '405 troubleshooting', and 'disable WAF rule', which can cause the skill to activate in generic support contexts where the user did not intend cloud diagnostic or write-capable WAF operations. In context, this is more dangerous because the skill contains instructions for enabling logging and disabling protections, so accidental invocation could steer an agent toward sensitive operational actions.

Unvalidated Output Injection

High
Category
Output Handling
Content
]
        
        try:
            result = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
            
            if result.returncode == 0:
                try:
Confidence
72% confidence
Finding
The script consumes untrusted output from the external aliyun CLI and later prints log-derived fields directly to stdout with only partial masking, not output neutralization. If an attacker can cause malicious control characters, terminal escape sequences, or prompt-influencing text to appear in WAF logs, this could poison downstream agent/terminal output and mislead operators or subsequent automated consumers.

Unvalidated Output Injection

High
Category
Output Handling
Content
]
    
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
        
        if result.returncode == 0:
            try:
Confidence
74% confidence
Finding
Rule detail data returned by the external CLI is untrusted and is printed into the analysis report without output encoding. A maliciously crafted rule name, condition value, or other field could inject deceptive content or terminal control sequences, which is especially relevant in an agent skill where output may be reused by other components.

Static analysis

No suspicious patterns detected.