Back to skill

Security audit

5skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a PRD-writing aid, but its documentation includes an unbounded autonomous coding loop that disables permission checks, so users should review it carefully before installing or following its examples.

Install only if you want PRD templates and are prepared to ignore or rewrite the unattended-agent examples. Do not copy the `--dangerously-skip-permissions` loop into a real project unless it is isolated in a disposable worktree/container with minimal credentials, a bounded run count, and human review before writes or commits.

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

Error
Location
references/agent-usage.md:8
Finding

Unrestricted Unattended Agent Execution with Permission Checks Disabled

Content
View full analysis

Vulnerability Details

File Location: references/agent-usage.md, lines 8–11
Vulnerability Type: Unauthorized access and privilege escalation through disabled permission controls
Risk Level: High

Vulnerable Code

bash
while :; do
  claude --print --dangerously-skip-permissions \
    "Read prd.json, find first story where passes=false, implement it, run checks, update passes=true if successful"
done

Technical Analysis

The documented workflow starts an unbounded autonomous loop and invokes Claude Code with --dangerously-skip-permissions. This option disables the interactive permission checks intended to control filesystem access and command execution.

The agent repeatedly consumes instructions from prd.json, which is mutable project content rather than a trusted executable policy. If an attacker can create or modify that file, a malicious story can instruct the agent to perform operations beyond PRD management. Because permission checks are disabled, generated shell commands and file operations may run without user approval and with the privileges of the account that launched Claude Code.

The infinite while : loop further increases risk by repeatedly invoking the agent without an iteration limit, timeout, or reliable external stop condition. This can amplify destructive actions and cause excessive consumption of compute, API, or system resources.

Attack Path

  1. A victim checks out or opens a project containing an attacker-controlled prd.json, or an attacker modifies an existing PRD.
  2. The PRD includes a story or acceptance criterion that induces unsafe commands, sensitive-file access, or unrelated system modifications.
  3. The victim starts the documented unattended loop.
  4. Claude Code reads and interprets the attacker-controlled PRD.
  5. The --dangerously-skip-permissions option suppresses normal approval boundaries.
  6. Agent-generated commands execute with the invoking user's operating-system privileges.
  7. The ...[truncated 756 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove --dangerously-skip-permissions and retain interactive approval for command execution, sensitive-file access, network operations, and writes outside the project workspace.
  2. Replace while : with a bounded runner that enforces a maximum number of iterations, execution timeout, and explicit failure handling.
  3. Require human approval before each story is implemented and before any commit, migration, package installation, network request, or destructive command.
  4. Treat prd.json, prompt.md, and progress.txt as untrusted input. Validate them against a strict schema and reject shell commands, requests for secrets, instructions outside the repository, and attempts to override agent safety controls.
  5. Run the agent in an isolated container or sandbox with a read-only host filesystem, a dedicated non-privileged account, minimal environment variables, no unnecessary credentials, and restricted network access.
  6. Apply command and path allowlists. Restrict writes to the intended worktree and prevent access to SSH keys, cloud credentials, shell configuration, system directories, and unrelated repositories.
  7. Add a deterministic stop condition outside the model, and stop immediately when no incomplete story remains, validation fails, or behavior deviates from the declared PRD scope.
  8. Log and review every generated command and file change before merging or deploying the result.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The example uses --dangerously-skip-permissions, explicitly bypassing normal safety controls, yet provides no warning about the elevated risk. In this context, pairing a permission-bypass flag with an infinite autonomous loop materially increases the chance of unauthorized or unintended code changes, destructive actions, or abuse if the prompt/task input is compromised.

Content

No source excerpt is available for this finding.

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · references/agent-usage.md (reported line 10)May include surrounding context.

Claude Code

bash
while :; do
  claude --print --dangerously-skip-permissions \
    "Read prd.json, find first story where passes=false, implement it, run checks, update passes=true if successful"
done

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document states the skill only edits PRDs, but the examples and prompt template instruct an agent to modify source code, run checks, create branches, commit changes, and update multiple files. This mismatch can mislead users about the true operational scope, reducing informed consent and increasing the chance they run an agent with broader write capabilities than expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The unattended loop repeatedly instructs an agent to implement tasks, run checks, and update project state without requiring per-iteration approval or prominently warning that files will be autonomously modified. In skill context, this is more dangerous because it normalizes continuous unsupervised repository changes, which can amplify mistakes or unsafe actions across many iterations.

Content

No source excerpt is available for this finding.