Back to skill

Security audit

huawei-cloud-elb-list

Security checks for vulnerabilities and agentic risk

Overview

The inventory function fits its purpose, but unsafe dependency installation and command overrides require review before use.

Have the installer corrected before use: retain certificate verification, pin and verify dependencies in an isolated environment, and obtain KooCLI through Huawei's documented downloads. Use project-scoped read-only credentials, clear both command override variables, and choose or disable Markdown output. Downloaded installer and dependency contents remain outside the inspected bundle.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Error
Location
scripts/ensure_env.py
Finding

Dependency installation disables TLS certificate verification

Content
View full analysis

Impact

Substituted SDK packages can execute arbitrary code during installation or subsequent import, including accessing cloud credentials available to the process. This attack does not require compromising the legitimate mirrors.

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 (7)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, 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.

Acceptance criteria require Chinese-language user-facing messages without a language choice or documented justification.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The empty-list and permission-error criteria prescribe Chinese messages as required output. The file provides neither user opt-in nor a documented reason for imposing this language regardless of the user's preference.

Content

No source excerpt is available for this finding.

The installation workflow executes a downloaded shell script without warning about its access to the local system.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

The installation instructions execute a mutable remote shell script without verifying its integrity or authenticity beyond HTTPS. Compromise of the distribution endpoint could therefore result in arbitrary code execution with the invoking user's privileges, potentially exposing cloud credentials; the read-only ELB API restriction does not constrain installer execution.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
94% confidence
Finding

The subprocess call is not shell injection, but its reachable caller installs unpinned packages from third-party mirrors using --trusted-host, which relaxes HTTPS certificate verification for those hosts. A network or mirror attacker could supply malicious packages that execute during installation or subsequent import, with access to the process environment and potentially cloud credentials.

Content

Scanner excerpt · scripts/ensure_env.py (reported line 56)May include surrounding context.

python
def run_cmd(cmd, timeout=300):
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=timeout, universal_newlines=True,
        )

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

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The write-intent guard checks user arguments and the requested operation, but does not check the environment-selected executable or prepended arguments. An attacker-controlled executable can ignore the fixed ListLoadbalancers arguments entirely, so the promised read-only restriction is not an execution boundary when those environment values are attacker-influenced.

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_elb.py (reported line 246)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 240, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
92% confidence
Finding

ELB_LIST_HCLOUD_BIN selects the executable, while ELB_LIST_HCLOUD_ARGS supplies arguments without validation before execution. If an attacker can influence the inherited environment through launcher or workspace configuration, these hooks permit arbitrary executable selection and argument injection under the agent's privileges; exploitation depends on that environment-control capability, not shell metacharacters.

Content

Scanner excerpt · scripts/list_elb.py (reported line 246)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,
        )