Back to skill

Security audit

测试视角代码评审

Security checks for vulnerabilities and agentic risk

Overview

The skill itself is a QA code-review prompt, but it recommends an unpinned command that can install a larger third-party skill collection and change future agent behavior.

Install only if you are comfortable with a Chinese-language QA review skill that can read repository code and run shell commands. Do not run the recommended `npx skills add Kokxi/qa-test-skills` command unless you first verify the package source and pin a trusted version or commit, because it can install many additional skills that affect future agent behavior.

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
SKILL.md:8
Finding
Unpinned Third-Party Skill Installation Creates Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 8 and 52 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium **Classification**: T08: Insecure Dependencies ### Vulnerable Code Snippets Line 8: ```shell npx skills add Kokxi/qa-test-skills ``` Line 52: ```shell npx skills add Kokxi/qa-test-skills ``` ### Technical Analysis The Skill recommends executing an npm-resolved CLI through `npx` to retrieve and install content from the third-party `Kokxi/qa-test-skills` repository. Neither the CLI package version nor the repository revision is pinned to an immutable, previously reviewed release or commit. No checksum, signature, lockfile, or equivalent integrity validation is specified. Consequently, the content executed or installed when this command is used can differ from the content available when the Skill was audited. A compromise of the resolved npm package, its dependency chain, the remote repository, or the associated maintainer account could introduce attacker-controlled instructions or executable components. The command is presented as an optional recommendation rather than being automatically executed by the audited Skill. Therefore, this finding establishes a supply-chain exposure but does not establish that the referenced package or repository is currently malicious. ### Attack Path 1. A user or agent loads the Skill and follows its recommendation to install the complete Skill collection. 2. `npx` resolves and executes the unpinned `skills` package available at that time. 3. The CLI retrieves mutable content identified as `Kokxi/qa-test-skills`. 4. An attacker who has compromised the npm package, a transitive dependency, the remote repository, or a maintainer account supplies modified content. 5. The malicious installer or installed Skill content executes with the permissions granted to the invoking user or influences later agent sessions through a ...[truncated 823 chars]
Remediation
## Remediation Suggestions 1. Pin the `npx` CLI to an explicitly reviewed version instead of allowing dynamic resolution. 2. Pin the remote Skill collection to an immutable commit hash or signed release tag. 3. Publish and verify cryptographic checksums or signatures before installation. 4. Use a lockfile and a trusted internal registry or vetted mirror where practical. 5. Document the exact package source, repository revision, expected files, and required permissions. 6. Review downloaded Skill instructions and scripts before enabling them or granting tool access. 7. Run installation in a sandbox with minimal filesystem, network, credential, and execution privileges. 8. Clearly state that installation is optional and require explicit user confirmation before executing the command.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
MCP server references in the skill manifest without version pinning are a rug-pull risk.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The skill metadata and all user-facing instructions are presented only in Chinese, with no indication that the user may choose another language. This creates a locale/language constraint that is not documented as optional or justified as region-specific.

Intent-Code Divergence

Medium
Confidence
91% confidence
Finding
The manifest description explicitly limits the skill to change type, impact scope, dependencies, and minimal regression scope, and says not to look at full code logic. However, the body of the skill later includes review items such as business logic correctness, boundary handling, exception handling, data validation, performance impact, memory leaks, and resource contention, which are broader code-quality review tasks rather than test-impact-only analysis.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The invocation description includes generic phrases such as "代码评审", "看代码", and "代码变更", which can appear in many ordinary conversations and code-related tasks. The file does not provide exclusion conditions or negative examples to clarify when this skill should activate versus when other review or analysis skills should be used.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
Lines L063-L065 state that reading code is only for judging impact scope and that the skill does not assess code quality. Later sections instruct checking whether business logic is correct, whether exception handling is complete, whether validation is complete, and whether there are memory leaks or concurrency issues, which directly evaluates code quality and implementation correctness.

Static analysis

No suspicious patterns detected.