Back to skill

Security audit

huawei-cloud-waf-log-analysis

Security checks for vulnerabilities and agentic risk

Overview

This WAF analysis skill needs review because its command templates can mishandle hostile data and recommend changes that weaken protection.

Use dedicated read-only WAF credentials rather than the recommended write-enabled policy. Have command escaping, protection examples, and temporary-file cleanup corrected before relying on generated recommendations. Protect downloaded logs because they may contain sensitive request details. All seven artifact files were inspected, including the scanner's partial-coverage references; live cloud behavior was not tested.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
references/rule-recommendation-guide.md
Finding

Attacker-controlled event fields are inserted into executable shell recommendations without escaping

Content
View full analysis

Impact

If an observed value containing shell syntax is retained, executing the generated recommendation can run local commands unrelated to the authorized WAF change. For example, a User-Agent signature containing sqlmap$(Start-Process calc.exe) would invoke PowerShell command substitution when inserted unquoted. The guide also explicitly recommends matching shell operators in command-injection payloads, making unsafe characters relevant to the normal workflow.

Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (46)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose covers analysis and guidance on rule configuration, but does not declare applying configuration changes. The supplied command performs a state-changing WAF operation that can block matching traffic. This is a material capability beyond providing recommendations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description promises log analysis and configuration guidance, not execution of policy changes. The supplied commands perform state-changing WAF operations without any log retrieval or analysis. Although anticrawler rules are relevant to WAF protection, applying them is a materially different capability from providing recommendations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose covers investigation, reporting, and configuration recommendations, but does not declare applying changes. The supplied command performs a state-changing WAF operation that can enable or disable a rule. This is a materially additional capability, not merely a supporting implementation detail for log analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose covers investigation, reporting, and configuration guidance. The supplied command instead performs a state-changing rule-creation operation. Although related to WAF protection, executing configuration changes is materially different from recommending them, and the chunk contains no log analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Reading policy settings could support configuration guidance, but the UpdatePolicy commands perform operational changes beyond the declared analysis-and-recommendation scope. These changes can affect live traffic. The supplied chunk contains policy administration commands rather than the advertised log-analysis behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Viewing policy status can support configuration guidance, but the UpdatePolicy commands actively change protection settings. The declared purpose covers analysis and recommendations, not applying configuration changes. The supplied chunk also contains no log retrieval or attack analysis; its substantive behavior is enabling WAF policy modules.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose covers investigation, analysis, and configuration guidance. The supplied command instead calls CreateWhiteblackipRule with white=0 to create a blacklist rule. Applying a security configuration change is a materially distinct capability not disclosed by a description limited to recommendations and guidance.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose covers investigation, reporting, and configuration guidance, but does not disclose applying configuration changes. CreatePunishmentRule is a state-changing operation that can affect request blocking. The supplied chunk performs that operation rather than log analysis or recommendation generation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose covers investigation, analysis, and configuration guidance, but does not declare applying configuration changes. The supplied command performs a state-changing rule-creation operation and contains no log analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description promises analysis, recommendations, and configuration guidance, not execution of protection changes. The supplied command creates a WAF rule with white=0, a state-changing operation beyond the declared advisory scope. The chunk contains no log retrieval or analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The command invokes CreateAntileakageRule with policy, content, URL, and blocking-action parameters. This changes enforcement configuration. Although related to WAF protection, executing configuration changes is materially different from the declared analysis, recommendations, and guidance. The supplied chunk does not perform log analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared purpose covers analysis, recommendations, and configuration guidance, but does not declare applying policy changes. The supplied command performs a security configuration mutation by setting options.webshell=true. Although related to WAF protection, this write operation goes beyond the stated advisory scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The command invokes hcloud WAF CreateCustomRule with action.category=block, modifying a WAF policy and potentially affecting live traffic. Although the rule is relevant to the declared security-analysis purpose, applying protection changes is a materially additional capability beyond providing recommendations or configuration guidance. The chunk is a parameterized command template; it does not itself demonstrate execution or log analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The command is relevant to WAF protection, but executing it changes enforcement configuration. The declared purpose covers analysis, recommendations, and guidance, not direct creation of blocking rules. This is an additional state-changing capability, not merely a supporting detail of log analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared purpose covers investigation, analysis, and configuration guidance, but does not disclose applying policy changes. The supplied command performs a state-changing WAF operation that can affect traffic handling. Although related to WAF protection, executing recommendations is materially different from providing them.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Reading the policy supports the declared advisory purpose. However, UpdatePolicy changes live protection behavior and can block traffic. The description promises analysis, recommendations, and guidance, but does not disclose executing policy changes. The supplied chunk contains no log analysis or evidence-based validation of the proposed change.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose covers investigation, recommendations, and configuration guidance. The supplied command invokes CreateCcRule, a state-changing operation that applies a protection rule. Directly modifying WAF configuration is not declared.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Reading the policy supports the declared recommendation workflow. However, the UpdatePolicy command performs a state-changing operation that can affect traffic handling. The description promises analysis, recommendations, and guidance, but does not declare that the skill will apply policy changes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose covers investigation and configuration guidance, but the supplied shell command performs a state-changing UpdatePolicy operation. Applying protection changes is a materially additional capability not disclosed in the description. The policy ID is a placeholder, so successful execution requires substitution; the command's intended behavior is nevertheless policy modification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose covers analysis, recommendations, and configuration guidance. The supplied command instead performs a state-changing operation that creates and enables blocking behavior. This is a material enforcement capability not disclosed in the description, rather than a supporting detail of log analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The command calls CreateCustomRule with a block action, which changes live WAF configuration when executed with valid credentials and a policy ID. The declared purpose covers investigation, recommendations, and configuration guidance, but does not declare direct creation or activation of protection rules. Although the command appears in a reference guide and is relevant to WAF protection, its executable behavior exceeds advisory functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared purpose covers analysis, recommendations, and configuration guidance, but does not declare applying protection rules. If executed, CreatePunishmentRule changes WAF configuration. Although the command appears in a reference guide and may be illustrative, its executable behavior goes beyond the stated advisory scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The command uses CreateCustomRule with a block action, which changes cloud security configuration if executed. The declared purpose covers analysis, recommendations, and configuration guidance, but does not explicitly authorize applying rules. Although the command appears in a recommendation guide and could serve as an example, its executable behavior exceeds recommendation-only functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description covers investigation and configuration guidance, but does not declare applying configuration changes. UpdateIpGroup is a state-changing operation that can affect protection behavior wherever the group is used. Although the command appears in a reference guide and contains placeholders, its executable behavior exceeds analysis and recommendation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared purpose covers investigation, recommendations, and configuration guidance. The supplied command calls CreateWhiteblackipRule with white=0, which creates a blacklist rule. If executed, it changes WAF enforcement state, an operational capability not disclosed in the description. Although presented in a recommendation guide, the command itself performs the change rather than merely describing it.

Content

No source excerpt is available for this finding.