Back to skill

Security audit

huawei-cloud-sac-dify

Security checks for vulnerabilities and agentic risk

Overview

This cloud-deployment skill needs review because it can accept website agreements automatically and does not enforce private storage of cloud credentials.

Before use, remove automatic agreement clicks and store cloud keys in a private work directory with owner-only access. Use a restricted IAM identity, review downloaded templates and dependency versions, and approve the Terraform plan before changes. Credentials remain on disk until successful teardown. All bundled files were inspected, including the scanner's JavaScript gap; separately downloaded code remains 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (10)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The supplied command installs Playwright CLI; it does not provision Huawei Cloud resources, run Terraform, or deploy Dify. Although tooling installation can be a supporting implementation detail, this chunk provides no connection between the browser automation package and the declared deployment purpose. The command alone does not demonstrate browser execution or data access.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The supplied command sets up browser tooling; it does not provision Huawei Cloud resources or deploy Dify. The chunk provides no connection establishing browser installation as a supporting step for the declared Terraform/SAC deployment workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The supplied command installs browser tooling rather than provisioning Huawei Cloud resources or deploying Dify. Although browser tooling could support deployment verification, the supplied chunk establishes no such role, so its demonstrated behavior falls outside the declared purpose.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/playwright_utils.py (reported line 51)May include surrounding context.

python
config environment; mapping PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH onto those
    makes chromium (arm64/headless) the launch target instead of Google Chrome.
    """
    env = dict(os.environ)
    executable = resolve_chromium_executable()
    if executable:
        env["PLAYWRIGHT_MCP_BROWSER"] = "chromium"

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, 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.

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 · SKILL.md (reported line 29)May include surrounding context.

md
### Security

- 🚫 Never expose AK/SK in conversation or output
- 🚫 Never ask user to type AK/SK in chat
- ✅ Prefer IAM users over primary account
- ✅ Modification ops (`apply`, `destroy`) require explicit user confirmation

MCP server referenced without pinned version: 'npx playwright'.

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

Although this is a CLI invocation rather than an MCP server declaration, unversioned npx can fetch and execute a mutable package release when no suitable local package exists. A compromised release could execute with the installing user's privileges, which is particularly consequential on a workstation used for cloud deployment.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

Install — Linux / macOS

bash
curl -fsSL -o /tmp/terraform.zip "<URL_from_table_above>"
unzip -o /tmp/terraform.zip -d /usr/local/bin/

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

python
allow_failure: bool = False,
) -> subprocess.CompletedProcess:
    full_cmd = [*base_cmd, f"-s={session}", *args]
    proc = subprocess.run(
        full_cmd,
        capture_output=True,
        text=True,

Automatically clicks “同意” (“Agree”) without disclosing that it may accept consent or terms on the user's behalf.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The extraction script automatically clicks a button named “同意” without checking the dialog's purpose or obtaining authorization. A consent or terms dialog could therefore be accepted on the user's behalf, exceeding a workflow that only needs to read solution metadata and pricing.

Content

No source excerpt is available for this finding.