Back to skill

Security audit

AI 测试提示词策略

Security checks for vulnerabilities and agentic risk

Overview

The skill is a QA prompt-template helper, but it repeatedly recommends installing an unpinned external skill bundle.

Review the external `Kokxi/qa-test-skills` bundle before running the recommended install command, prefer a pinned version or commit with integrity checks, and install it only in an environment where changing the available skill set is acceptable. The reviewed single skill is otherwise a prompt-template document with limited declared tools.

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 48 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium **Complete Code Snippet**: ```text npx skills add Kokxi/qa-test-skills ``` The same installation command is recommended at both identified locations. ### Technical Analysis The documentation recommends using `npx` to retrieve and install the third-party skill collection `Kokxi/qa-test-skills`. The command does not pin the installer or skill collection to an immutable package version, release, or commit hash. It also provides no checksum, integrity metadata, signature verification, or mandatory review procedure. Consequently, the content installed when a user follows this recommendation can differ from the content available when this project was audited. If the package registry entry, upstream repository, maintainer account, installer, or distribution channel is compromised, the command could introduce unreviewed instructions or executable components into the agent environment. The audited file does not establish that the referenced dependency is currently malicious. The vulnerability is the unsafe and mutable dependency acquisition mechanism. ### Attack Path 1. An attacker compromises the upstream package, repository, maintainer account, or distribution channel used by the installation command. 2. The attacker publishes a modified installer or skill collection under the expected mutable identifier. 3. A user follows the recommendation in `SKILL.md` and executes: ```text npx skills add Kokxi/qa-test-skills ``` 4. `npx` resolves and runs the available installer, which retrieves or installs the attacker-modified content. 5. The malicious or unreviewed skills become available in the agent environment and may subsequently influence agent behavior or execute with the permissions granted to the installer and agent runtime. ### Impact Assessment ...[truncated 584 chars]
Remediation
## Remediation Suggestions 1. Pin both the `npx` installer and the referenced skill collection to reviewed, immutable versions or commit hashes. 2. Publish and verify cryptographic checksums or signatures for all downloaded artifacts. 3. Use an explicitly trusted registry or official repository rather than relying on mutable identifiers. 4. Add instructions requiring users to download and inspect the package contents before installation. 5. Run installation with least privilege in an isolated environment, without access to production credentials or sensitive files. 6. Document the files, permissions, scripts, and agent capabilities introduced by the dependency. 7. Replace both occurrences of the mutable installation command, including the duplicate recommendation at line 48. 8. Present the external collection as optional unless it is technically required, rather than encouraging users to install a broad unreviewed skill set.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (5)

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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The skill metadata instructs users to run `npx skills add Kokxi/qa-test-skills` without pinning a specific version. Because `npx` resolves the latest package by default, a future compromised or malicious release could be fetched and executed unexpectedly, creating a software supply-chain risk.

Vague Triggers

Medium
Confidence
95% confidence
Finding
L010 的 when_to_use 包含“提示词”“角色扮演”“换个方式问”等高频、泛化表达,这些短语可出现在大量普通对话中,且未提供边界或排除条件。描述没有明确限定必须是在测试用例生成或 QA 工作流上下文中触发,容易与一般性 AI 提问优化需求发生重叠。

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
This repeated install instruction again references `npx skills add Kokxi/qa-test-skills` without a version pin. Repetition increases the likelihood that users will execute an unpinned remote package command, exposing them to unexpected code execution if the upstream package or dependency chain changes.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
L257-L277 以“国产大模型适配”为默认适配方向,并在 L263-L276 持续强调中文/国产模型的提示词约束,但未说明这是可选场景,也未给出其他语言或模型生态的选择方式。该自然语言表述会把技能默认收敛到特定语言/locale 使用方式,缺少用户 opt-in。

Static analysis

No suspicious patterns detected.