Back to skill

Security audit

7skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly PRD documentation, but it includes an unattended coding-agent loop that bypasses permission checks, so users should review it carefully before installing.

Install only if you want PRD templates and agent-execution guidance. Do not run the unattended Claude example as written; remove `--dangerously-skip-permissions`, run in a restricted worktree or sandbox, set an iteration limit, keep credentials out of reach, and review diffs and commits manually before accepting 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

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

Unrestricted Unattended Agent Execution

Content
View full analysis

Vulnerability Details

File Location: references/agent-usage.md, lines 8–11
Vulnerability Type: Permission controls disabled for an unbounded autonomous execution loop
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 command launches an autonomous coding agent with --dangerously-skip-permissions, explicitly disabling permission checks. It also uses while :, creating an unbounded loop with no iteration limit, error threshold, lack-of-progress detection, or mandatory human review.

The agent reads prd.json and operates on the surrounding project. Because those inputs and the repository context may be attacker-controlled, compromised, or simply erroneous, the agent could be induced to execute commands or modify files without approval. The process inherits the invoking user's accessible files, credentials, tools, network access, and repository permissions.

This violates least privilege and exceeds the skill's declared PRD-editing purpose. The absence of a bounded stop mechanism also creates a denial-of-service risk if stories remain incomplete or completion status cannot be persisted.

Attack Path

  1. An attacker gains the ability to modify prd.json, referenced project files, or other repository content consumed by the coding agent.
  2. The attacker adds a story or contextual instruction that induces sensitive file access, destructive commands, unauthorized source changes, credential use, or other harmful operations.
  3. A user follows the documented example and launches the loop with --dangerously-skip-permissions.
  4. The agent processes the attacker-controlled repository context without requesting permission for sensitive operations.
  5. Commands and file modifications run with the privileges and accessible resour ...[truncated 852 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove --dangerously-skip-permissions and retain normal approval controls for command execution, file access, network activity, and other sensitive operations.
  2. Run the agent in a restricted sandbox or container with:
    • A dedicated unprivileged account.
    • Access limited to the intended worktree.
    • No access to SSH keys, cloud credentials, tokens, or unrelated user files.
    • Network access disabled by default or restricted to an explicit allowlist.
  3. Replace while : with a bounded loop that enforces:
    • A maximum number of iterations.
    • A wall-clock timeout.
    • Immediate termination after command or validation failures.
    • Detection of repeated failures and lack of progress.
  4. Validate the PRD structure and constrain actionable fields before execution. Treat PRD text and repository content as untrusted input rather than authoritative operational instructions.
  5. Require human review before running migrations, installing dependencies, accessing secrets, executing destructive commands, pushing changes, or merging commits.
  6. Use a clean Git worktree and inspect the resulting diff before accepting or publishing changes.
  7. Document an emergency stop procedure and log every command, file modification, and permission-sensitive operation performed by the agent.
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)

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
92% confidence
Finding

The example invokes an external agent CLI with the --dangerously-skip-permissions flag, explicitly bypassing normal safety controls while delegating implementation decisions to the model. In this context, provider/tool selection is not the core issue; the dangerous part is the combination of external autonomous execution and disabled permission checks, which can enable unauthorized code modification or other side effects.

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 explicitly claims the skill only edits PRDs, but the embedded usage patterns instruct an agent to modify code, run checks, create branches, and commit changes. This scope mismatch can mislead users or downstream systems into granting trust or permissions under false assumptions, increasing the chance of unintended repository modification.

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 continuously runs an autonomous coding agent that updates project files and marks tasks complete, with no human approval gate. Combined with dangerous permission bypass, this can amplify mistakes, allow destructive repository changes, and repeatedly execute harmful actions if the prompt or project state is compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file explicitly directs the user to write and update a repository file, but it does not include any user-facing warning about altering project data or overwriting existing content. Under the markdown-specific missing-warning criterion, file-modifying behavior that affects user data should be disclosed.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.