Back to skill

Security audit

huawei-cloud-ecs-export-excel

Security checks for vulnerabilities and agentic risk

Overview

The cloud inventory export matches its purpose, but setup weakens download security and the credential instructions contradict the code.

Before use, replace the setup helper with dependency installation in an isolated environment using certificate-verified package sources, without cloud credentials present during setup. Obtain KooCLI through the current official installation guide. Use credentials limited to ECS listing, understand that SDK fallback reads keys from your environment, and protect reports containing instance identifiers and network addresses.

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 for package mirrors

Content
View full analysis

Impact

A network interceptor can supply replacement packages and execute code with the setup process's privileges, including access to files and cloud credentials available to that account.

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)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The supplied script performs a materially different task: skill-specification linting. Its references to hcloud ECS ListServersDetails only search documentation for that text; they do not invoke the cloud API. It contains no instance retrieval, SDK fallback, output generation, pagination, or runtime write-intent guard. Although this could be ancillary development tooling in a larger skill, the declared description does not represent this chunk's primary behavior. No cloud mutation, credential transmission, or other malicious behavior is evident.

Content

No source excerpt is available for this finding.

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.

Requires Chinese workbook labels and error messages without user language choice.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

Lines 74–77 prescribe fixed Chinese workbook labels, and lines 86–87 explicitly require Chinese error hints on stderr. No user opt-in, language selection, or documented justification for restricting output to Chinese is provided.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

The subprocess call uses an argument list without a shell, so it does not present an evident shell-injection vulnerability. However, its caller installs dependencies from mirrors using --trusted-host, which disables TLS certificate verification for those hosts; an attacker able to intercept that traffic could substitute malicious packages that execute during installation or subsequent import. This is particularly consequential in a cloud-management environment where the Python process may have access to cloud credentials, regardless of the skill's read-only API intent.

Content

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

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_export_excel.py (reported line 319)May include surrounding context.

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

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

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/list_ecs_export_excel.py (reported line 319)May include surrounding context.

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

The unconditional claim that the script never reads AK/SK and delegates all authentication to KooCLI contradicts the documented SDK fallback.

Low
Category
Excessive Agency
Confidence
95% confidence
Finding

L39–L40 promise that the script never reads credentials and relies exclusively on the active KooCLI profile. However, L60–L63 explicitly describe the SDK fallback reading AK/SK from environment variables, making the stated authentication boundary misleading.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.