Back to skill

Security audit

3skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a PRD-planning helper, but its references encourage an unattended coding-agent loop that bypasses permission checks and can modify a repository without enough user control.

Install only if you want PRD templates and are comfortable reviewing any agent-execution references yourself. Do not run the unattended `--dangerously-skip-permissions` loop on real repositories or with credentials available; prefer manual story-by-story execution, bounded runs, sandboxing, and human review of diffs and 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:7
Finding

Unattended Agent Loop Disables Permission Controls

Content
View full analysis

Vulnerability Details

File Location: references/agent-usage.md, lines 7-11
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: High

Vulnerable Code:

bash
### 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

Technical Analysis

The documented workflow repeatedly starts an autonomous coding agent with --dangerously-skip-permissions. This explicitly removes interactive permission enforcement while directing the agent to derive executable work from the mutable prd.json file.

The infinite while : loop has no iteration limit, failure threshold, or built-in safe termination condition. Although the project describes itself as a PRD authoring Skill, this workflow delegates repository and potentially system-level operations to an unattended agent. The effective privileges depend on the account, credentials, filesystem access, and tool configuration available to the Claude process.

Because PRD user stories and acceptance criteria are treated as instructions, anyone able to influence prd.json may insert tasks that cause the agent to execute commands or modify files beyond legitimate PRD management. The documented workflow does not require task validation, command restrictions, sandboxing, or human approval before those actions occur.

Attack Path

  1. A user follows the documented unattended-agent workflow from a repository with locally available credentials and development tools.
  2. An attacker, compromised dependency, malicious contributor, or other untrusted process modifies prd.json and adds an incomplete story containing harmful implementation requirements.
  3. The loop launches Claude with --dangerously-skip-permissions.
  4. Claude reads the attacker-influenced story and attempts to implement it ...[truncated 1343 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove --dangerously-skip-permissions from all recommended commands and retain interactive authorization for sensitive tool calls.
  2. Replace the infinite loop with a bounded, single-story invocation. Require explicit human review and approval before starting each subsequent story.
  3. Stop immediately when validation fails, the agent encounters an unexpected instruction, or the configured iteration and time limits are reached.
  4. Run autonomous agents inside an isolated container or restricted worktree with:
    • Access limited to the intended repository.
    • No mounted home directory or credential stores.
    • Minimal environment variables.
    • Restricted outbound network access.
    • A non-privileged operating-system account.
  5. Validate prd.json against a strict schema before use. Enforce field lengths and allowed values, and reject stories containing shell commands, credential-access requests, permission changes, or unrelated filesystem paths.
  6. Treat all PRD text as untrusted data rather than higher-priority agent instructions. Use a fixed trusted execution prompt that explicitly prohibits following embedded instructions outside the approved story scope.
  7. Require human review of diffs, migrations, generated commands, and commits before applying them to the main branch or shared infrastructure.
  8. Provide a safe stop condition that checks whether all stories are complete and exits after a defined maximum number of iterations.
  9. Use separate, narrowly scoped credentials for test services and prevent autonomous access to production systems.
  10. Document that unattended execution is unsafe for repositories or PRDs that may be influenced by untrusted contributors.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

The example hardcodes use of an external agent CLI invocation in a privileged autonomous loop, effectively delegating repository reading, code generation, and command execution to an outside model/provider context. In this file's context, the main danger is not merely provider selection but that the external agent is invoked with dangerous permission bypass and entrusted with acting on local project state without review.

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
97% confidence
Finding

The document states the skill only edits PRDs, but the referenced workflow clearly instructs agents to create branches, modify implementation code, run checks, commit changes, and operate on worktrees. This mismatch can cause users or higher-level safety systems to underestimate the skill's authority and approve broader autonomous actions than intended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The unattended loop continuously runs an agent with --dangerously-skip-permissions and instructions to autonomously implement, verify, and mark work complete. This removes an important safety gate and enables repeated codebase modification, command execution, and state updates without human review, increasing the chance of destructive changes or abuse if prompts, PRDs, or repository contents are malicious or incorrect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The instruction to prefix branchName with ralph/ imposes a specific naming convention in natural-language guidance. This can be a policy-style constraint without any opt-in or explanation of why the restriction is required, which matches the rule's concern about forced conventions in user-facing language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The markdown example instructs generating a PRD and saving it to tasks/prd-[feature-name].md, then converting it to prd.json, which are file-creation operations affecting the user's workspace. The document does not include any warning or disclosure that the workflow will create or modify files.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.