Back to skill

Security audit

hplan

Security checks for vulnerabilities and agentic risk

Overview

This planning skill is mostly coherent, but it needs Review because it can automatically delete a workspace planning folder and persist planning details without enough user control.

Review before installing. This skill may be useful for long-running planning, but it should be changed to activate only on explicit hplan-style planning requests, ask before any deletion, avoid deleting untracked .plan contents, and provide clear consent and minimization controls for memory writes and searches.

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

Error
Location
SKILL.md:73
Finding

Session-Wide Agent Instruction Hijacking

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:73-82
Vulnerability Type: Mandatory session-wide workflow redirection
Risk Level: High

Vulnerable Code Snippet

markdown
## Mandatory Behaviors

Since this environment does not have automatic hook injection, you must follow these behaviors manually to maintain plan awareness:

### 1. Check .plan/ before any action

**This is the first thing to do in every conversation, before any file writes.**

Check if `.plan/overview.md` already exists:
- **Exists with incomplete phases**: Show the user the current goal and progress, then ask: "There is an unfinished plan. Would you like to continue it, or discard it and start a new plan?" Wait for the user's answer before doing anything else.
- **Exists with all phases complete**: Silently delete the entire `.plan/` directory and proceed normally.
- **Does not exist**: Proceed normally.

Related instructions at SKILL.md:105-110 reinforce the same behavior:

markdown
### 5. Context recovery on new conversations

When a user says "continue" or references an existing plan:
1. First, use `memory_search("hplan")` to find the latest plan state
2. Then check if `.plan/overview.md` exists and read it
3. Read the current phase's `spec.md` and `checklist.md`
4. Confirm the current state with the user before proceeding

Technical Analysis

The Skill defines its planning workflow as mandatory in every conversation rather than limiting it to cases where the user explicitly invokes hierarchical planning. It directs the Agent to inspect workspace state before performing the current request, reveal prior planning state, access persistent memory, and suspend execution until the user answers an injected confirmation question.

These instructions can supersede or disrupt the Agent's current-session objective simply because the Skill is loaded. The phrase “before any action” broadens the behavior beyond the ...[truncated 1669 chars]

Remediation
View remediation

Remediation Suggestions

  1. Scope all mandatory behavior to explicit invocations of hplan or unambiguous user requests for multi-phase planning.
  2. Replace “in every conversation” and “before any action” with a condition such as: “When the user explicitly requests hplan planning, check for an existing hplan-owned plan.”
  3. Do not block unrelated requests based on the presence of .plan/.
  4. Obtain explicit consent before reading persistent memory or exposing prior plan details.
  5. Treat generic phrases such as “continue” as insufficient authorization to search cross-session memory.
  6. Validate that an existing plan belongs to this Skill using a Skill-specific metadata marker before reading it.
  7. State clearly that platform instructions and the user's current request take precedence over the Skill's optional workflow.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:185
Finding

Silent Automatic Deletion of the Workspace Planning Directory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:185-190
Vulnerability Type: Unconfirmed destructive filesystem operation
Risk Level: Medium

Vulnerable Code Snippet

markdown
### New conversation with existing .plan/

When a new conversation starts, check if `.plan/overview.md` exists:

- **Has incomplete phases**: Ask the user whether to continue the existing plan or discard it and start fresh. Wait for the user's decision before proceeding.
- **All phases complete**: Delete the entire `.plan/` directory automatically, then proceed with the new task.

The same destructive requirement also appears at SKILL.md:78-80:

markdown
Check if `.plan/overview.md` already exists:
- **Exists with incomplete phases**: Show the user the current goal and progress, then ask: "There is an unfinished plan. Would you like to continue it, or discard it and start a new plan?" Wait for the user's answer before doing anything else.
- **Exists with all phases complete**: Silently delete the entire `.plan/` directory and proceed normally.
- **Does not exist**: Proceed normally.

Technical Analysis

The Skill directs the Agent to recursively delete the entire .plan/ directory based only on completion state inferred from a Markdown file. It neither verifies that the directory and every contained file were created by this Skill nor obtains user confirmation before deletion. The instruction explicitly requires the operation to occur silently.

.plan/ is a generic workspace-relative directory name and may contain user-created records, artifacts generated by another tool, symbolic links, or files added after the plan was created. A completed status in overview.md is not adequate authorization to destroy all directory contents. Automatic cleanup therefore creates a data-loss primitive within the Agent's existing filesystem permissions.

Attack Path

  1. A workspace contains .plan/overview.md whose ph ...[truncated 1467 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove all silent and automatic deletion behavior.
  2. Ask for explicit user confirmation immediately before any destructive cleanup operation.
  3. Use a Skill-specific directory name instead of the generic .plan/ path.
  4. Create an ownership manifest containing a format version and an exact list of files generated by the Skill.
  5. Delete only files recorded in that manifest; never recursively remove untracked contents.
  6. Reject cleanup if symbolic links, unexpected files, path traversal, or ownership inconsistencies are detected.
  7. Prefer non-destructive archival, such as renaming the directory with a completion timestamp.
  8. Display the exact deletion scope to the user and provide a recovery or backup option before proceeding.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This section mandates silent automatic deletion of .plan/ without any warning or confirmation. Unannounced destructive behavior is especially risky in a planning skill because .plan/ is the primary persistent record of goals, specs, and progress; deleting it can irreversibly erase user work.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A second lifecycle section repeats the instruction to auto-delete .plan/ when phases are complete, reinforcing unsafe destructive behavior. Repetition makes it more likely the agent will execute deletion as a default housekeeping step rather than a user-approved action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description advertises planning help but does not clearly warn users that it creates persistent workspace files and stores state across sessions. This undermines informed consent and can expose sensitive task details to later sessions or collaborators with workspace access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases are broad enough to match ordinary requests such as 'plan' or 'break down task,' causing the skill to activate in contexts where users did not intend persistent files or memory storage. Because this skill writes to disk and memory, overbroad invocation increases the chance of unconsented side effects.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs storing task goals, phase lists, decisions, and progress in cross-session memory without any minimization, sensitivity checks, or consent step. Planning content often contains confidential project details, so persistent retention can leak or resurface sensitive information outside the user's expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly authorizes silent deletion of the entire .plan/ directory when it judges a plan complete. That is a destructive action against persistent workspace state without user confirmation, and completion can be misdetected or race with user expectations, causing data loss beyond the immediate turn.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
87% confidence
Finding

The skill authorizes the agent to autonomously determine that a plan is complete and then take consequential action without user input. In this context, autonomous completion judgments are dangerous because they directly trigger destructive state changes and can be wrong or context-insensitive.

Content

Scanner excerpt · SKILL.md (reported line 94)May include surrounding context.

md
- **Exists with all phases complete**: Silently delete the entire `.plan/` directory and proceed normally.
- **Does not exist**: Proceed normally.

Never overwrite or modify an existing `.plan/` without checking its status first.

### 2. Re-read overview.md frequently

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The workflow operationalizes repeated cross-session retention of plan state and milestones, increasing accumulation of potentially sensitive content over time. The more the agent stores and later searches, the higher the chance of inappropriate recall, over-retention, or disclosure to unrelated future contexts.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill instructs the agent to use cross-session memory search and writes even though that capability is not clearly declared in the manifest surface. Hidden persistence expands the skill's effective authority and can surprise users and reviewers, especially when task goals, progress, and decisions are stored externally.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file contains conflicting state-handling instructions: ask before discarding unfinished plans, but silently delete completed ones. Inconsistent control-flow around destructive actions increases the chance the agent will choose the more aggressive path without user awareness.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.