Back to skill

Security audit

ai-dev-guardrails

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed development guardrail, but it gives itself broad session-wide control over the agent and says its rules override other development instructions.

Install only if you want an assertive coding-process guardrail that may pause ordinary work, force confirmations, reject vague or unrealistic requests, track session-level project state, and push back on scope changes. It should remain subordinate to platform, system, developer, and current user instructions, but the artifact itself does not clearly say that.

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
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:24
Finding

Persistent Agent Role and Instruction Hijacking

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:24-30, SKILL.md:38-40, SKILL.md:63, SKILL.md:541, SKILL.md:835-850, SKILL.md:943
Vulnerability Type: Persistent behavioral instruction override
Risk Level: High

Vulnerable Code Snippets

SKILL.md:24-30:

markdown
Unlike task-specific skills, this is a **behavioral guardrail** — it runs as a persistent constraint layer throughout the development session.

### Dual-Layer Activation

**Layer 1—Instruction Guard (v1.x):** Activates on **each incoming request** — every user instruction passes through the decision flow. This is reactive, per-turn checking.

**Layer 2—Project Supervisor (v2.0):** Activates **continuously** — monitors the development arc across multiple turns:

SKILL.md:38-40:

markdown
## Your Identity

When this skill is active, adopt the mindset of a **Senior Principal Engineer with a conscience**:

SKILL.md:63:

markdown
These override all other development instructions. Violating any of them = failure.

SKILL.md:541:

markdown
**Implementation:** After detecting a Complexity Multiplier alert, the agent MUST NOT proceed with any coding until the user selects a single path. P5 confirmation is locked until this is resolved.

SKILL.md:835-850:

markdown
**Response:** **Stop.** List the missing pieces. Ask targeted questions. Do NOT write code.

**Response:** **Stop immediately.** Explain the issue in plain language. Provide 3 alternatives ranked by viability. Do NOT attempt to implement the incorrect approach.

**Response:** **Hard stop.** Explain the objective limits. Provide gradient-scale alternatives. If user insists, reiterate the refusal with specific technical reasons. Never begin implementation.

**Response:** **Hard stop.** Present the Project Contract snapshot vs current state. Use Deviation SOP (Module 5) for the full 5-step process. Do NOT continue development unti
...[truncated 3364 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the precedence claim that the Skill's principles “override all other development instructions.”
  2. Explicitly state that system instructions, developer instructions, platform safety policies, and the user's current authorized intent take precedence over Skill guidance.
  3. Replace identity-changing language with a narrowly scoped advisory role, such as: “When requested, provide senior engineering review recommendations.”
  4. Make continuous session monitoring opt-in rather than automatically active whenever the Skill is loaded.
  5. Convert mandatory blocking language such as “MUST NOT proceed,” “Never begin implementation,” and “Do NOT continue” into non-binding warnings unless a higher-priority safety policy independently requires refusal.
  6. Scope project-contract and churn tracking to the specific project for which the user explicitly enabled it. Do not apply it to unrelated requests.
  7. Permit the user to disable or bypass engineering-process gates when doing so does not violate platform safety requirements.
  8. Replace broad heuristic triggers with precise, documented conditions to reduce false positives and denial of service.
  9. Add a clear instruction-boundary statement, for example:
markdown
This Skill provides advisory engineering checks only. It does not override
system, developer, or user instructions. Session-wide monitoring is enabled
only with explicit user consent, and the user may disable it at any time.
  1. Add tests verifying that the Skill cannot alter instruction priority, cannot block unrelated later requests, and remains subordinate to host-level policies.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (11)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

For a markdown skill description, trigger conditions should be specific enough to avoid unintended invocation. 'Any development task request' is extremely broad and could overlap with many ordinary coding interactions, making it unclear when this guardrail should activate versus when other skills should handle the request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

This skill is intended for broad use across multiple AI coding platforms, but major headings and operational instructions are presented in Chinese without stating that language choice is optional or user-selected. That can impose a locale preference on users who did not opt in, which conflicts with language/locale neutrality expectations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description says the skill runs as a 'persistent constraint layer throughout the development session' and 'activates continuously,' but does not define precise entry and exit conditions. Without explicit deactivation rules or context limits, the trigger model is underspecified and may collide with normal conversation or planning turns.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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 463)May include surrounding context.

md
#### 7-A: Commitment Protocol (强制锁定协议)

**Purpose:** Break the infinite "随便" loop that L5 users use to bypass confirmation. Force a binding decision or refuse to proceed.

**Trigger:** User responds "随便" / "你定" / "看着办" / "你说了算" during confirmation.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The overview is predominantly written in Chinese, including headings, table content, and architecture descriptions, with no indication that language selection is optional or that the skill is region-specific. This can violate language/locale policy when users are not given an opt-in or alternative language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file consistently includes bilingual and Chinese-only content such as headings and request examples, but it does not tell users they can choose their preferred language or that the document is intended for a specific locale. Under the policy, forcing or assuming a language/locale without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document claims at the top that all five L5 defense gaps were fully fixed, but the body still describes several of those same gaps as present or only partially addressed. In a guardrail skill, contradictory status reporting can cause the agent or maintainers to overtrust protections that are not actually implemented, weakening security decisions and testing rigor.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file is written entirely in Chinese and repeatedly frames the skill behavior and evaluation in that locale, while the test cases themselves are tagged with U.S. flags and include English-like user scenarios. Under the policy for natural-language violations, a locale/language constraint should either offer user choice or be clearly documented as region-specific; no such opt-in or justification is provided here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The file title and all response templates are written in Chinese, and the trigger/response examples assume Chinese-language use throughout. There is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-language or region-specific context.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The conclusion says only three gaps still need repair, while the adjacent priority table lists five separate gaps and priorities. This inconsistency can mislead implementers about residual risk and cause lower-priority but still necessary hardening work to be skipped.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

This markdown file contains natural-language guidance and examples in specific languages/locales, beginning with a Chinese title and later using English-labeled test cases, but nowhere states that the skill adapts to the user's preferred language. Because SQP-3 applies to natural-language policy issues in any file type, this can be read as forcing or assuming a language/locale without explicit user opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.