Back to skill

Security audit

huawei-cloud-functiongraph-list

Security checks for vulnerabilities and agentic risk

Overview

This read-only cloud inventory skill requires additional monitoring software whose data handling is unspecified and includes an installer that weakens download security.

Prefer a version with optional telemetry, authenticated pinned downloads, and normal certificate checks. Use narrowly scoped read-only cloud credentials. The documented reporting opt-out leaves the wrapper requirement in place. Scanner gaps were manually investigated, but the downloaded wrapper's collection behavior remains unverified; the supplied artifacts do not establish exfiltration or malicious intent.

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

Warning
Location
scripts/ensure_env.py
Finding

Dependency installation disables TLS certificate verification

Content
View full analysis

Impact

Arbitrary code execution during package installation or subsequent import, potentially exposing cloud credentials accessible to that process.

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
99% confidence
Finding

Requiring an unrelated executable installer broadens the trust boundary beyond the FunctionGraph listing operation and changes the local environment persistently. The dependency is mentioned in the documentation, so 'undeclared' is overstated, but that disclosure does not justify automatically installing code around authenticated cloud commands.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The workflow expands a read-only inventory request into installation and execution of an unrelated telemetry wrapper with persistent local changes. Although the body discloses this dependency, making it mandatory exposes credential-bearing operations to additional downloaded code without task-specific necessity; the supplied sources do not establish actual data exfiltration.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The matched request fetches JSON rather than executing a shell script, but its fields determine the executable subsequently downloaded and installed. A compromised release manifest can supply both a malicious artifact URL and its matching digest, so the existing checksum does not independently authenticate the installed code.

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, 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 execution workflow requires unrelated telemetry tooling and its automatic installation.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The mandatory wrapper instruction redirects an otherwise read-only task through unrelated downloaded telemetry software. That software runs in the cloud command's execution context and could access inherited credentials or inventory output, although its actual collection behavior is not provided.

Content

No source excerpt is available for this finding.

Acceptance criteria mandate Chinese-language output without user opt-in.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The criteria require specific Chinese messages for an empty region and an IAM authorization failure. No language choice or justification for requiring Chinese output is provided; a default cloud region does not establish the user's language preference.

Content

No source excerpt is available for this finding.

The guide mandates an unrelated quality-telemetry wrapper for every hcloud command.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The guide mandates installation and execution of an unrelated telemetry wrapper for authenticated cloud commands. Disabling reports does not remove the wrapper's execution privileges, and the supplied guide does not specify what data it can collect or transmit.

Content

No source excerpt is available for this finding.

Automatically downloads and persistently installs an unrelated skill-quality CLI.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

When invoked, this helper automatically installs an unrelated executable from a mutable remote manifest into the user's executable directory. SHA-256 verification and archive checks reduce corruption and extraction risks, but the digest comes from the same manifest and does not protect against compromise of that release source.

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; }

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

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 53)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,
        )

Installs an unrelated skill-quality CLI outside the FunctionGraph listing skill's stated purpose.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

This installer persistently places unrelated remote code into the user's executable path, broadening the trust needed for a read-only inventory task. Manual invocation reduces silent-installation risk, but the surrounding workflow makes this dependency mandatory rather than a separately authorized optional capability.

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