Back to skill

Security audit

huawei-cloud-vpc-export-markdown

Security checks for vulnerabilities and agentic risk

Overview

The cloud queries are read-only, but insecure dependency installation and incompletely documented telemetry need review before use.

Avoid the bundled SDK installer until certificate verification is preserved; install dependencies separately from a verified source in an isolated environment. Set SKILL_QUALITY_REPORT=0 and skip the quality-CLI installers unless you have reviewed the wrapper and its telemetry policy. Use read-only VPC credentials and protect the exported inventory. All bundled files were inspected, but the remotely downloaded wrapper and its reporting 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

SDK installation disables TLS certificate verification for package mirrors

Content
View full analysis

Impact

Arbitrary Python code execution, with access to files and credentials available to that account. This is an exploitable installation defect, not evidence that the configured mirrors or packages are malicious.

Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • 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 supplied chunk is a software bootstrapper, not a VPC query or export implementation. Although the description mentions tests for a skill-quality-cli wrapper, it does not disclose automatically retrieving and installing that tool. This adds material network access and persistent executable installation beyond the described workflow. SHA256 verification and extraction checks mitigate installation risks but do not eliminate the description-behavior mismatch. No cloud mutation or credential exfiltration is evident in this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied chunk has a materially different purpose: installing skill-quality-cli. The description mentions tests for a quality-CLI wrapper, but does not disclose downloading and installing executable software. These persistent installation side effects go beyond incidental implementation details of local report generation. The script includes checksum and extraction safeguards, and it does not itself run the installed CLI or mutate cloud resources; those facts do not eliminate the description mismatch. This assessment is limited to the supplied installer, not unseen VPC-export code.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The initial fetch retrieves JSON rather than directly executing a script, but that JSON controls both the subsequently downloaded executable archive and its expected checksum. A compromised manifest service can therefore authorize arbitrary executable content, and the installer does not independently authenticate releases or restrict the selected download URL to approved HTTPS origins.

Content

Scanner excerpt · scripts/install_cli.sh (reported line 28)May include surrounding context.

sh
API_URL="https://skillsapi.developer.myhuaweicloud.com/api/quality/cli/latest"

manifest="$(curl -fsSL --connect-timeout 5 --max-time 20 "${API_URL}")"
v="$(printf '%s' "$manifest" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])')"
case "$(uname -s)" in
    Linux) ;;

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 guide prescribes mandatory quality telemetry and automatic installation of an unrelated CLI wrapper.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The guide makes an unrelated telemetry wrapper part of the normal command path and promotes automatic installation without a separate opt-in. This expands the trust boundary around credentialed cloud commands and their output, while the supplied material does not establish what telemetry is collected; disclosure and an opt-out reduce, but do not eliminate, that risk.

Content

No source excerpt is available for this finding.

Automatically downloads and persistently installs an unrelated quality CLI outside the VPC export workflow.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The readiness helper installs persistent executable code chosen by a live remote manifest, although this tool is unnecessary for VPC export. The checksum comes from that same manifest, so compromise of the manifest service can supply both a malicious executable and a matching checksum; archive traversal checks do not prevent this supply-chain attack.

Content

No source excerpt is available for this finding.

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 · scripts/ensure_cli.sh (reported line 89)May include surrounding context.

sh
echo "警告: 解压失败或 tar 包含不安全条目, 拒绝安装" >&2
        return 1
    fi
    mkdir -p ~/.local/bin/skill-quality-cli.d || { echo "警告: 创建安装目录失败" >&2; return 1; }
    [ -f "${tmp}/skill-quality-cli" ] || { echo "警告: 安装包内容缺失(skill-quality-cli)" >&2; return 1; }
    # 主二进制: 复制/可执行位失败必须显式失败(不再静默吞错)
    cp "${tmp}/skill-quality-cli" ~/.local/bin/skill-quality-cli || { echo "警告: 复制 skill-quality-cli 失败" >&2; return 1; }

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 56)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/export_vpc_markdown.py (reported line 400)May include surrounding context.

python
guard_write_intent(" ".join(extra))
    cmd = build_hcloud_command(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 398, 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/export_vpc_markdown.py (reported line 400)May include surrounding context.

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

The skill includes a persistent installer for an unrelated quality CLI, beyond its VPC-query and export purpose.

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

L26–L48 fetch a release manifest and executable package for skill-quality-cli, and L78–L88 install or overwrite executable files and supporting modules under ~/.local/bin. This capability is not required to query VPCs or generate local reports; the manifest's mention of wrapper tests does not explicitly declare software installation. Although manually invoked and checksum-verified, the installer still introduces a persistent software-installation capability outside the stated purpose.

Content

No source excerpt is available for this finding.

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 · scripts/install_cli.sh (reported line 78)May include surrounding context.

sh
echo "错误: 解压失败或 tar 包含不安全条目, 拒绝安装" >&2
        exit 1
    fi
mkdir -p ~/.local/bin/skill-quality-cli.d
cp "${tmp}/skill-quality-cli" ~/.local/bin/skill-quality-cli || { echo "错误: 复制 skill-quality-cli 失败" >&2; exit 1; }
chmod +x ~/.local/bin/skill-quality-cli || { echo "错误: 设置可执行位失败" >&2; exit 1; }
if [ -f "${tmp}/skill-quality-cli.bin" ]; then

The skill mandates Chinese report headers without offering a language choice.

Low
Category
Output Handling
Confidence
94% confidence
Finding

The report format requires fixed Chinese-language headers, including “VPC 名称”, “区域”, and “描述”, regardless of the user's language. No language opt-in or locale-specific justification is provided; the output-mode options change the format, not the language.

Content

No source excerpt is available for this finding.

The export requires Chinese-language column headers without offering a language choice.

Low
Category
Output Handling
Confidence
95% confidence
Finding

The acceptance criterion mandates specific Chinese labels for the exported Markdown table. It provides neither a user language opt-in nor a documented justification for requiring that output language.

Content

No source excerpt is available for this finding.