Back to skill

Security audit

PRE Engineering Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill openly sets up multi-agent project automation, but it gives generated agents broad authority to scan code, run continuously, and stash or commit repository changes without tight safeguards.

Review the generated guides before running them. Use this only in a clean branch or disposable repository, remove or constrain git add -A and git stash steps, keep .pre and sensitive files ignored, confirm what files agents may read, and consider provider data-sharing rules before launching Claude loop agents.

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
references/reviewer-guide-template.md:252
Finding

Overbroad Automated Git Staging, Stashing, and Committing

Content
View full analysis

Vulnerability Details

File Location: references/reviewer-guide-template.md, lines 252–271
Vulnerability Type: Overbroad repository modification and unintended data inclusion
Risk Level: Medium

Vulnerable Code

bash
cd ..
git add src/
git stash save "Before execution of round [N] planning"
bash
# Step 1: Update VERSIONS.md
# Append new version record to VERSIONS.md (format as shown in VERSIONS.md)

# Step 2: Commit version
git add -A
git commit -m "V{date}-{time} V{version} - [execution round summary]"

The related high-level instruction also appears in SKILL.md, lines 224–229:

markdown
- **When planning review passes**: Execute `git add <code_dir> && git stash save` to save a code snapshot (default src/, `.pre/` excluded via .gitignore)
- **When execution review passes**: Update `VERSIONS.md` and execute `git commit -m "V{date}-{time} V{version} - [description]"`

Technical Analysis

The generated Reviewer guide instructs an autonomous agent to manipulate the repository without restricting operations to files that were actually reviewed.

Staging src/ before running git stash save does not reliably limit the stash to src/. The default stash operation can include tracked working-tree modifications elsewhere in the repository. Consequently, unrelated tracked changes may be removed from the working tree and placed in the stash.

The subsequent git add -A is broader still: it stages additions, modifications, and deletions across the entire repository. This may include unrelated user work, generated artifacts, local configuration, .pre/ files if the assumed ignore rule is absent, or accidentally stored credentials. The automated commit then permanently records that content in Git history.

