Back to skill

Security audit

PRD Backlog Conductor

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent requirements manager, but its project-controlled pointer can direct reads and writes outside the current project without validation.

Review the `.wdp-prd` file before using this skill in any existing or downloaded repository. Only proceed if it points to the intended project directory under your chosen PRD root, and be aware that dispatch and accept workflows can create branches, run subagents, merge code, and update persistent planning files.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:24
Finding

Unvalidated .wdp-prd Pointer Enables Filesystem Access Outside the Current Project

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 24–31
Vulnerability Type: Untrusted path traversal / arbitrary filesystem target selection
Risk Level: Medium

Vulnerable Code

markdown
## Storage Model
- Global root: `~/.wdp/prd/` (override with the `PRD_ROOT` environment variable).
- Per-project subdirectory: `<PRD_ROOT>/<project-slug>/`, containing:
  - `backlog/R-###.md` requirement cards
  - `execution-plan.md` scheduling view
  - `plans/` implementation-plan archive
- Bridge: a `.wdp-prd` file in the project root whose content is the absolute path of that project's global root (i.e. `<PRD_ROOT>/<slug>/`). Read it before every command operation.

Technical Analysis

The skill treats the contents of the project-local .wdp-prd file as an authoritative absolute filesystem path. It does not require canonicalization or verify that the resolved path remains under the configured PRD_ROOT. It also specifies no protection against symbolic links, unexpected file types, path substitution, or pointers to another project's requirement directory.

Because .wdp-prd can be supplied by an untrusted repository, an attacker can choose the directory from which the agent reads requirement cards and to which it writes execution-plan.md, card updates, implementation plans, and acceptance records. Subsequent command workflows explicitly rely on this pointer, including reading all cards, rewriting the execution plan after state changes, and archiving plans.

This creates a confused-deputy condition: repository-controlled path data directs an agent operating with the user's filesystem privileges. The most direct exploit is cross-project access or corruption by pointing to another valid WDP project directory. Additional arbitrary-file effects may be possible if the selected directory contains attacker-prepared symbolic links with expected names such as execution-plan.md or card fil ...[truncated 1781 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat .wdp-prd as untrusted input. Resolve both PRD_ROOT and the pointer target to canonical absolute paths before any read or write.
  2. Require the canonical pointer target to be a strict descendant of the canonical configured PRD_ROOT; reject paths that escape it.
  3. Validate that the target matches the expected <PRD_ROOT>/<project-slug> structure and that the slug satisfies a strict pattern such as ^[a-z0-9]+(?:-[a-z0-9]+)*$.
  4. Bind the pointer to the current project using trusted metadata rather than accepting an arbitrary absolute path. Prefer storing only the validated slug in .wdp-prd and deriving the full path from PRD_ROOT.
  5. Refuse to operate when .wdp-prd, the target directory, backlog, plans, card files, or execution-plan.md are symbolic links or unexpected file types.
  6. Before a pre-existing pointer is first trusted, display its resolved destination and require explicit user confirmation if it was not created in the current session.
  7. Perform writes using safe file APIs: create temporary files in the validated target directory, reject symlink destinations, apply restrictive permissions, and atomically rename the files.
  8. Add negative tests for pointers outside PRD_ROOT, .. traversal after normalization, pointers to another project, symlinked pointer files, symlinked target directories, and symlinked output files.
  9. Abort all command processing on validation failure rather than falling back to the unvalidated path.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description explicitly labels this as the English variant and binds usage to /wdp-prd-en, indicating a fixed language choice. The file does not offer a user language/locale choice or document a justified region-specific constraint, which makes this a natural-language policy concern.

Content

No source excerpt is available for this finding.