Back to skill

Security audit

huawei-cloud-obs-statistics

Security checks for vulnerabilities and agentic risk

Overview

This read-only storage tool needs review because its advertised scan limits are ineffective and incomplete statistics can appear complete.

Review before installing. Use dedicated read-only credentials restricted to the intended buckets, and confirm which account both execution paths use. Do not rely on --max-objects to bound collection or assume reports are complete until collection limits and pagination are corrected. Verify CLI downloads before installation. All 48 bundled offline tests passed, but additional mocked checks reproduced the limit defects; live cloud behavior and external dependency contents remain unverified.

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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (13)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The implementation does not propagate the requested object cap into collection, and CLI listings use a fixed limit without pagination or reliable truncation reporting. These defects undermine the resource-control and report-integrity guarantees of a statistics tool; appending a slash also silently changes prefix scope and can undercount matching objects.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The commands are read-only and use the declared OBS listing mechanism, so there is no evidence of unauthorized mutation or unrelated resource access. However, the supplied executable behavior is limited to two hard-coded listings, materially short of the described statistics tool. This assessment is limited to the supplied chunk; it does not establish whether the missing features exist elsewhere.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
86% confidence
Finding

The installation sequence trusts a mutable latest archive without an independently trusted checksum or signature, then installs its executable on the system PATH. Compromise of the distribution source could therefore introduce code that later runs with the user's cloud credentials; this is a supply-chain weakness rather than shell parameter injection.

Content

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

Linux (x86_64)

bash
curl -O https://obs-community-tool.obs.cn-north-1.myhuaweicloud.com/hcloudcli/latest/hcloudcli-linux-amd64.tar.gz
tar -xzf hcloudcli-linux-amd64.tar.gz
chmod +x hcloud
sudo mv hcloud /usr/local/bin/

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.

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 26)May include surrounding context.

curl -O https://obs-community-tool.obs.cn-north-1.myhuaweicloud.com/hcloudcli/latest/hcloudcli-linux-amd64.tar.gz tar -xzf hcloudcli-linux-amd64.tar.gz chmod +x hcloud sudo mv hcloud /usr/local/bin/

text

### macOS

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 54)May include surrounding context.

curl -O https://obs-community-tool.obs.cn-north-1.myhuaweicloud.com/obsutil/current/obsutil_linux_amd64.tar.gz tar -xzf obsutil_linux_amd64.tar.gz chmod +x obsutil_linux_amd64_/obsutil sudo mv obsutil_linux_amd64_/obsutil /usr/local/bin/

text

---

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 · references/cli-installation-guide.md (reported line 65)May include surrounding context.

credentials. The hcloud OBS ls command reads AK/SK/endpoint from the obsutil config file (~/.obsutilconfig).

Never ask the user to paste AK/SK directly into the conversation. Instruct them to run the following in their own terminal:

bash

The verification criteria mandate Chinese-language error messages without user opt-in or a documented justification.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

The pass criteria explicitly require error paths to emit a Chinese hint on stderr, reinforced by the verification expectations at lines 69–70 and 79. This imposes a specific natural language on user-facing diagnostics without offering a language choice or explaining a locale-specific requirement.

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

python
cmd.extend(extra)
    cmd.extend(argv)
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=300, universal_newlines=True,
        )

Tainted flow: 'cmd' from os.environ.get (line 226, 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/collect_obs_stats.py (reported line 232)May include surrounding context.

python
cmd.extend(extra)
    cmd.extend(argv)
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=300, universal_newlines=True,
        )

The primary CLI path can report a limited listing as complete statistics.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The CLI collectors request a fixed limited listing without pagination, while their lister adapters always return false for truncation. Larger scopes can consequently produce understated counts and capacity that appear complete, compromising the integrity of operational inventory and capacity decisions.

Content

No source excerpt is available for this finding.

The advertised --max-objects cap does not constrain object collection.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

collect_stats checks the object count only after the lister has fetched and retained its results, and resolve_listers does not pass the requested cap to the SDK. A small user-selected cap therefore does not bound collection, allowing excess API requests, memory consumption, and processing time within the lister's independent limits.

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

python
if index:
        cmd.extend(["-i", index])
    cmd.append(package)
    return subprocess.call(cmd) == 0


def ensure(upgrade=False):