Back to skill

Security audit

prompt-injection-drill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent local prompt-injection test generator, but its install instructions use a mutable global installer that users should review before running.

Review or avoid the one-command global install. Prefer installing only the reviewed prompt-injection-drill files from a pinned commit or verified archive, and run the script only on prompt files you intend to test.

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:76
Finding
Unpinned npm CLI Execution in Installation Instructions## Vulnerability Details **File Location**: `SKILL.md`, line 76 **Vulnerability Type**: Supply-chain risk from an unpinned executable dependency **Risk Level**: Medium **Complete Code Snippet**: ```bash # One-command installation using the Skills CLI npx skills add zhaoxinghua09-cell/agent-skills -g ``` ### Technical Analysis The documented installation command invokes the `skills` npm package through `npx` without specifying an exact package version or verifying its integrity. Depending on the local npm cache and configuration, `npx` may retrieve and execute mutable package content from the npm registry. This installation mechanism is not required by the Skill's core functionality. The actual runtime component, `scripts/prompt_injection_drill.py`, uses only the Python standard library and does not require npm. The unpinned CLI therefore expands the trust boundary and execution surface beyond the minimum privileges and dependencies needed to generate prompt-injection test cases. This finding does not establish that the current `skills` package is malicious. The vulnerability is that future or compromised registry content may be executed without ensuring that it matches an audited version. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or the relevant package publication process. 2. The attacker publishes a malicious or modified release under the package name resolved by `npx skills`. 3. A user follows the installation instructions in `SKILL.md`. 4. `npx` downloads and executes the mutable package version. 5. Malicious CLI or lifecycle behavior runs with the invoking user's privileges. 6. Because the command requests global installation through `-g`, modified Skill content may be placed into globally managed locations accessible to that user. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user running the installation comma ...[truncated 506 chars]
Remediation
## Remediation Suggestions 1. Pin the CLI to a reviewed, immutable version, for example: ```bash npx --yes skills@<reviewed-version> add zhaoxinghua09-cell/agent-skills -g ``` 2. Verify the package version and integrity against trusted release metadata before execution. 3. Avoid global installation where possible; install into a dedicated, non-privileged environment. 4. Prefer the documented Git installation method, but pin the repository to a reviewed commit or signed release rather than cloning a mutable branch: ```bash git clone https://github.com/zhaoxinghua09-cell/agent-skills.git cd agent-skills git checkout <reviewed-commit-hash> ``` 5. Document the expected package publisher, exact version, checksums, and verification procedure. 6. Since the runtime script is standard-library-only, offer a direct installation method that copies the audited files without executing an unrelated package manager CLI.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [agent_skills]

High
Category
YARA Match
Content
# 提示词注入演练器 / Prompt Injection Drill

Generate 8 categories of injection attack drills for your system prompt (role/instruction override, exfiltration, encoding bypass, tool abuse, forged authority, long-horizon, refusal bypass) + expected-behavior checklist for pre-launch red-teaming.

**Pain point**: Prompts ship untested: one 'ignore previous instructions' disarms them — broken not by experts but by random drive-by lines.

LGD-III 有门禁(上线前先挨一遍打) · TH-LGD-013

Part of the **LGD moat** (凡自治之物: registered / evidenced / gated).

Zero-dependency (stdlib only). See `scripts/` for CLI usage (`--help`).

© MedXpert × SynomosAI · LGD-Powered
Confidence
80% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Instruction Override

High
Category
Prompt Injection
Content
Generate 8 categories of injection attack drills for your system prompt (role/instruction override, exfiltration, encoding bypass, tool abuse, forged authority, long-horizon, refusal bypass) + expected-behavior checklist for pre-launch red-teaming.

**Pain point**: Prompts ship untested: one 'ignore previous instructions' disarms them — broken not by experts but by random drive-by lines.

LGD-III 有门禁(上线前先挨一遍打) · TH-LGD-013
Confidence
80% confidence
Finding
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Lp3

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding
The skill references copying files into agent skill directories and instructs the agent to work from SKILL.md workflows, while the static analyzer detected file read/write capability but the metadata does not declare any explicit tool scope or permissions. Undeclared capability boundaries make it harder for operators and agents to constrain execution safely, increasing the chance of unintended filesystem access or over-privileged use.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
This markdown file contains the user-facing name, description, usage guidance, and warnings entirely in Chinese, while the skill is not documented as region-specific and does not offer an alternate language path. That can violate language/locale policy because it effectively forces a specific language on users without opt-in.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The installation instruction uses `npx skills add ...` without pinning an exact package version, which can cause users to retrieve whatever version is current at execution time. This creates a supply-chain risk: a compromised or unexpected upstream release could alter behavior or introduce malicious code into the environment.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The module docstring, usage examples, CLI description, and output text are all presented only in Chinese. This creates a natural-language locale constraint without user opt-in or justification that the skill is intended only for Chinese-speaking users or a China-specific environment.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
This attestation is primarily written in Chinese, with only the title bilingualized, which can impose a language constraint on users who do not read Chinese. The policy allows locale constraints when users are given a choice or when the regional limitation is clearly justified, neither of which is stated here.

Natural-Language Policy Violations

Low
Confidence
82% confidence
Finding
The README presents core skill title and operational description partly in Chinese, including policy-like descriptors, without stating that language is optional or that another locale is available. This can create a language/locale policy issue if users are expected to consume the skill in a specific language without opt-in.

Static analysis

Detected: suspicious.prompt_injection_instructions

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
README.md:5