Back to skill

Security audit

huawei-cloud-ecs-list

Security checks for vulnerabilities and agentic risk

Overview

The skill supports read-only cloud inventory, with configuration and installation caveats.

Install KooCLI through Huawei's current official guide, use credentials limited to ECS listing, and keep secrets outside chat. Leave ECS_LIST_HCLOUD_BIN and ECS_LIST_HCLOUD_ARGS unset, use recognized regions, and treat printed inventory as sensitive. The SDK fallback does read credential variables despite the documentation's wording. The bundled installer and live authenticated behavior were not verified.

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
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

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.

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_ecs.py (reported line 261)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 255, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
87% confidence
Finding

ECS_LIST_HCLOUD_BIN selects an arbitrary executable, while ECS_LIST_HCLOUD_ARGS supplies unchecked leading arguments; neither passes through the operation guard. If an attacker can influence the process environment, these overrides can execute a different program with the agent's privileges and inherited credentials, bypassing the advertised read-only boundary even without a shell. Exploitation requires environment control, which the supplied source does not demonstrate is available to ordinary users.

Content

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