Back to skill

Security audit

Phy Planning With Files

Security checks for vulnerabilities and agentic risk

Overview

This planning skill is mostly purpose-aligned, but it automatically runs unbundled local scripts and repeatedly injects project-controlled planning text into the agent context.

Install only if you are comfortable with the skill creating persistent planning files in each project and running local helper scripts. Avoid enabling it in untrusted repositories until the script bundle is present and audited, and treat any existing task_plan.md content as untrusted input.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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

Warning
Location
SKILL.md:16
Finding

Repository-Controlled Planning File Is Injected into Agent Tool Context

Content
View full analysis
/dev/null | head -30 || true" ``` ### Technical Analysis The `PreToolUse` hook reads the first 30 lines of `task_plan.md` before nearly every filesystem or command-related tool call. Because this file is located in the project directory, its content may be controlled by a repository author or another untrusted contributor. The hook does not validate the file format, restrict accepted fields, or clearly isolate the content as untrusted data. Consequently, a malicious `task_plan.md` can contain instructions designed to manipulate the agent. The content is repeatedly surfaced during the session, increasing the likelihood that the agent treats it as authoritative operational guidance. The shell command itself does not directly execute commands contained in `task_plan.md`. Exploitation depends on the agent interpreting the displayed content as instructions and subsequently invoking its available tools. ### Attack Path 1. An attacker creates or modifies `task_plan.md` in a repository. 2. The attacker places malicious instructions within its first 30 lines, such as requests to read sensitive files, run shell commands, or alter unrelated project files. 3. A victim opens the repository with this Skill enabled. 4. Before a matching `Write`, `Edit`, `Bash`, `Read`, `Glob`, or `Grep` operation, the hook reads the malicious content. 5. The injected text is presented in the agent's operational context. 6. If the agent follows the repository-controlled instructions, it performs attacker-directed actions using the tools and permissions available in the current session. ### Impact Assessment Successful exploitation can influence any op ...[truncated 657 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:26
Finding

Execution of Unbundled Scripts from Mutable External Paths

Content
View full analysis
/dev/null && [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" || "$OS" == "Windows_NT" ]]; then pwsh -ExecutionPolicy Bypass -File "${CLAUDE_PLUGIN_ROOT}/scripts/check-complete.ps1" 2>/dev/null || powershell -ExecutionPolicy Bypass -File "${CLAUDE_PLUGIN_ROOT}/scripts/check-complete.ps1" 2>/dev/null || bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-complete.sh" else bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-complete.sh" fi ``` The session-recovery instructions also direct users to execute scripts from mutable home-directory installation paths: ```bash # Claude Code users python3 ~/.claude/skills/planning-with-files/scripts/session-catchup.py "$(pwd)" # Codex users python3 ~/.codex/skills/planning-with-files/scripts/session-catchup.py "$(pwd)" # Cursor users python3 ~/.cursor/skills/planning-with-files/scripts/session-catchup.py "$(pwd)" ``` ### Technical Analysis The audited project contains only `SKILL.md`; none of the referenced `check-complete.ps1`, `check-complete.sh`, or `session-catchup.py` scripts are present. Their behavior and integrity therefore cannot be verified as part of this package. The Stop hook automatically executes whichever script is resolved under `CLAUDE_PLUGIN_ROOT`. The documented recovery procedure similarly asks users to execute scripts from predefined locations beneath their home directories. If those paths refer to another installation, stale files, or files modified by another process, the executed code may differ from the reviewed Skill. On Windows, the hook additionall ...[truncated 1677 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says to use the skill for complex tasks, research projects, or anything requiring more than five tool calls, which is a broad activation scope rather than a narrowly bounded operation. Over-broad applicability increases the likelihood the skill is invoked in sensitive repositories or workflows where its hooks, file writes, and shell scripts are unnecessary and risky.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill grants Bash execution even though its primary purpose is planning via markdown files. In this skill, shell access is used not only for optional helpers but also in automatic hooks and documented startup steps, which increases the chance of unintended command execution in the user's environment and expands the blast radius beyond simple file planning.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill allows WebFetch and WebSearch, but the stated capability is local file-based planning and session tracking. Unnecessary network access broadens data-exposure and prompt-injection risk, especially when paired with a planning workflow that may persist fetched content into project files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs the agent to create and update task_plan.md, findings.md, and progress.md in the project directory, but it does not provide an explicit upfront warning that activating the skill will modify the workspace. This can lead to unexpected file creation, repository noise, or accidental persistence of sensitive context into tracked files.

Content

No source excerpt is available for this finding.