Back to skill

Security audit

claw-superpowers

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed software-development workflow skill, but it asks for unusually broad control over the agent's workflow and includes automatic setup commands that can execute repository code.

Review before installing. This skill may be useful for disciplined software development, but it can take over routine coding workflows, create commits and worktrees, run dependency installation/build/test commands, and manage branches. Only use it in repositories you trust, and require explicit approval before installs, builds, tests, pushes, branch deletion, worktree creation, or skill modifications.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:53
Finding
Coercive Instructions Hijack the Agent's Session Workflow<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:53-68` **Vulnerability Type**: Agent instruction and workflow hijacking **Risk Level**: High ### Vulnerable Code Snippet ```markdown <EXTREMELY-IMPORTANT> If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill. IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT. This is not negotiable. This is not optional. You cannot rationalize your way out of this. </EXTREMELY-IMPORTANT> **Rule:** Invoke relevant skills BEFORE any response or action. Even a 1% chance a section might apply means you should check. **Process:** 1. User message received 2. Check: might any section apply? - Yes → Follow that section - No → Respond directly ``` Additional coercive workflow gates appear at `SKILL.md:102-108` and `SKILL.md:132`: ```markdown <HARD-GATE> Do NOT write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity. </HARD-GATE> ``` ```markdown **The terminal state is invoking writing-plans.** Do NOT invoke any other implementation skill. The ONLY next step after brainstorming is writing-plans. ``` ### Technical Analysis The Skill does not merely describe an optional development methodology. It uses absolute and coercive language to require invocation before every response or action whenever there is even a speculative chance that the Skill applies. It then prescribes mandatory workflow gates and dictates which Skill must be invoked next. This is instruction hijacking because loading the Skill can alter the agent's current-session priorities and decision process. The directives are globally phrased and do not explicitly defer to the user's requested workflow, higher-priority platform instructions, tool restrictions, or task-specific safety requirements. The one-percent appli ...[truncated 1682 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace absolute requirements with task-scoped recommendations. For example: - “Consider using this workflow when it is appropriate for the user's request.” - “Skip or adapt steps when the user requests a different process.” 2. Add an explicit precedence statement: - Follow platform and system instructions first. - Follow explicit user requirements next. - Treat this Skill as optional methodology guidance. - Do not perform additional actions beyond the authorized task scope. 3. Remove the one-percent applicability rule and phrases such as: - “You do not have a choice.” - “This is not negotiable.” - “Before any response or action.” - “The ONLY next step.” 4. Make design approval and planning proportional to task complexity rather than mandatory for every change. 5. Require separate user authorization before repository-modifying operations such as creating files, committing changes, creating worktrees, installing dependencies, pushing branches, or deleting branches. 6. State that safety checks and explicit user constraints cannot be bypassed by this Skill's workflow. ]]>

T08 · Insecure Dependencies

