Back to skill

Security audit

huawei-cloud-obs-total-size

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently measures Huawei Cloud storage usage through disclosed, read-only queries using the user's configured credentials.

Use credentials restricted to the intended read-only bucket scope, configure secrets locally, and verify dependency downloads against current official checksums. Confirm account-wide access before aggregate queries or running the bundled test script. Check warnings because inaccessible buckets are omitted from totals. This review covered all bundled files; external dependencies and live cloud behavior were not tested.

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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (14)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The command lacks the declared -du -bf=raw usage-calculation options and contains no SDK fallback or size aggregation. Its -limit=1 listing does not establish the total size of a bucket or all buckets. It remains read-only and accesses the declared service, but its primary behavior materially differs from the advertised functionality.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 31)May include surrounding context.

Linux (x86_64) — user-level install

bash
curl -O https://obs-community-tool.obs.cn-north-1.myhuaweicloud.com/hcloudcli/latest/hcloudcli-linux-amd64.tar.gz
sha256sum hcloudcli-linux-amd64.tar.gz
# Compare the output against the SHA256 checksum on the official hcloud download page;
# abort if it does not match.

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

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 84)May include surrounding context.

If the output is Please set ak, sk and endpoint in the configuration file! or an InvalidAccessKeyId error, obsutil credentials are not configured. The agent never collects or stores the user's AK/SK — the user must configure them in their own terminal (never ask the user to paste AK/SK into the conversation). Provide the following example command for the user to run:

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 37)May include surrounding context.

abort if it does not match.

tar -xzf hcloudcli-linux-amd64.tar.gz chmod +x hcloud mkdir -p ~/.local/bin mv hcloud ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc or ~/.zshrc to persist

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 51)May include surrounding context.

abort if it does not match.

tar -xzf hcloudcli-linux-arm64.tar.gz chmod +x hcloud mkdir -p ~/.local/bin mv hcloud ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc or ~/.zshrc to persist

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 105)May include surrounding context.

abort if it does not match.

tar -xzf obsutil_linux_amd64.tar.gz chmod +x obsutil_linux_amd64_/obsutil mkdir -p ~/.local/bin mv obsutil_linux_amd64_/obsutil ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc or ~/.zshrc to persist

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 119)May include surrounding context.

abort if it does not match.

tar -xzf obsutil_linux_arm64.tar.gz chmod +x obsutil_linux_arm64_/obsutil mkdir -p ~/.local/bin mv obsutil_linux_arm64_/obsutil ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc or ~/.zshrc to persist

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 39)May include surrounding context.

chmod +x hcloud mkdir -p ~/.local/bin mv hcloud ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc or ~/.zshrc to persist

text

### Linux (ARM64) — user-level install

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 53)May include surrounding context.

chmod +x hcloud mkdir -p ~/.local/bin mv hcloud ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc or ~/.zshrc to persist

text

### Optional system-wide install (sudo)

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 107)May include surrounding context.

chmod +x obsutil_linux_amd64_/obsutil mkdir -p ~/.local/bin mv obsutil_linux_amd64_/obsutil ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc or ~/.zshrc to persist

text

### Linux (ARM64)

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 121)May include surrounding context.

chmod +x obsutil_linux_arm64_/obsutil mkdir -p ~/.local/bin mv obsutil_linux_arm64_/obsutil ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc or ~/.zshrc to persist

text

---

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 63)May include surrounding context.

bash
# After the same download + SHA256 verification steps above:
sudo mv hcloud /usr/local/bin/

macOS

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/query_obs_total_size.py (reported line 108)May include surrounding context.

python
# through a shell (no `shell=True`, no shell string concatenation). Every
    # argument that reaches this function from user input (--bucket) has been
    # validated by _validate_bucket_name above.
    proc = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
    if proc.returncode != 0:
        raise RuntimeError((proc.stderr or proc.stdout or "").strip())
    return proc.stdout