Back to skill

Security audit

huawei-cloud-eip-list

Security checks for vulnerabilities and agentic risk

Overview

This cloud inventory skill needs review because crafted region input can redirect authenticated requests, and command overrides weaken its read-only safeguards.

Wait for region validation and restricted command overrides before using this with cloud credentials. Use an IAM identity limited to EIP listing and keep credentials out of chat. The empty SARIF results do not resolve the source-backed concerns; 54 offline tests passed, while seven requiring the SDK were skipped.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (6)

SDK fallback constructs an unvalidated endpoint despite claiming to use official endpoints without guessing.

High
Category
Excessive Agency
Confidence
98% confidence
Finding

When region lookup fails, the SDK interpolates the unvalidated region into a credential-bearing endpoint URL. A region such as 'example.org/' produces 'https://vpc.example.org/.myhuaweicloud.com', whose actual hostname is attacker-controlled rather than a Huawei Cloud domain; this can redirect signed requests and expose access-key identifiers, signatures, project identifiers, and request metadata, though it does not directly transmit the secret key.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Environment-controlled executable and arguments bypass the promised read-only operation guard.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

This is the same underlying issue as TT2: the read-only check validates user arguments but not the executable or injected environment arguments that actually run. Although normal execution fixes the operation to ListPublicips, an environment-selected replacement executable need not honor that restriction, undermining the skill's advertised safety boundary; exploitation requires control over these environment settings.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/list_eip.py (reported line 219)May include surrounding context.

python
cmd.extend(extra)
    cmd.extend(argv)
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=120, universal_newlines=True,
        )

Tainted flow: 'cmd' from os.environ.get (line 213, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
88% confidence
Finding

EIP_LIST_HCLOUD_BIN selects an arbitrary executable, while EIP_LIST_HCLOUD_ARGS supplies unrestricted leading arguments; neither passes through the write-intent guard. If an attacker can influence the inherited environment without already having equivalent execution privileges, a nominally read-only query can execute attacker-chosen code with the process's permissions and inherited cloud credentials.

Content

Scanner excerpt · scripts/list_eip.py (reported line 219)May include surrounding context.

python
cmd.extend(extra)
    cmd.extend(argv)
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=120, universal_newlines=True,
        )

Acceptance criteria prescribe Chinese user-facing messages without a language choice or documented locale requirement.

Low
Category
Output Handling
Confidence
90% confidence
Finding

The empty-list and permission-error criteria specify Chinese messages as required output. No user language opt-in or justification for a Chinese-only locale is documented in this file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.