Back to skill

Security audit

Chapter Briefs

Security checks for vulnerabilities and agentic risk

Overview

The main skill does generate chapter briefs, but it also allows under-scoped file paths and ships broad unrelated pipeline tooling that users should review before installing.

Install only if you are comfortable with this package containing more than the chapter-brief helper. Prefer running the documented default command, avoid passing untrusted --inputs or --outputs values, and consider adding an allowlist or containment check so the script can only read outline/outline.yml, outline/subsection_briefs.jsonl, GOAL.md, and write outline/chapter_briefs.jsonl.

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
scripts/run.py:90
Finding

Workspace Path Traversal Enables Out-of-Scope File Reads and Writes

Content
View full analysis
= 3 else "GOAL.md") out_path = workspace / outputs[0] ``` The constructed output path is later used without a workspace-containment check: ```python ensure_dir(out_path.parent) _check_no_placeholders(records) write_jsonl(out_path, records) ``` The underlying write operation atomically replaces an existing destination: ```python def atomic_write_text(path: Path, content: str) -> None: ensure_dir(path.parent) fd, tmp_path = tempfile.mkstemp(prefix=path.name, dir=str(path.parent)) try: with os.fdopen(fd, "w", encoding="utf-8") as handle: handle.write(content) os.replace(tmp_path, path) ``` ### Technical Analysis The `--inputs` and `--outputs` arguments are accepted as arbitrary semicolon-separated paths. These values are joined to the workspace using the `/` operator but are not validated, canonicalized, or checked for containment within the workspace. An absolute `Path` operand causes the workspace prefix to be discarded. Relative paths containing `../` can also resolve outside the workspace. Consequently, the program can access any path permitted by the operating-system identity running the Skill. The output path is particularly significant because `write_jsonl()` eventually calls `os.replace()`. This can replace an existing writable file without prompting the user. A symlinked directory within the workspace may provide another rou ...[truncated 2280 chars]
Remediation
View remediation
Path: relative = Path(value) if relative.is_absolute(): raise ValueError(f"Absolute path is not allowed: {value}") root = workspace.resolve(strict=True) candidate = (root / relative).resolve(strict=False) try: candidate.relative_to(root) except ValueError as exc: raise ValueError(f"Path escapes workspace: {value}") from exc return candidate ``` 3. Apply this validation independently to every input and output path before any read, directory creation, or write. 4. Use an explicit allowlist for expected inputs and outputs rather than accepting arbitrary filesystem locations. 5. Before writing, validate existing parent directories with `resolve()` and reject symlink-based escapes. Where supported, use descriptor-relative operations and no-follow semantics to reduce time-of-check/time-of-use risks. 6. Refuse to overwrite an existing output unless it is the documented output artifact or the user has explicitly enabled an overwrite option. 7. Add tests covering: - Absolute Unix and Windows paths. - `../` traversal. - Nested traversal after normalization. - Symlinked workspace directories pointing outside the workspace. - Existing out-of-workspace targets. - Valid documented workspace-relative paths. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (42)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The analyzed behavior extends into draft auditing, citation enforcement, LaTeX/PDF validation, and bibliography-related checks despite a description limited to chapter brief generation. That discrepancy creates a hidden privileged reviewer role, increasing the risk of unauthorized access, modification pressure, and misleading operator expectations about what the skill can inspect or affect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The analyzed behavior extends into draft auditing, citation enforcement, LaTeX/PDF validation, and bibliography-related checks despite a description limited to chapter brief generation. That discrepancy creates a hidden privileged reviewer role, increasing the risk of unauthorized access, modification pressure, and misleading operator expectations about what the skill can inspect or affect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The analyzed behavior extends into draft auditing, citation enforcement, LaTeX/PDF validation, and bibliography-related checks despite a description limited to chapter brief generation. That discrepancy creates a hidden privileged reviewer role, increasing the risk of unauthorized access, modification pressure, and misleading operator expectations about what the skill can inspect or affect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The analyzed behavior extends into draft auditing, citation enforcement, LaTeX/PDF validation, and bibliography-related checks despite a description limited to chapter brief generation. That discrepancy creates a hidden privileged reviewer role, increasing the risk of unauthorized access, modification pressure, and misleading operator expectations about what the skill can inspect or affect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The analyzed behavior extends into draft auditing, citation enforcement, LaTeX/PDF validation, and bibliography-related checks despite a description limited to chapter brief generation. That discrepancy creates a hidden privileged reviewer role, increasing the risk of unauthorized access, modification pressure, and misleading operator expectations about what the skill can inspect or affect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The analyzed behavior extends into draft auditing, citation enforcement, LaTeX/PDF validation, and bibliography-related checks despite a description limited to chapter brief generation. That discrepancy creates a hidden privileged reviewer role, increasing the risk of unauthorized access, modification pressure, and misleading operator expectations about what the skill can inspect or affect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The analyzed behavior extends into draft auditing, citation enforcement, LaTeX/PDF validation, and bibliography-related checks despite a description limited to chapter brief generation. That discrepancy creates a hidden privileged reviewer role, increasing the risk of unauthorized access, modification pressure, and misleading operator expectations about what the skill can inspect or affect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The analyzed behavior extends into draft auditing, citation enforcement, LaTeX/PDF validation, and bibliography-related checks despite a description limited to chapter brief generation. That discrepancy creates a hidden privileged reviewer role, increasing the risk of unauthorized access, modification pressure, and misleading operator expectations about what the skill can inspect or affect.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file is materially misaligned with the declared skill: instead of generating narrow, no-prose H2 chapter briefs for survey outlines, it defines an end-to-end graduate-thesis reconstruction and delivery pipeline with multiple unrelated capabilities. This kind of scope expansion is dangerous because an agent selecting the skill by metadata could be induced to perform broad document transformation, writing, TeX writeback, and review actions far beyond the user’s expected permission boundary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The functions in this region synthesize new research directions, rank them, and formulate theses, probes, and contribution claims, directly violating the guardrail to avoid inventing papers or prose beyond referenced mapped material. That behavior is dangerous because it can fabricate unsupported research content and mislead users into treating generated hypotheses as grounded chapter-planning evidence.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code path generates broad 'Research Idea Brainstorm Memo' and appendix/report artifacts, which is materially outside the declared skill scope of building per-chapter H2 briefs. In an agent setting, this mismatch can cause the skill to produce unauthorized outputs, invent structure/content, and contaminate downstream writing workflows that expect only constrained chapter-brief artifacts tied to existing subsection IDs and mapped papers.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest says chapter-briefs should only build per-H2 briefs with 'NO PROSE' and reference existing subsection IDs/papers. But this file is a global dispatcher and validator covering many unrelated skills and later-stage prose artifacts, including sections/*.md, output/DRAFT.md, LaTeX outputs, and citation injection; for chapter-briefs specifically it participates in a system that expects lead paragraph plans and downstream prose integration. That is materially broader than the manifest's narrowly scoped chapter-brief function.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises shell, file read, and file write capabilities via its workflow and script usage, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, this increases the chance of overbroad execution and unintended access to workspace files or command execution beyond the narrowly described chapter-brief task.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The pipeline is marked routing_default: true and pairs that with broad, generic routing hints such as survey, review, and multilingual equivalents. That can cause the pipeline to activate for loosely related requests, leading an agent to enter a large, stateful workflow without clear user intent or explicit confirmation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The phrase "Single source of truth (口径锁定)" introduces Chinese-language wording inside the operating instructions, and other lines also mix Chinese phrasing into normative guidance. The file does not state that multilingual output is optional or user-selected, so it can be read as imposing a locale-specific convention without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown repeatedly defines the pipeline as specifically for Chinese thesis writing, including the title and core goal, without offering any language or locale choice. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly justified as region-specific; here it is framed as a general pipeline for thesis reconstruction rather than an explicitly constrained regional/compliance tool.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

TeX writeback and compile/review capabilities are unrelated to generating chapter briefs and extend the skill into direct modification of delivery artifacts. In context, this is dangerous because a user invoking a planning skill could unexpectedly trigger edits to chapters/*.tex, references, cross-references, or build outputs, violating least privilege and increasing the blast radius of mistakes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Style polishing and 'de-AI' writing are directly inconsistent with the skill’s NO PROSE guardrail and transform a structural planning tool into a content-generation tool. This is dangerous because it defeats user expectations, encourages hidden prose generation under a misleading skill label, and increases the chance of unauthorized authorship or policy-evasive rewriting.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Introducing citation enhancement and bibliography writeback inside a no-prose chapter-brief skill expands the agent from structural planning into evidence manipulation and source-set mutation. That is risky because it can cause unauthorized changes to references, fabricate or overextend citation support, and bypass the skill’s stated constraint to only reference already-mapped papers.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The routing hints include very broad trigger terms such as 'idea', 'brainstorm', and common Chinese equivalents, which can cause this pipeline to activate for generic ideation requests rather than the narrowly intended research-idea workflow. Misrouting is security-relevant because it can invoke a multi-stage pipeline that creates or modifies many workspace artifacts, increasing the chance of unintended execution paths, data overwrites, or bypass of the more appropriate skill-specific guardrails.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest routing hints include "referee", which is a broad standalone term and less specific than the pipeline’s actual purpose of producing a peer-review or referee report. In a manifest file, such an underspecified trigger can increase the chance of unintended invocation because it does not clearly constrain context or usage.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The routing hint list includes the generic term "systematic", which is broad enough to match many unrelated requests and can cause this pipeline to be selected outside its intended context. In an agentic workflow, overly broad routing increases the chance of mis-execution, inappropriate artifact generation, and accidental invocation of review-specific steps on unrelated tasks.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The routing_hints value includes very broad terms such as "tutorial" and "教程", which are common words that may appear in many unrelated requests. This can cause the pipeline to be selected unintentionally, leading to misrouting, unexpected artifact generation, and execution of the wrong workflow when a more specific skill should have handled the request.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes a skill for building per-chapter briefs from existing outline inputs, with a guardrail of no prose and no invented papers. This utility file includes routines that create and rewrite status logs, decisions approvals/checklists, query seed files, TSV/JSONL/YAML outputs, and copy directory trees, which is materially broader than generating H2 writing briefs from existing mapped subsection data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest focuses on generating chapter briefs with content guardrails, not workflow governance. The approval-checklist and checkpoint-block helpers add and toggle human approval state in decisions logs, which is a project-control capability rather than a direct requirement for producing H2 briefs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.