Back to skill

Security audit

huawei-cloud-obs-list-pdf

Security checks for vulnerabilities and agentic risk

Overview

The bucket-reporting function fits its purpose, but insecure dependency installation and incomplete query limits warrant review before use.

Before use, install reviewed dependencies in an isolated environment with certificate verification enabled, and use [Huawei's downloads and checksum files](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html). Use bucket-list-only credentials and keep secrets out of chat. Clear the extra-command environment overrides, and do not rely on SDK fallback to enforce endpoint or count restrictions. Run optional shell tests only with trusted paths and region values. All bundled files were inspected, including the scanner's partial-coverage areas; remote installer contents, downloaded dependencies and live cloud behavior remain unverified.

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

Content
View full analysis

Impact

A substituted dependency can execute code with the privileges of the user running setup and access files or credentials available to that account.

Vulnerability Patterns
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (11)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The command matches the declared read-only bucket-listing operation, but implements only that narrow portion of the advertised listing-and-reporting workflow. In particular, it does not generate a PDF, a central declared capability. The supplied code shows no OBS writes or unrelated resource access; the mismatch is missing advertised functionality rather than an undeclared dangerous operation.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The installation instructions execute a mutable remote shell script without checking a pinned digest or signature. HTTPS protects transport but does not prevent a compromised distribution endpoint from supplying code that runs with the user's permissions and could access cloud credentials.

Content

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

bash
# Linux/macOS quick start
curl -sSL https://cn-north-4-res.hcccloud.com/cli/latest/install.sh -o install.sh
bash install.sh
hcloud version

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.

The PDF report mandates Chinese headers and a Chinese title without offering a language choice or requiring user opt-in.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

The report format fixes the column labels in Chinese and specifies the title as OBS 桶列表, regardless of the user's language. No language selection or justification for Chinese-only output is provided; selecting a Huawei Cloud region does not establish a user language preference.

Content

No source excerpt is available for this finding.

The verification criteria mandate Chinese PDF labels and error messages without user language choice.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

Lines 65–68 fix the PDF title, headers, and summary label to Chinese, while lines 79–80 require Chinese error hints. These are explicit output-language requirements with no user opt-in or documented justification for a Chinese-only locale.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

The subprocess call itself uses an argument list safely, but its pip caller installs executable dependencies from mirrors using --trusted-host, which disables normal TLS certificate verification for those hosts. An attacker able to intercept mirror traffic could substitute packages, and the absence of pinned versions and hashes leaves no independent artifact-integrity check before installation or import.

Content

Scanner excerpt · scripts/ensure_env.py (reported line 83)May include surrounding context.

python
import subprocess

    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=timeout, universal_newlines=True,
        )

Extra hcloud arguments can change the query from listing buckets to listing objects.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The extra-arguments hook accepts positional OBS URLs that contain no blocked mutation keywords, allowing ls to enumerate objects rather than only buckets. This defeats the stated bucket-only capability boundary when the environment hook is influenced by a caller, although it does not itself bypass IAM or demonstrate a write operation.

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_obs_buckets_pdf.py (reported line 250)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 240, 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_obs_buckets_pdf.py (reported line 250)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,
        )

PDF headers and titles are fixed to Chinese without a user language choice.

Low
Category
Output Handling
Confidence
91% confidence
Finding

The module explicitly states that Chinese column headers are always written, and the fixed labels and title at lines 35–36 enforce that output language. No language opt-in, locale selection, or region-specific requirement justifying this restriction is provided.

Content

No source excerpt is available for this finding.

The SDK fallback silently ignores the endpoint override and returned-count cap.

Low
Category
Excessive Agency
Confidence
100% confidence
Finding

SDK fallback drops the requested endpoint, and its page_size parameter is never applied, so fallback can contact a different destination and return more inventory metadata than the caller requested. This is a limited scope-control failure rather than an IAM bypass, and it matters when callers rely on endpoint selection or the count cap to constrain processing and disclosure.

Content

No source excerpt is available for this finding.