Back to skill

Security audit

Create AI Miniprogram

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its stated purpose, but users should review it because it directs agents to run unpinned CLI commands and install mutable remote skill content.

Install only if you trust the mp-skills package and the referenced TencentCloudBase skill repository. Prefer pinned versions or immutable commits, avoid the `--all` path unless you have reviewed the contents, run setup in a clean project environment, and inspect generated files and cloud configuration changes before connecting real credentials, AppIDs, payment settings, or production cloud resources.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:42
Finding
Unpinned Third-Party Packages and Skills Are Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 42-47, 66, 89, 108-120, and 134 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```markdown | `npx mp-skills new <name>` | 创建新项目骨架 | Step 2 | | `npx mp-skills add ... --skill <name>` | 安装 Skill | Step 3 | | `npx mp-skills add ... --all` | 安装全部 Skill | Step 3 备选 | | `npx mp-skills setup` | 初始化环境 | Step 4 引导 | | `npx mp-skills list` | 查看已安装 Skill | 用户要求查看时 | | `npx mp-skills validate <project-dir>` | 检查 Skill 质量 | 用户要求检查时 | 提示先安装:`npm install -g mp-skills` ``` ```bash npx mp-skills new <project-name> ``` ```bash npx mp-skills add TencentCloudBase/awesome-miniprogram-skills --skill greet-skill ``` ```bash npx mp-skills add TencentCloudBase/awesome-miniprogram-skills --skill <业务Skill名> ``` ```bash npx mp-skills add TencentCloudBase/awesome-miniprogram-skills --all ``` ```bash npx mp-skills setup ``` ### Technical Analysis The workflow instructs the agent to download and execute the `mp-skills` npm package without specifying an audited version or integrity value. Depending on the local npm and `npx` configuration, `npx mp-skills` can retrieve the package version currently resolved by the registry and execute its entry point. The workflow also installs content from `TencentCloudBase/awesome-miniprogram-skills` without pinning an immutable commit, release, or content digest. The `--all` alternative further increases the supply-chain attack surface by installing every available skill, including components that are not necessary for the requested project. No evidence establishes that the named package or repository is currently malicious. The weakness is that future or compromised upstream content could be executed without an immutable trust decision. ### Attack Path 1. An attacker compromises the npm package, its publisher account, the package registry resolution path, or the referenced skill repository. 2. The attacker publishes or inser ...[truncated 1218 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `mp-skills` to an explicitly audited version, for example: ```bash npx --yes mp-skills@<audited-version> new <validated-project-name> ``` 2. Record and verify the npm package integrity digest or signature before execution. 3. Prefer a project-local, lockfile-controlled dependency over `npm install -g`, reducing global environment exposure. 4. Pin `TencentCloudBase/awesome-miniprogram-skills` to an immutable commit or signed release rather than a mutable repository head. 5. Verify repository ownership, release signatures, and downloaded content before installation. 6. Remove the recommendation to install all skills with `--all`. Install only the minimum reviewed skills required for the requested functionality. 7. Run dependency installation and setup in a restricted development container or sandbox without unrelated credentials. 8. Add a mandatory review step before executing newly downloaded CLI versions, setup hooks, or skill scripts. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:89
Finding
Unvalidated User-Controlled Identifiers Are Interpolated into Shell Commands<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 89-90 and 114 **Vulnerability Type**: `T09: Insecure Skill Coding Practices` **Risk Level**: Medium ### Vulnerable Code ```bash npx mp-skills new <project-name> cd <project-name> ``` ```bash npx mp-skills add TencentCloudBase/awesome-miniprogram-skills --skill <业务Skill名> ``` ### Technical Analysis The documented workflow places project and skill identifiers directly into shell command positions but does not require validation, safe quoting, option termination, or argument-array process execution. These values are derived from the selected user requirements and may therefore be attacker-controlled. If an implementing agent performs literal string substitution and sends the resulting text to a shell, shell metacharacters such as `;`, `&&`, command substitutions, redirections, or newlines could change the intended command. Values beginning with `-` may also be interpreted as command-line options rather than identifiers. The exploitability depends on how the agent executes the documented commands. Argument-array execution without a shell would substantially reduce shell injection risk, but the Skill does not mandate that safer execution model. ### Attack Path 1. An attacker supplies a malicious project or skill name, such as a value containing a command separator followed by an additional shell command. 2. The agent substitutes that value into the command template without validation or escaping. 3. The agent executes the constructed command through a shell. 4. The shell parses the injected metacharacters and runs the attacker's additional command. 5. The injected command operates with the permissions and accessible environment of the agent or user running the workflow. ### Impact Assessment Successful exploitation could allow arbitrary local command execution under the invoking user's account. The attacker could read or modify accessible project files, alter generated source code, ins ...[truncated 485 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Validate project and skill names against strict allowlists before using them. For example: - Project names: `^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$` - Skill names: use only exact identifiers selected from a trusted catalog. 2. Reject whitespace, shell metacharacters, path separators, control characters, leading hyphens, and command substitutions. 3. Execute commands through an API that accepts an executable and argument array rather than constructing shell command strings. For example: ```text executable: npx arguments: ["--yes", "mp-skills@<pinned-version>", "new", validatedProjectName] ``` 4. Avoid a separate shell-based `cd` command. Set the child process working directory through the process execution API. 5. Where supported, use `--` to terminate option parsing before user-derived positional arguments. 6. Display the validated arguments to the user and require confirmation before execution. 7. Add negative tests covering semicolons, newlines, command substitution, redirection, traversal sequences, Unicode control characters, and leading-option inputs. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (14)

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill repeatedly instructs use of `npx mp-skills` without pinning an exact package version. `npx` may fetch the latest published package at execution time, so a compromised or malicious upstream release could run arbitrary code on the developer machine during project creation or setup. Because this skill is specifically designed to bootstrap new projects and asks users to run multiple `npx` commands, the exposure is amplified.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
This command reference uses `npx mp-skills add ...` without an exact version pin. That allows execution of whatever package version is current at runtime, creating a supply-chain execution path if the package or one of its published versions is hijacked. In a skill that automates adding capabilities to a project, this could lead to arbitrary code execution and repository compromise.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The `--all` install path uses unpinned `npx mp-skills`, compounding risk by potentially executing an untrusted latest CLI while also broadening the set of installed components. If upstream is compromised, the user could unknowingly execute malicious code and import unwanted code into the new project. The context of bulk installation makes the blast radius larger than a single optional command.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
`npx mp-skills setup` is an especially sensitive unpinned command because setup routines commonly create config files, initialize cloud resources, and modify local state. If an attacker controls the fetched package version, they could abuse those privileges to exfiltrate credentials or alter project configuration. The skill explicitly says setup is mandatory, increasing likelihood of execution.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
Although `npx mp-skills list` is less privileged than setup or project creation, it still executes package code from an unpinned latest version. A compromised package could still run arbitrary code before or during listing. The lower impact reflects the command's typical purpose, not reduced exploitability of untrusted package execution.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
`npx mp-skills validate <project-dir>` appears safety-related, but using an unpinned package to perform validation undermines trust in the result and still executes remote code. An attacker could supply a tampered validator that hides issues, alters files, or exfiltrates project contents. Security tooling invoked from untrusted latest packages is particularly dangerous because users may trust its output.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The unpinned `npx mp-skills eval` command can execute arbitrary code from the newest resolved package while also interacting with the generated application in end-to-end testing. If the upstream package is malicious, it could manipulate evaluation output, harvest environment data, or modify the project. Because users may run this as part of quality verification, the trust placed in the command increases risk.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The hard requirement to use `npx mp-skills new <name>` without version pinning bakes an unsafe execution pattern directly into the project creation workflow. This makes the risk systemic rather than incidental, because every user following the skill is directed to run mutable upstream code. In a bootstrap scenario, successful exploitation can taint the entire generated project from the start.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The instruction `npm install -g mp-skills` is also unpinned and globally installs the latest package version, creating a persistent compromise path if a malicious release is published. Global installation raises stakes because the binary remains available across projects and sessions. While this is not `npx`, it reflects the same supply-chain issue in the skill's installation guidance.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
This execution example again uses unpinned `npx mp-skills new <project-name>`, exposing users to arbitrary code from the latest package during initial scaffold generation. Since scaffold tools create files, scripts, and config, a compromised release could implant malicious code into the generated project. The skill's purpose—creating a fresh application—makes this especially sensitive.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill installation command executes an unpinned latest `mp-skills` package while also pulling additional remote skill content. This creates layered supply-chain risk: compromise of the CLI can lead to code execution, and compromise of fetched skill sources can taint the project. In a tool whose role is to import functionality into codebases, that context increases danger.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
This business-skill add command repeats the same unpinned `npx` execution risk and introduces remote content into the project. If the CLI or the referenced skill source is malicious or tampered with, attackers could inject code into the generated mini-program or development environment. The context of adding application features directly to source code raises the potential impact.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The `--all` variant is the riskiest installation example because it uses an unpinned CLI and maximizes dependency intake in one step. A compromised package or repository could introduce a broad set of malicious or vulnerable components into the project with minimal user scrutiny. The convenience-oriented wording may encourage unsafe bulk installation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The mandatory follow-up instruction to run `npx mp-skills setup` without version pinning is dangerous because setup commonly touches cloud configuration, local secrets, and project files. A malicious fetched version could silently modify deployment settings, capture credentials, or backdoor generated code. The skill context explicitly directs the user to perform this action after installation, making exploitation likely if upstream is compromised.

Static analysis

No suspicious patterns detected.