Back to skill

Security audit

Superpowers Tdd

Security checks for vulnerabilities and agentic risk

Overview

This TDD skill is mostly a coaching workflow, but it repeatedly tells the agent to delete implementation code without approval or recovery safeguards.

Review this skill carefully before installing. It is suitable only if you want a very strict TDD coach and are comfortable overriding or constraining its deletion guidance; agents should ask before deleting or replacing code and should preserve recoverable changes.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:21
Finding
Unconditional Instructions to Delete Existing Implementation Code## Vulnerability Details **File Location**: `SKILL.md`, lines 21-28 **Vulnerability Type**: Destructive file-operation instructions without authorization safeguards **Risk Level**: Medium ### Vulnerable Instruction Snippet ```text Wrote the code before writing the test? Delete it. Start over. No exceptions: - Do not keep it as a reference - Do not adapt it while writing the test - Do not look at it - Deletion means deletion ``` The instruction is reinforced at lines 160-166: ```text All of these mean: delete the code. Start over using TDD. ``` ### Technical Analysis The skill directs an AI agent to delete implementation code whenever it determines that the code was written before a failing test. This is an unconditional destructive instruction. It does not require the agent to: - Obtain explicit user authorization before deletion. - Confirm that the affected code was created during the current task. - Distinguish disposable generated code from pre-existing user code. - Check whether the repository is under version control. - Create a backup, commit, patch, or temporary branch. - Present the proposed deletion scope for review. - Prefer non-destructive alternatives such as characterization tests. If the skill is loaded by an agent with filesystem write permissions, the instruction could cause deletion of valuable source code beyond what is legitimately necessary to promote test-driven development. The skill does not itself elevate privileges, but it encourages use of already available filesystem privileges without adequate authorization controls. ### Attack Path 1. A user invokes the skill while working in a writable source repository. 2. The agent identifies implementation code that was created before its corresponding test or concludes that the required TDD sequence was not followed. 3. The skill instructs the agent that there are no exceptions and that the implementation must be deleted. 4 ...[truncated 1016 chars]
Remediation
## Remediation Suggestions Replace the unconditional deletion mandate with a non-destructive, approval-based workflow: 1. Never delete pre-existing or user-authored code solely because it was not developed test-first. 2. Add characterization tests around existing behavior before modifying the implementation. 3. Require explicit user confirmation before deleting or replacing any existing code. 4. Show the exact files and line ranges proposed for removal before performing the operation. 5. Verify that changes are recoverable through version control, a backup, or a saved patch. 6. Perform experimental rewrites on a temporary branch or in a separate worktree. 7. Limit automatic cleanup to code generated by the agent during the current task and not yet accepted by the user. 8. Prefer reverting the agent's own recent edits over deleting files or unrelated code. A safer replacement instruction would be: ```text If implementation already exists, do not delete it automatically. Preserve it, add characterization tests, and apply TDD to subsequent changes. Before removing or replacing existing code, show the proposed changes and obtain explicit user approval. Ensure that the original code is recoverable through version control or a backup. ```
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill activates for essentially any feature or bugfix work, which makes it unusually broad and likely to trigger in many unrelated contexts. Overly broad activation can hijack agent behavior, crowd out more specific skills or user instructions, and cause unnecessary code/test workflow enforcement where it may be inappropriate or harmful.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The skill content is entirely in Chinese and effectively imposes a language constraint without offering user choice or stating a justified locale requirement. In agent settings, this can override the user's preferred language, degrade transparency, and cause the model to follow the skill's language over the user's instructions, which is a control and usability risk.

Static analysis

No suspicious patterns detected.