Back to skill

Security audit

Prfaq Beagle

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate PRFAQ coaching skill, but it needs review because a user-controlled folder slug and automatic local-document scanning can affect more files than users may expect.

Install only if you are comfortable with the skill creating .beagle concept files, invoking local artifact analysis over project planning/docs areas, and running web research. Use a simple lowercase hyphenated slug, do not provide slashes or path-like values, and review generated paths before allowing writes or refreshes.

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:76
Finding

User-Controlled Slug Allows Path Traversal Outside the Concept Directory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:62-67, 76-82, 132-155, 199
Vulnerability Type: Path traversal through an insufficiently validated user-controlled path component
Risk Level: Medium

Vulnerable Code Snippets

markdown
All artifacts for a concept live under `.beagle/concepts/<slug>/`:

```text
.beagle/concepts/<slug>/
├── prfaq.md
├── brief.md
├── research/
└── analysis/
text

```markdown
At end of Ignition, propose a slug derived from the concept headline — lowercase, hyphenated, ≤40 characters, no dates.

Present the proposed slug. The user can accept or override with their own string.
yaml
output_dir: "/abs/path/.beagle/concepts/<slug>/analysis/"
yaml
output_dir: "/abs/path/.beagle/concepts/<slug>/research/"
markdown
Create `.beagle/concepts/<slug>/prfaq.md` using the skeleton in `references/prfaq-template.md`.
markdown
Produce `.beagle/concepts/<slug>/brief.md` per the template in `references/verdict.md`.

Technical Analysis

The skill defines a safe-looking slug convention but does not make that convention an enforceable validation rule. It explicitly permits the user to override the slug “with their own string.” The resulting value is interpolated into:

  • Paths checked during workflow resumption
  • The artifact-analysis output directory
  • The web-research output directory
  • The prfaq.md destination
  • The brief.md destination
  • Directories subject to companion refresh and archival behavior

If an override contains path separators or traversal components such as ../, filesystem path resolution may escape .beagle/concepts/. For example, a slug resembling ../../../../tmp/target would cause the generated paths to resolve outside the intended concept workspace.

The documented lowercase, hyphenated, 40-character convention does not mitigate this issue because the skill does not instruct the agent to reject nonconforming overrides or verify the canonical destination path befo ...[truncated 1683 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat the slug format as a mandatory validation rule rather than a convention.

  2. Reject every user override that does not match a strict allowlist such as:

    regex
    ^[a-z0-9]+(?:-[a-z0-9]+)*$
    
  3. Enforce the documented maximum length of 40 characters after normalization.

  4. Explicitly reject:

    • / and \
    • . and .. path components
    • Absolute paths
    • URL-encoded or Unicode-equivalent path separators
    • Control characters and null bytes
  5. Construct paths using a safe path-joining API rather than string concatenation.

  6. Canonicalize both the concept root and every derived destination before each read or write.

  7. Verify that every canonical destination remains a descendant of the canonical .beagle/concepts/ directory.

  8. Apply the same containment check to companion output_dir values and archive destinations.

  9. Do not perform resume reads until the slug has passed validation and containment checks.

  10. If the user supplies an invalid override, refuse it and request a conforming lowercase, hyphenated slug rather than attempting to sanitize ambiguous traversal input.

A safe invariant should be enforced before every filesystem operation:

text
canonical_destination starts with canonical_concepts_root + path_separator

The root itself should not be accepted as a concept destination.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Taken as a whole, this file contradicts the manifest by operationalizing document drafting, staged workflow advancement, and reasoning capture despite the declared binary pass/fail role. Such instruction/documentation mismatch is itself a security issue because safety decisions, approvals, and routing may rely on the manifest while the actual prompt behavior causes materially different actions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This instruction set materially expands the skill from a pass/fail concept filter into an active drafting agent that generates substantive press-release content. That scope drift is dangerous because downstream orchestrators or users may trust the manifest's narrower behavior while the file silently causes the model to produce marketing/spec-like artifacts, increasing the chance of unauthorized task execution and deceptive capability boundaries.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file directs the agent to continue into later PRFAQ stages and generate multi-stage document artifacts, which exceeds the declared role of pre-spec concept filtering. This is risky because hidden workflow escalation can cause the agent to perform broader product-definition work than authorized, undermining least privilege and making control based on manifest metadata unreliable.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill repeatedly instructs the agent to create and update workspace files such as .beagle/concepts/<slug>/prfaq.md and brief.md, but it does not require explicit user confirmation before making those writes. In an agent environment, silent file creation/modification can surprise users, overwrite prior work, or be abused through crafted inputs such as a malicious slug or unintended resume path, especially because the workflow encourages persistent state across runs.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The instruction to write stage state into prfaq.md gives the skill a persistent state-management behavior not justified by its stated coaching-only purpose. Unauthorized writes are dangerous because they can alter workflow state, create misleading provenance or reasoning artifacts, and trigger later stages or automations based on data the user did not explicitly approve.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file directs the agent to modify prfaq.md state and then load another file, but it does not require any user-visible disclosure or confirmation before changing project workflow state. This can cause silent state transitions or unintended file edits during an interactive session, which is risky even if the intent is just orchestration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The transition gate again instructs updating prfaq.md and loading references/internal-faq.md without surfacing that this will alter project state. Because this happens at a stage boundary, it could silently advance the workflow and overwrite expected sequencing, reducing user control and auditability.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.