Back to skill

Security audit

huawei-cloud-sfs-list

Security checks for vulnerabilities and agentic risk

Overview

The inventory code is read-only, but an unverified installer source and inaccurate credential assurances warrant review before installation.

Install KooCLI through Huawei's official instructions and verify the download instead of running the supplied installer command. Use a dedicated read-only cloud identity, confirm the region, and understand that the SDK fallback directly reads environment credentials despite the documentation's assurances.

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

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Although these commands are read-only, they access IAM policy resources rather than SFS file systems. Reporting an SFS permission error does not imply authorization to enumerate or inspect IAM policies. The supplied chunk therefore introduces undeclared capabilities and conflicts with the explicit restriction to ListShares.

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.

The quick-start instructions execute a downloaded installer without warning about system changes or third-party code execution.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The guide downloads a mutable installer and immediately executes it without authenticating its contents or explaining its execution privileges and system changes. If the distribution endpoint or installer is compromised, this can execute arbitrary code with the invoking user's permissions, potentially exposing locally available cloud credentials. Installing a required CLI is legitimate, but this setup step falls outside the skill's read-only cloud-operation safeguards.

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_sfs.py (reported line 273)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 267, 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_sfs.py (reported line 273)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,
        )

Pass criteria require Chinese-language error hints without user language choice.

Low
Category
Output Handling
Confidence
97% confidence
Finding

The verification criteria explicitly require a Chinese hint on stderr for error paths. This imposes a specific output language without user opt-in or a documented justification for the language constraint.

Content

No source excerpt is available for this finding.

The script directly reads AK/SK credentials despite explicitly claiming it never does.

Low
Category
Excessive Agency
Confidence
100% confidence
Finding

The module documentation at L007–L009 states that credential resolution is delegated to hcloud/the SDK and that this script never reads AK/SK itself. However, L368–L385 explicitly retrieve access and secret keys from environment variables, and L442–L451 pass those values into BasicCredentials. This contradicts the documented credential-handling boundary, although credential use is justified by the SDK fallback.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.