Back to skill

Security audit

novel-master

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Chinese novel-writing package, but its helper scripts can write outside the intended project folder because book and character names are used directly in filesystem paths.

Install only if you want a Chinese-language novel workflow that creates persistent local project files. Use simple book and character names without slashes, dots, or path-like text, review generated files before reuse, and consider running the helper scripts in a contained account or workspace until path validation is fixed.

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/init_book.py:15
Finding

Path Traversal Through Unsanitized Book and Character Names

Content
View full analysis
2 else "" # Create project root directory base_dir = Path.home() / ".qclaw" / "workspace" / "novels" / book_name dirs = [ base_dir / "settings" / "characters", base_dir / "outline", base_dir / "chapters", base_dir / "tracker", ] for d in dirs: d.mkdir(parents=True, exist_ok=True) (base_dir / "state.json").write_text( json.dumps(state, ensure_ascii=False, indent=2), encoding="utf-8" ) (base_dir / "tracker" / "foreshadowing.json").write_text( json.dumps(foreshadowing, ensure_ascii=False, indent=2), encoding="utf-8" ) (base_dir / "tracker" / "conflicts.json").write_text( json.dumps(conflicts, ensure_ascii=False, indent=2), encoding="utf-8" ) (base_dir / "tracker" / "style-log.md").write_text( f"# Style Log - {book_name}\n\n## Records\n", encoding="utf-8" ) (base_dir / "settings" / "world.md").write_text( f"# World Settings - {book_name}\n\n", encoding="utf-8" ) (base_dir / "outline" / "arc-outline.md").write_text( f"# Arc Outline - {book_name}\n\n", encoding="utf-8" ) ``` `scripts/char_state.py`: ```python ROOT = Path.home() / ".qclaw" / "workspace" / "novels" def _chars_dir(book): return ROOT / book / "settings" / "characters" def _state_file(book, name): return _chars_dir(book) / name / "state.json" def cmd_init(book, name, bias=None): d = _chars_dir(book) / name d.mkdir(parents=True, exist_ok=True) sf = d / "state.json" if sf.exists(): ...[truncated 5093 chars]
Remediation
View remediation
str: value = value.strip() if not value: raise ValueError(f"{field} cannot be empty") candidate = Path(value) if candidate.is_absolute(): raise ValueError(f"{field} cannot be an absolute path") if len(candidate.parts) != 1 or value in {".", ".."}: raise ValueError(f"{field} must be a single safe path component") if "\x00" in value: raise ValueError(f"{field} contains a NUL character") return value ``` 3. Resolve every final destination and verify that it remains beneath the authorized root: ```python def project_path(book: str) -> Path: safe_book = validate_component(book, "book name") destination = (WORKSPACE_ROOT / safe_book).resolve() try: destination.relative_to(WORKSPACE_ROOT) except ValueError: raise ValueError("Project path escapes the novels workspace") return destination ``` 4. Apply the same validation to character names: ```python def character_path(book: str, character: str) -> Path: project = project_path(book) safe_character = validate_component(character, "character name") destination = ( project / "settings" / "characters" / safe_character ).resolve() characters_root = ( project / "settings" / "characters" ).resolve() try: destination.relative_to(characters_root) except ValueError: raise ValueError("Character path escapes the project") return destination ``` 5. Address symbolic-link traversal by resolving the parent directory immediately before every read or write and repeating the containment check. Where supported, use no-follow s ...[truncated 841 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Rogue AgentSelf-Modification, Session Persistence
  • 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
Findings (27)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose promises an end-to-end writing skill, but the operational content includes graph storage, fact-node processing, and version/audit commands that are more akin to a local project management and validation tool. Security-wise, misleading capability descriptions undermine policy routing and consent, because a skill triggered for harmless writing assistance may instead read, write, and manage structured local project data.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared purpose promises an end-to-end writing skill, but the operational content includes graph storage, fact-node processing, and version/audit commands that are more akin to a local project management and validation tool. Security-wise, misleading capability descriptions undermine policy routing and consent, because a skill triggered for harmless writing assistance may instead read, write, and manage structured local project data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README positions the skill as a 出版级中文长篇小说 creation package and consistently describes operation in Chinese, without stating that users may choose another language or opt in to Chinese-only behavior. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README_EN.md (reported line 89)May include surrounding context.

md
### Start Writing

Just tell your AI: **"I want to write a mystery novel"**

The AI will automatically:
1. Load genre references → 2. Generate a Creative Brief → 3. Produce Arc Outlines → 4. Write chapters → 5. Track foreshadowing → 6. Self-check quality

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding

The skill specifies file-system reads and writes to ~/.qclaw/workspace/novels/<书名>/... and references stateful tracker files, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, undeclared file access broadens what the skill may touch and makes review, sandboxing, and least-privilege enforcement harder, especially because <书名> is user-influenced and the workflow is stateful.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation text uses broad triggers such as writing novels, stories, chapter writing, continuous plot, and long-form fiction, which can match many ordinary user requests. Over-broad activation increases the likelihood that the skill is selected in contexts where its filesystem-backed workflow and state updates are unnecessary, creating avoidable exposure to local data access and unintended persistence.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description explicitly defines the skill as a '中文长篇小说' creation package, and the document consistently presents Chinese as the default operating language without offering a language choice. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale constraint is clearly documented as justified and region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill file is written exclusively in Chinese and presents its quality standards as mandatory guidance, with no indication that users may opt into another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire skill guidance is written in Chinese and provides no indication that users may choose another language or that the skill is intended only for a Chinese-language context. Under the stated policy, imposing a language/locale without opt-in is a natural-language policy violation.

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 is entirely written as a Chinese-only writing framework and assumes Chinese as the operating language without any indication that the user may choose another language. This can cause the skill to ignore user language preference or system locale, reducing usability and potentially leading to unsafe misunderstandings if users rely on precise stylistic or content controls in another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill document is written as mandatory Chinese-language operational guidance and does not offer any user opt-in or alternative locale. Under the stated policy, forcing a specific language without choice is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file's natural-language instructions and examples are presented only in Chinese, which can amount to a language/locale policy violation when no user opt-in or alternative language path is provided. The file does not state that the skill is region-specific or otherwise justified to require Chinese-only operation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The title and all guidance are written as a prescriptive Chinese writing standard, and the document does not indicate that language use is optional or limited to a region-specific context. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file contains natural-language documentation and CLI output entirely in Chinese, which forces a specific language on users. Under the policy, locale constraints should either be optional for the user or clearly documented as a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The docstring states that each chapter is checked against NCG across four dimensions and blocked if it fails. In the actual implementation, only geo consistency and foreshadow window checks can set failures; the 'name' and 'time' dimensions are initialized but never evaluated, and the 'dead character' logic is computed but unused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script creates a directory tree under the user's home directory and writes several files immediately based solely on command-line input, without any confirmation prompt or prior disclosure within the tool's behavior. While this is expected functionality for a project initializer, undisclosed filesystem modification is still a real safety issue in an agent-skill context because it can surprise users, clutter persistent storage, and be abused to create arbitrary nested paths if the book name contains path separators.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring, usage text, and command outputs are written entirely in Chinese, which imposes a specific language on users. There is no indication that the skill is region-specific or that users can opt into another language, matching the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and command usage are written only in Chinese, and the same language constraint appears in user-facing output. This imposes a specific language on users without opt-in or any documented reason that the skill is region-specific, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The runtime error and success messages are exclusively in Chinese, so users cannot choose another language or locale. Because no opt-in or justified regional limitation is present in the file, this is a natural-language policy violation under the stated rules.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README explicitly instructs users to run scripts that initialize project structures and write state, tracker, and chapter data under the local workspace, but it does not warn that these actions modify local files. In an agent context, unclear disclosure around file-writing behavior can cause unintended workspace changes, especially if a user expects advisory-only behavior from a writing skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The README frames the skill around Chinese novel production, which can imply a fixed output language or locale behavior, yet the usage example only describes writing a mystery novel and does not clarify whether the user can choose English, Chinese, or another language. This is a mild natural-language policy concern because language behavior is not clearly presented as opt-in or configurable.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown explicitly advertises helper scripts for project scaffolding, tracker CRUD, and state updates, and later shows a workspace directory that will be created and maintained. However, the README does not include any user warning that using the skill will create and modify files under the local workspace path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The visible text describes the skill as a Chinese long-form novel creation package and lists Chinese-language workflow steps, which presents a locale/language constraint in natural language. In this file there is no indication that users can choose another language or that the Chinese-only scope is explicitly justified as a region- or language-specific tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The visible text describes the skill as a Chinese long-form novel creation package and lists workflow stages only in Chinese. Because SQP-3 applies to all file types and covers language/locale policy concerns in natural-language content, this can be read as imposing a specific language context without offering choice or explaining a region-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all instructional content in a single language and does not indicate that Chinese is optional or required for a specific regional context. Under the natural-language policy rules, forcing a specific language without user opt-in can be a locale policy violation.

Content

No source excerpt is available for this finding.