Back to skill

Security audit

huawei-cloud-ascend-op-mfu-calculator

Security checks for vulnerabilities and agentic risk

Overview

This calculator needs review because it adds automatic installation of unverified software and telemetry without explaining what data is sent.

Prefer running the bundled Python diagnoser directly without the installer or telemetry wrapper. Before enabling the CLI, require a pinned, integrity-verified release and documentation of collected data and reporting destinations. SKILL_QUALITY_REPORT=0 is a documented opt-out, but the downloaded reporting implementation was unavailable for verification.

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A local arithmetic and profiling skill introduces automatic installation of an unrelated executable and wraps calculations with a telemetry CLI. Although disclosed in the body, these actions unnecessarily expand the workflow's network, execution, and persistent-write trust boundaries.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied command performs a CLI upgrade rather than calculating MFU or analyzing Ascend operator performance. No connection is shown between upgrading this tool and implementing the declared functionality, so this is an undeclared capability rather than an established supporting implementation detail.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented automatic dependency introduces external executable acquisition and persistent installation into a workflow that only needs local Python calculations. Naming Huawei Cloud endpoints does not establish artifact integrity or justify installing additional software without explicit consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The supplied command only sets an exported environment variable; it performs no MFU calculation or profiling analysis. Its apparent quality-reporting configuration is not described by the declared purpose. The chunk does not show whether another component reads this variable, so actual suppression of reports cannot be confirmed.

Content

No source excerpt is available for this finding.

Code capability 'shell' detected in scripts/ensure_cli.sh but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
85% confidence
Finding

This Bash helper performs network downloads and persistent executable installation, exceeding the skill's declared Python-only tool scope. That is a least-privilege mismatch, although the source does not demonstrate that an enforcing runtime can actually be bypassed.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The matched curl-to-Python pipeline only parses JSON and does not directly execute downloaded Python. However, its remote version value controls the subsequent download of an executable archive that is extracted and installed without independent integrity verification, exposing future CLI execution to distribution-service compromise.

Content

Scanner excerpt · scripts/ensure_cli.sh (reported line 16)May include surrounding context.

sh
API_URL="https://skillsapi.developer.myhuaweicloud.com/api/quality/cli/latest"
OBS_BASE="https://obs-skills-repository.obs.cn-north-4.myhuaweicloud.com/skill-quality-cli"

V=$(curl -s "${API_URL}" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])' 2>/dev/null)
if [ -z "$V" ]; then
    echo "警告: 无法获取 skill-quality-cli 最新版本,跳过安装" >&2
    exit 0

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The highlighted pipeline parses remote JSON rather than executing a fetched script, so that narrow interpretation of the match is incorrect. The surrounding installer nevertheless uses the resulting version to fetch, extract, and persist executable code without artifact authentication, creating a genuine supply-chain risk.

Content

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

sh
API_URL="https://skillsapi.developer.myhuaweicloud.com/api/quality/cli/latest"
OBS_BASE="https://obs-skills-repository.obs.cn-north-4.myhuaweicloud.com/skill-quality-cli"

V=$(curl -s "${API_URL}" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])' 2>/dev/null)
if [ -z "$V" ]; then
    echo "无法获取 skill-quality-cli 最新版本" >&2
    exit 1

The skill adds automatic quality telemetry and CLI installation to a local MFU calculation workflow.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

Automatic telemetry and installation are unnecessary for computing MFU and are enabled without affirmative consent. The wrapper creates a potential reporting channel around user-supplied profiling operations, although the supplied documentation does not establish precisely what information is transmitted.

Content

No source excerpt is available for this finding.

The guide introduces automatic quality telemetry unrelated to operator MFU calculation.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The guide explicitly describes reporting as automatic and opt-out despite its lack of necessity for MFU calculations. It does not identify the transmitted fields or establish informed consent, creating a privacy risk without proving that sensitive profiling contents are actually uploaded.

Content

No source excerpt is available for this finding.

The skill downloads and persistently installs an unrelated quality-management CLI.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The helper resolves a mutable remote version, downloads an executable archive, and copies its contents into the user's executable directory without signature or digest verification. Compromise of the distribution service could therefore introduce persistent attacker-controlled code into an otherwise local calculation workflow.

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

sh
tar xzf "${TMPDIR}/sqc.tar.gz" -C "${TMPDIR}"

mkdir -p ~/.local/bin/skill-quality-cli.d
cp "${TMPDIR}/skill-quality-cli" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.bin" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.d/cli_entry.py" ~/.local/bin/skill-quality-cli.d/ 2>/dev/null

L12–L30 fetch and install an unrelated skill-quality CLI outside the MFU calculator's stated purpose.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

This installer downloads the remotely selected latest CLI archive and installs executable files without checking a signature or trusted digest. Manual invocation reduces unsolicited-installation risk, but does not prevent a compromised release source from supplying code that later runs with the user's privileges.

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

sh
curl -fsSL -o "${TMPDIR}/sqc.tar.gz" "${OBS_BASE}/v${V}/skill-quality-cli-v${V}-linux-${ARCH}.tar.gz"
tar xzf "${TMPDIR}/sqc.tar.gz" -C "${TMPDIR}"

mkdir -p ~/.local/bin/skill-quality-cli.d
cp "${TMPDIR}/skill-quality-cli" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.bin" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.d/cli_entry.py" ~/.local/bin/skill-quality-cli.d/ 2>/dev/null

The standalone trigger "bottleneck" can activate this Ascend-specific skill for unrelated requests (L006).

Low
Category
Trigger Abuse
Confidence
91% confidence
Finding

"Bottleneck" is common in discussions of business processes, networking, and general performance, not just Ascend operator analysis. Although the surrounding description establishes the intended domain, the explicit trigger list does not require that context for this broad term.

Content

No source excerpt is available for this finding.