The template states that .pre/ is excluded through .gitignore, but the skill does not create or verify such an exclusion. It also provides no sensitive-file filtering, reviewed-path allowlist, staged-diff inspection, ...[truncated 1795 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove git add -A from the autonomous workflow.
  2. Stage only exact deliverable paths recorded in the approved collaboration-log entry:
    bash
    git add -- path/to/reviewed-file-1 path/to/reviewed-file-2 VERSIONS.md
    
  3. Canonicalize and validate every deliverable path before staging. Require paths to remain inside the configured code directory and reject traversal, symbolic-link escapes, .git/, .pre/, credential files, and local environment files.
  4. Replace the broad stash command with a path-scoped operation where supported, or avoid automatic stashing entirely. Do not assume prior staging limits the default stash scope.
  5. Before committing, require inspection of:
    bash
    git status --short
    git diff --cached --name-status
    git diff --cached
    
  6. Abort if staged files differ from the reviewed allowlist.
  7. Require explicit human confirmation before creating a commit, especially when new files, deletions, configuration files, or files outside the code directory are present.
  8. Add and verify ignore rules for .pre/, .env*, private keys, credentials, generated artifacts, and local configuration. Ignore rules should supplement, not replace, explicit staging.
  9. Add secret scanning as a pre-commit validation step and stop the workflow if potential credentials or private keys are detected.
  10. Update SKILL.md and the generated Reviewer template consistently so neither document recommends unscoped staging or stashing.
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (22)

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
97% confidence
Finding

The skill instructs users to launch external model/provider sessions and feed them role instructions tied to project files. This creates a data-governance and exfiltration risk because project context, requirements, and possibly code may be disclosed to external tools or providers outside the current trusted environment.

Content

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

  1. Terminal 1 — Planner (recommended: strong reasoning model, e.g. claude-opus-4-6):
    text
    cd {project_directory_path}/pre
    claude --model claude-opus-4-6
    
    Then enter:
    text

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
97% confidence
Finding

The executor startup instruction explicitly directs use of an external model/provider for coding tasks, which may involve transmitting repository content, requirements, or generated code to a third party. In a project automation context, that materially increases confidentiality and compliance risk.

Content

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

  1. Terminal 2 — Executor (recommended: fast coding model, e.g. claude-sonnet-4-6):
    text
    cd {project_directory_path}/pre
    claude --model claude-sonnet-4-6
    
    Then enter:
    text

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
97% confidence
Finding

The reviewer startup path also requires an external provider/model, potentially sending review context, code changes, and collaboration logs to third-party infrastructure. Because the reviewer sees broad project state and versioning artifacts, the exposure surface is especially wide in this role.

Content

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

  1. Terminal 3 — Reviewer (recommended: thorough review model, e.g. claude-opus-4-6):
    text
    cd {project_directory_path}/pre
    claude --model claude-opus-4-6
    
    Then enter:
    text

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are broad enough to activate on ordinary requests about collaboration, roles, or workflow setup, which can cause the skill to run when the user did not explicitly intend to initialize this PRE system. In an agentic environment, unintended activation can steer the session into generating files, workflow instructions, and multi-agent orchestration steps the user did not request, creating confusion and increasing the chance of unsafe or unwanted actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The example trigger phrases include vague language such as mentioning generic roles, which overlaps with common project-management or brainstorming requests. This makes accidental invocation more likely and can cause the system to begin a structured multi-agent setup flow without sufficiently specific user consent, leading to prompt/skill misrouting and unnecessary file-generation behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger definition is overly broad and can activate on vague 'multi-agent collaboration intent' rather than a clearly scoped PRE initialization request. Broad activation increases the chance the skill runs in contexts where users did not intend local file scanning, document generation, or multi-terminal startup instructions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs automatic scanning of the project directory and reading local files to infer requirements without an explicit warning and consent flow. That can expose sensitive local content or metadata to the model and cause users to share more repository information than they intended.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill authorizes creating a user-specified code directory even though the skill's primary purpose is project initialization and document generation. Unnecessary filesystem mutation increases risk of unintended writes, path misuse, or creating directories outside the intended workspace if the path is not constrained.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide states that timestamps must use a 'Local timezone confirmed at project initialization' and requires obtaining system time in that timezone. This imposes a locale/timezone policy without any user opt-in or clear region-specific justification, which can violate organizational language/locale policy requirements.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes a skill for initializing PRE collaboration project documents, but this template directs the Executor to run a system command (date) to obtain time. Requiring command execution is not an obvious or necessary capability for a document-initialization skill and expands the implied operational surface beyond preparing collaboration guides.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guide grants the executor operational control over loop-task lifecycle management, including recording job IDs and canceling scheduled tasks via /schedule-cancel and CronDelete. In a document template for project collaboration, these capabilities expand the agent's authority beyond code execution into orchestration control, which can be abused to terminate jobs, interfere with other agents, or create persistence/control paths not clearly bounded by user approval.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide expands a document-initialization/planning skill into operational control of background loop jobs and shell-level actions, including command execution and self-cancellation. That creates an authority mismatch: a planning template can induce agents to manipulate runtime processes or scheduling state beyond the narrow purpose implied by the skill, increasing the chance of unintended task termination, persistence, or misuse of host capabilities.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The reviewer template instructs the agent to run git stash and git commit operations, which mutate repository state even though this skill is described as initializing PRE collaboration documents. That expands the skill from document scaffolding into source-control side effects, creating unnecessary integrity risk if an agent follows the template in the wrong repository or commits unintended files.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template directs loop-task creation/cancellation and job-control handling unrelated to simple PRE project initialization. Giving an agent authority to persist, pause, restart, or cancel background jobs increases operational risk and can be abused to disrupt workflows or establish unintended persistence.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guide tells agents to record scheduler/job IDs in project docs or logs accessible to other agents. These identifiers are operationally sensitive because they enable pause/cancel targeting of running automation, so storing them in shared artifacts increases the chance of unauthorized disruption or misuse by other agents or users with repository access.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

L085 states that agents can only read the project goals document and must not modify it, presenting it as a fixed requirements artifact. Later, the startup/control instructions explicitly direct ongoing edits to .pre/project-goals.md to adjust direction, reduce scope, add requirements, or pause the project, so the earlier statement is contradicted by the skill's own documented workflow.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · references/planner-guide-template.md (reported line 102)May include surrounding context.

md
2. **Simplicity First** — Propose the minimum approach that solves the requirement. No over-designed solutions. No speculative future considerations. Each requirement should be the smallest meaningful increment that advances project goals.

3. **Surgical Changes** — Propose only what directly advances the requirement. Don't bundle unrelated improvements. Don't expand scope beyond what the project goals document specifies. Every proposed task should trace directly to the requirement.

4. **Goal-Driven Execution** — Each proposed requirement must have clear, verifiable success criteria. Transform vague goals into specific, testable outcomes. "Add feature X" → "Feature X should produce output Y when input Z is provided."

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The guide directs execution of system-affecting commands such as obtaining system time and canceling loop jobs without surfacing any user-facing warning or confirmation step. Even if the commands seem administrative, they can alter task execution state and create surprising side effects when embedded in a routine planning workflow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The template instructs the agent to create or modify auxiliary files such as .pre/.runner-ids.txt to store job identifiers, even though the skill is framed as initializing collaboration documents. This broadens write scope unnecessarily and can lead to persistence of sensitive operational metadata, unexpected file creation, or contamination of project state outside the declared artifacts.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · references/reviewer-guide-template.md (reported line 122)May include surrounding context.

md
2. **Simplicity First** — Reject code that is overcomplicated, redundant, or bloated. Boldly reject unnecessary abstractions, unused code, and speculative features. The Reviewer's role is to guard against project bloat.

3. **Surgical Changes** — When rejecting, specify only the modifications that are necessary. Don't request unrelated refactoring. Don't ask for changes beyond the scope of the current requirement. Focus rejection feedback on what directly relates to the submission.

4. **Goal-Driven Execution** — Each review must have clear, verifiable criteria. Don't approve or reject based on subjective preferences. Every acceptance/rejection must trace to specific check items in the Three-Dimension Review Standards.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide says timestamps must use the 'Local timezone confirmed at project initialization', but later cautions to comply with 'Shanghai time'. These are active documentation contradictions that can cause the reviewer to record inconsistent timestamps depending on which instruction it follows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The guide first requires use of the 'Local timezone confirmed at project initialization' for timestamps, then later says to comply with 'Shanghai time'. This imposes a locale-specific requirement without clear opt-in or justification, and the contradiction can also cause inconsistent behavior across deployments.

Content

No source excerpt is available for this finding.