Back to skill

Security audit

Novel Director

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent novel-writing skill, but its broad triggers and unsafely scoped local project file operations should be reviewed before installation.

Install only if you are comfortable with the assistant creating and updating local novel project files. Use explicit project names, avoid names containing slashes or path-like text, and review any save/export action before allowing writes.

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

User-Controlled Project Names Permit Filesystem Path Traversal

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 123-170
Vulnerability Type: Unsanitized user input used to construct filesystem paths
Risk Level: Medium

Vulnerable Code Snippet

The following is a faithful English rendering of the relevant workflow:

text
"Create novel"       | Create a new novel project and initialize the knowledge base and index
"Continue [name]"    | Load an existing novel and restore its writing state

Save process:
1. Receive the save instruction.
2. Write the current content to the corresponding file.
3. Update the timestamp.
4. Confirm that the draft was saved.

Load process:
1. Receive the load instruction.
2. Read projects/[novel name]/world_knowledge.json.
3. Read projects/[novel name]/chapter_index.json.
4. Read the final chapter.
5. Load the current draft if present.

The same unsafe path-construction behavior is also documented in README.md, lines 75-105.

Technical Analysis

The workflow accepts a novel name from the user and incorporates it directly into filesystem paths beneath projects/. It does not require validation, canonicalization, separator rejection, or a post-resolution containment check.

Consequently, a project name containing traversal components such as ../, platform-specific separators, or an absolute path could resolve outside the intended project directory. The affected operations include project creation, loading, draft saving, chapter completion, metadata updates, and export.

This is an insecure path-construction design rather than confirmed malicious behavior. Exploitability depends on how the host agent implements these instructions and on the filesystem permissions available to that agent.

Attack Path

  1. An attacker supplies a crafted novel name containing traversal components, such as ../../target.
  2. The attacker invokes a supported operation such as loading, saving, completing a chapter, or exportin ...[truncated 1046 chars]
Remediation
View remediation

Remediation Suggestions

  1. Treat the user-provided novel title as a display value only and generate a separate safe project identifier.
  2. Permit only a conservative identifier format, such as ASCII letters, digits, hyphens, and underscores.
  3. Reject absolute paths, empty names, dot segments, null bytes, and both Unix and Windows path separators.
  4. Resolve the project root and requested target to canonical absolute paths before every read or write.
  5. Verify that the resolved target is a descendant of the canonical projects/ directory.
  6. Apply the same containment validation to project creation, loading, saving, chapter completion, metadata updates, and export.
  7. Avoid following symbolic links within project directories, or verify containment again after resolving symbolic links.
  8. Use atomic file creation and replacement APIs where supported.
  9. Add negative tests for traversal strings, absolute paths, mixed separators, encoded separators, symbolic-link escapes, and names that normalize to parent directories.
  10. Document that filesystem operations must fail closed when validation or canonicalization cannot be completed.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README states that commands like “保存” and “导出” write files, but it does not warn users that local project files will be created or modified. Because this skill is designed around persistent chapter/draft storage, silent file modification can surprise users and amplify the impact of accidental invocation caused by the broad triggers elsewhere in the skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The new-session auto-load rule is ambiguous: phrases like “继续写”, “继续创作”, or “恢复小说” are broad and the README says the AI will automatically detect the most recent project. In a multi-context assistant, that can cause unintended project loading, cross-session data exposure, or state confusion without an explicit project selection boundary.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes very common phrases such as “写小说”, “继续写”, and especially “保存”, which can plausibly appear in ordinary conversation outside explicit skill use. This creates a real risk of unintended skill activation and accidental execution of save/load behaviors, particularly because the skill also advertises stateful filesystem actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases include very generic requests such as “写小说”, “来一段故事”, and “继续写”, which can unintentionally activate the skill during normal conversation. Because this skill also defines persistence and project-loading behaviors, accidental invocation could expose or alter stored project context rather than just produce a harmless story response.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the AI to perform file-writing, project creation, and state updates to paths like projects/小说名/... without any user-facing warning, consent checkpoint, or path-safety constraints. In an agent environment with tool/file access, this can lead to unintended overwrites, unauthorized persistence, or manipulation of local project data, especially when combined with broad triggers and user-controlled project names.

Content

No source excerpt is available for this finding.