Error
Location
SKILL.md:832
Finding
Automatic Dependency Installation and Build Execution from Untrusted Project Manifests<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:832-841` **Vulnerability Type**: Unsafe automatic dependency installation and build execution **Risk Level**: High ### Vulnerable Code Snippet ```markdown 2. **Create worktree:** `git worktree add "$path" -b "$BRANCH_NAME"` 3. **Run project setup** (auto-detect): ```bash if [ -f package.json ]; then npm install; fi if [ -f Cargo.toml ]; then cargo build; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f pyproject.toml ]; then poetry install; fi if [ -f go.mod ]; then go mod download; fi ``` 4. **Verify clean baseline** — run tests. If tests fail: report failures, ask whether to proceed. ``` ### Technical Analysis The workflow instructs the agent to automatically select and execute package-manager or build commands based only on the presence of common manifest files. It does not require prior inspection of package sources, lockfiles, lifecycle scripts, build scripts, registry configuration, dependency names, hashes, or repository trust. Several listed operations may execute code rather than merely download inert files: - `npm install` can run package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. - `cargo build` can execute Rust build scripts, including repository-controlled `build.rs` files. - `pip install -r requirements.txt` can invoke package build backends and install packages from unsafe or attacker-selected sources. - `poetry install` can resolve and install third-party packages and invoke relevant Python build tooling. - Subsequent baseline test execution can also run repository-controlled test configuration or scripts. The mere existence of a manifest is not a sufficient trust decision. A malicious repository can deliberately include one or more recognized files so that following the Skill causes code execution under the agent's operating-system account. The instructions do not use safer controls such as locked ...[truncated 1884 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove automatic setup execution based solely on manifest presence. 2. Require explicit user approval before installing dependencies, building code, running tests, or executing repository-defined scripts. 3. Before approval, inspect and report: - Manifest and lockfile contents. - Package registries, indexes, Git dependencies, URLs, and local path dependencies. - Lifecycle scripts and build hooks. - Lockfile consistency and unexpected dependency changes. - Packages with ambiguous, misspelled, or organization-private names. 4. Prefer reproducible, lockfile-enforcing commands where supported, such as: - `npm ci` instead of unconstrained `npm install`. - Cargo locked or frozen modes where appropriate. - Hash-pinned Python requirements with hash enforcement. - Poetry lockfile synchronization without unreviewed dependency resolution. 5. Disable lifecycle scripts when they are unnecessary and supported by the package manager. If scripts are required, inspect them before execution. 6. Execute all dependency installation and build steps inside a restricted sandbox or disposable container with: - No host credentials. - Minimal filesystem mounts. - No privileged capabilities. - Restricted outbound network access. - A non-privileged user. - No access to SSH agents, cloud credentials, signing keys, or unrelated repositories. 7. Separate dependency download, dependency review, build, and test phases so each potentially executable transition requires an explicit trust decision. 8. Record the exact command, package sources, lockfile status, and expected effects before execution. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • 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
Findings (7)

Vague Triggers

High
Confidence
98% confidence
Finding
The skill mandates invocation whenever there is even a 1% chance a section might apply, and requires this check before any response or action. That creates an overbroad control surface where routine prompts can be funneled into the skill's procedural workflow, potentially overriding user intent and inducing unnecessary filesystem, git, or subagent actions.

Self-Modification

High
Category
Rogue Agent
Content
### Skill Creation Checklist

**RED:** Create pressure scenarios → run WITHOUT skill → document baseline failures (exact rationalizations agents use)
**GREEN:** Write skill addressing specific failures → run WITH skill → verify compliance
**REFACTOR:** Find new rationalizations → add counters → re-test until bulletproof

### Common Rationalizations for Skipping Testing
Confidence
85% confidence
Finding
The skill explicitly includes creating and editing skills, with instructions to write and test new skills. In an agent ecosystem, allowing a skill to drive creation or modification of other skills can become self-modification of the agent's behavioral layer, enabling persistence or escalation if a malicious or flawed repository can influence those changes.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The brainstorming section says to use the skill before 'any creative work' and applies it to virtually every project regardless of simplicity. Those boundaries are too vague, so the agent may invoke a heavy process for benign tasks and get steered into exploring files, asking iterative questions, or generating design artifacts without clear necessity.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
### Rules

- Follow plan steps exactly
- Don't skip verifications
- Between batches: report and wait
- Stop when blocked, don't guess
- Never start implementation on main/master without explicit consent
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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
### Rules

- Never start on main/master without consent
- Never skip reviews (spec OR quality)
- Spec review BEFORE code quality review
- Don't dispatch parallel implementation subagents (conflicts)
Confidence
75% 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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
1. **Check existing:** `ls -d .worktrees 2>/dev/null` (preferred) or `ls -d worktrees 2>/dev/null`
   - If found: use that directory. If both exist, `.worktrees` wins.
2. **Check AGENTS.md:** `grep -i "worktree.*director" AGENTS.md 2>/dev/null`
   - If preference specified: use without asking.
3. **Ask user:** `.worktrees/` (project-local, hidden) or `~/.config/superpowers/worktrees/<project>/` (global)

### Safety Verification
Confidence
87% confidence
Finding
The worktree setup instructs the agent to use a directory preference from AGENTS.md 'without asking.' Treating repository content as authoritative for operational decisions can let an untrusted repo influence filesystem locations and workspace setup, which increases the chance of unintended writes or environment manipulation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Never create worktree without verifying it's ignored (project-local)
- Never skip baseline test verification
- Never proceed with failing tests without asking
- Follow directory priority: existing → AGENTS.md → ask
- Auto-detect setup commands from project files
Confidence
75% 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.

Static analysis

No suspicious patterns detected.