Back to skill

Security audit

Chapter Skeleton

Security checks for vulnerabilities and agentic risk

Overview

The skill’s stated chapter-skeleton task is narrow, but the package includes broader unrelated workflows and an unconstrained script path surface that should be reviewed before use.

Review this package before installing. The core chapter-skeleton instructions are narrow and mostly coherent, but the bundle contains broader research-pipeline machinery and a script that should be confined to workspace-relative inputs and the single documented output before use in trusted workflows.

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

Workspace Path Traversal Enables Unauthorized File Reads and Writes

Content
View full analysis
1 else workspace / "GOAL.md" out_path = workspace / outputs[0] if out_path.exists() and out_path.stat().st_size > 0: if not _is_placeholder(out_path.read_text(encoding="utf-8", errors="ignore")): return 0 taxonomy = load_yaml(taxonomy_path) if taxonomy_path.exists() else None if not isinstance(taxonomy, list) or not taxonomy: raise SystemExit(f"Invalid taxonomy in {taxonomy_path}") spec = load_workspace_pipeline_spec(workspace) target_h3 = int(getattr(spec, "core_chapter_h3_target", 0) or 3) goal_line = "" if goal_path.exists(): for raw in goal_path.read_text(encoding="utf-8", errors="ignore").splitlines(): line = raw.strip() if line and not line.startswith("#"): goal_line = line break skeleton: list[dict[str, Any]] = [] section_no = 3 for topic in taxonomy: if not isinstance(topic, dict): continue title = str(topic.get("name") or "").strip() if not title: continue desc = str(topic.get("description") or "").strip() children = topic.get("children") or [] seed_topics = [ str(child.get("name") or "").strip() for child in children if isinstance(child, dict) and str(child.get("name") or "").strip() ][: max(3, target_h3)] rationale = desc or (f"retrieval-informed chapter for {title}" if not goal_line else f"{title} within {goal_line}") skeleton.append( { "id": str(section_no), "title": title, ...[truncated 3295 chars]
Remediation
View remediation
Path: relative = Path(value) if relative.is_absolute(): raise ValueError(f"Absolute paths are not allowed: {value}") candidate = (workspace / relative).resolve() if not candidate.is_relative_to(workspace): raise ValueError(f"Path escapes workspace: {value}") return candidate ``` 2. Apply this validation consistently: ```python workspace = Path(args.workspace).resolve() taxonomy_path = confined_path(workspace, inputs[0]) goal_path = confined_path( workspace, inputs[1] if len(inputs) > 1 else "GOAL.md", ) out_path = confined_path(workspace, outputs[0]) ``` 3. Prefer an explicit output allowlist because the Skill declares only one output: ```python allowed_output = (workspace / "outline/chapter_skeleton.yml").resolve() if out_path != allowed_output: raise ValueError("Output must be outline/chapter_skeleton.yml") ``` 4. Restrict input paths to the documented files unless configurable inputs are essential: - `outline/taxonomy.yml` - `GOAL.md` 5. Validate resolved paths immediately before each filesystem operation to reduce time-of-check/time-of-use risk. In environments where untrusted users can modify workspace symlinks concurrently, use descriptor-based or sandbox-enforced filesystem confinement. 6. Add regression tests covering: - Absolute input and output paths. - `../` traversal. - Symlinks resolving outside the workspace. - Valid workspace-relative paths. - Attempts to replace existing empty or placeholder files outside the workspace. ]]>
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 (33)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation reportedly validates Markdown drafts, citation patterns, baseline JSONL files, global review artifacts, and LaTeX/PDF build outputs, none of which are part of the stated chapter-skeleton contract. This is dangerous because it expands both data exposure and behavioral scope far beyond what the skill description authorizes, creating opportunity for hidden inspection or unintended workflow interference.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation reportedly validates Markdown drafts, citation patterns, baseline JSONL files, global review artifacts, and LaTeX/PDF build outputs, none of which are part of the stated chapter-skeleton contract. This is dangerous because it expands both data exposure and behavioral scope far beyond what the skill description authorizes, creating opportunity for hidden inspection or unintended workflow interference.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation reportedly validates Markdown drafts, citation patterns, baseline JSONL files, global review artifacts, and LaTeX/PDF build outputs, none of which are part of the stated chapter-skeleton contract. This is dangerous because it expands both data exposure and behavioral scope far beyond what the skill description authorizes, creating opportunity for hidden inspection or unintended workflow interference.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation reportedly validates Markdown drafts, citation patterns, baseline JSONL files, global review artifacts, and LaTeX/PDF build outputs, none of which are part of the stated chapter-skeleton contract. This is dangerous because it expands both data exposure and behavioral scope far beyond what the skill description authorizes, creating opportunity for hidden inspection or unintended workflow interference.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The implementation reportedly validates Markdown drafts, citation patterns, baseline JSONL files, global review artifacts, and LaTeX/PDF build outputs, none of which are part of the stated chapter-skeleton contract. This is dangerous because it expands both data exposure and behavioral scope far beyond what the skill description authorizes, creating opportunity for hidden inspection or unintended workflow interference.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation reportedly validates Markdown drafts, citation patterns, baseline JSONL files, global review artifacts, and LaTeX/PDF build outputs, none of which are part of the stated chapter-skeleton contract. This is dangerous because it expands both data exposure and behavioral scope far beyond what the skill description authorizes, creating opportunity for hidden inspection or unintended workflow interference.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation reportedly validates Markdown drafts, citation patterns, baseline JSONL files, global review artifacts, and LaTeX/PDF build outputs, none of which are part of the stated chapter-skeleton contract. This is dangerous because it expands both data exposure and behavioral scope far beyond what the skill description authorizes, creating opportunity for hidden inspection or unintended workflow interference.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation reportedly validates Markdown drafts, citation patterns, baseline JSONL files, global review artifacts, and LaTeX/PDF build outputs, none of which are part of the stated chapter-skeleton contract. This is dangerous because it expands both data exposure and behavioral scope far beyond what the skill description authorizes, creating opportunity for hidden inspection or unintended workflow interference.

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 chapter-skeleton skill. Instead of producing a narrow, retrieval-informed chapter outline artifact, it defines an end-to-end graduate thesis reconstruction and finalization pipeline, which can cause the agent to exceed scope, invoke unrelated capabilities, and overwrite or generate artifacts outside the expected boundary. In a skill system, this kind of scope drift is dangerous because routing and guardrails are often based on metadata; a mislabeled skill can bypass least-privilege assumptions and trigger unintended actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The document enumerates powerful capabilities—TeX writeback, compilation, citation enhancement, and style polishing—that are unjustified for a chapter-skeleton skill and materially broaden the authority an agent may infer from this file. If the agent follows the document rather than the declared skill contract, it may modify source files, run build steps, or alter citations and prose, causing integrity and safety issues well beyond outline drafting. The danger is amplified because these actions affect delivery artifacts, not just an intermediate outline.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file content defines an idea-brainstorm pipeline while the declared skill metadata describes chapter-skeleton. This mismatch can cause the agent to route a user into a substantially different workflow, producing unintended artifacts, invoking unrelated skills, and violating user expectations and safety assumptions tied to the advertised skill. The danger is amplified because pipeline definitions govern downstream execution behavior, so a mislabeled skill can bypass human review expectations for the requested task.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The embedded documentation says the pipeline is for research-idea brainstorming and explicitly describes outputs like output/REPORT.md, which contradicts the supplied chapter-skeleton manifest context. Contradictory docs are dangerous because operators and routing systems may trust the manifest while the implementation and prose steer execution toward a different objective, increasing the chance of unauthorized or incorrect task execution. In an agent setting, documentation is operational control surface, so inconsistency materially raises misrouting and misuse risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a narrowly scoped skill that builds outline/chapter_skeleton.yml with no prose and no network, but this file implements a general-purpose unit runner that selects runnable tasks from UNITS.csv, invokes arbitrary skills via scripts/run.py, updates workflow state, enforces approvals, and writes multiple operational artifacts. Those behaviors are broader workflow-execution capabilities rather than chapter-skeleton construction itself.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

A chapter-skeleton skill should operate on local taxonomy/core-scope inputs and emit a chapter-level outline, but this code launches scripts/run.py through subprocess.run using unit metadata from UNITS.csv. Spawning an external executor for arbitrary skills is a powerful orchestration capability that is not justified by the manifest's limited content-generation purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This file is functionally an ideation and memo-generation module, not a chapter-skeleton builder. In an agent skill, that mismatch is dangerous because invocation under the trusted 'chapter-skeleton' label can cause the agent to perform materially different actions and produce off-scope outputs, undermining user intent, pipeline integrity, and downstream review assumptions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code constructs prose-heavy artifacts such as memos, appendix text, takeaways, discussion questions, and narrative reports, directly violating the manifest guardrail of 'NO PROSE' and 'chapter-level only'. That is dangerous because other agents or users may trust the skill metadata and consume these outputs as compliant artifacts, causing policy bypass and contaminating structured outline stages with free-form invented analysis.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares broad operational behavior such as reading workspace files, writing outputs, and invoking python scripts/run.py, but it does not declare an explicit tool or permission scope. That makes the effective authority of the skill ambiguous and can allow broader file and shell access than reviewers or orchestrators would expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The pipeline explicitly enables a shell-backed pre-retrieval step while also marking its approval surface as false, which can cause command execution to occur without a clear user-facing disclosure or consent checkpoint. Even though the skill metadata says network is none, shell execution still expands the attack surface to local command misuse, unintended file access, or unsafe chaining with workspace inputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file repeatedly frames the pipeline as specifically for producing a Chinese thesis, starting from the title and core goal, without offering any user language choice or clarifying that the skill is restricted to a China-specific institutional context. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The opening description frames the artifact as a graduate-thesis reconstruction and finalization workflow, directly conflicting with the declared chapter-skeleton intent. This conflict can mislead orchestration, reviewers, or downstream automation into treating a narrow outlining skill as a broad document-engineering workflow, increasing the chance of unsafe or unauthorized task expansion. While this is more of a scope/integrity issue than direct code execution, it still undermines trustworthy skill isolation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The routing hint "one page" is very generic and can match common user phrasing unrelated to this specific literature-snapshot pipeline. That can cause incorrect skill selection or unexpected pipeline activation, which is a prompt-routing integrity issue even though the pipeline itself has no network access and limited direct harm.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The routing hint list includes a very generic term, "tutorial", which is common natural language and may cause this pipeline to be selected for unrelated requests. Over-broad routing can misinvoke the wrong workflow, leading to incorrect artifact generation, scope confusion, and reduced reliability of downstream steps even though the file itself does not grant network or code execution capabilities.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · tooling/executor.py (reported line 105)May include surrounding context.

python
workspace: Path,
    repo_root: Path,
    strict: bool = False,
    auto_approve: set[str] | None = None,
) -> RunResult:
    units_path = workspace / "UNITS.csv"
    status_path = workspace / "STATUS.md"

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · tooling/executor.py (reported line 126)May include surrounding context.

python
workspace: Path,
    repo_root: Path,
    strict: bool = False,
    auto_approve: set[str] | None = None,
) -> RunResult:
    units_path = workspace / "UNITS.csv"
    status_path = workspace / "STATUS.md"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The auto_approve path can convert HUMAN-owned checkpoints into approved and DONE status without an actual human decision. If an attacker or untrusted caller can influence auto_approve, they can bypass governance gates and advance sensitive workflow stages that were intended to require manual review.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.