Back to skill

Security audit

novel-master

Security checks for vulnerabilities and agentic risk

Overview

This novel-writing skill is mostly purpose-aligned, but its helper scripts can read or write outside the intended novel workspace if given crafted project names.

Review before installing. Use it only for trusted novel project names and avoid passing names containing slashes, backslashes, dots, or absolute paths until the scripts add path validation and containment checks. Expect it to create and maintain persistent manuscript state under ~/.qclaw/workspace/novels/.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/init_book.py:13
Finding

Unsanitized project and character names allow path traversal and unintended file access

Content
View full analysis
2 else "" # Create project root 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"# 文风日志 - {book_name}\n\n## 记录\n", encoding="utf-8" ) (base_dir / "settings" / "world.md").write_text( f"# 世界观设定 - {book_name}\n\n", encoding="utf-8" ) (base_dir / "outline" / "arc-outline.md").write_text( f"# 分卷大纲 - {book_name}\n\n", encoding="utf-8" ) ``` `scripts/char_state.py:24-36`: ```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 _bus_file(book): return ROOT / book / "tracker" / "plot_bus.json" ``` `scripts/ncg.py:18-30`: ```python ROOT = Path.home() / ".qclaw" / "workspace" / "novels" def _ncg_file(book): return ROOT / book / "tracker" ...[truncated 3738 chars]
Remediation
View remediation
Path: for part in parts: candidate = Path(part) if ( not part or candidate.is_absolute() or part in {".", ".."} or "/" in part or "\\" in part ): raise ValueError("Invalid path component") result = root.joinpath(*parts).resolve() if not result.is_relative_to(root): raise ValueError("Path escapes the permitted workspace") return result ``` 4. Apply the same validated path helper consistently in every script. 5. Refuse to initialize over an existing project unless the user supplies an explicit overwrite option. 6. Use atomic writes through a temporary file in the validated target directory, followed by `Path.replace()`. 7. Where symbolic links are not required, reject targets or parent directories that are symbolic links. 8. Add tests covering absolute paths, nested traversal, mixed separators, symbolic links, and valid international book names. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/char_state.py:68
Finding

Unrestricted character-state patching permits protected-field corruption

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is a novel-writing skill, but the content embeds operational behaviors for auditing, state recovery, and local file consistency checks via scripts and command-style flows. This mismatch can cause an invoking agent or user to underestimate that the skill performs internal file inspection and workflow control actions, increasing the risk of unintended local access or execution-oriented behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README defines activation using very broad natural-language requests like '我要写一本悬疑小说', and the metadata says it should trigger for common tasks such as writing stories, chapter writing, and long-form fiction. This can cause the skill to auto-activate for many ordinary user requests, unexpectedly taking over the assistant's behavior, workspace, and file-writing workflow. In an agent environment, overbroad triggering increases the chance of unintended execution and cross-task interference even if the skill is not overtly malicious.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description prominently defines the skill as a 'Publication-Grade Chinese Novel' writing kit, indicating a fixed language/locale behavior. The README does not state that users can choose another language or opt into Chinese-only operation, which creates a natural-language locale policy concern.

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
91% confidence
Finding

The skill instructs the agent to read and write files in a local workspace, but it does not declare any explicit tool scope or permissions boundary. That creates an authorization ambiguity where an agent may access or modify project files more broadly than intended, especially because the workflow includes state updates and tracker writes.

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, creating stories, chapter writing, and continuous plot development, making the skill likely to activate in many loosely related contexts. Over-broad activation raises the chance that file-writing or audit behaviors are brought into sessions where the user only wanted general creative assistance, expanding the attack surface unnecessarily.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description states this is a '中文长篇小说' skill package, and later the document says the default target is publication-grade output in that mode. This establishes a language constraint without indicating that the user can choose another language or explicitly opt into Chinese-only behavior. Under the language/locale policy, forced language behavior should be optional or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire skill file is written as a Chinese-only operational specification, with no indication that users may choose another language or locale. Under the policy rule, forcing a specific language without opt-in is a natural-language policy concern unless the regional constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The title and entire guide are written as a prescriptive Chinese-language standard, and no line indicates that language choice is optional or limited to a China-specific use case. Under the policy, forcing a specific language or locale without user 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
98% confidence
Finding

The module documentation says the auditor performs four checks across name, time, geo, and foreshadow dimensions before each chapter is accepted. In implementation, only geo consistency and foreshadow overdue checks are actually enforced; the advertised name check is reduced to loading death markers without any validation, and no time validation exists at all.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file contains natural-language descriptions and user-facing console messages only in Chinese, which imposes a specific language on users without opt-in. Under the policy, forcing a specific language or locale without offering a choice 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
96% confidence
Finding

The script prints completion and next-step instructions only in Chinese, which forces a specific language at runtime. Because no language preference or justified locale limitation is provided, this violates the language/locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and command usage are written only in Chinese, and all user-facing messages in the script are likewise Chinese-only. This imposes a specific language on users without opt-in or explanation, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The banner text presents the skill description and capability list entirely in Chinese, which is a natural-language locale choice embedded in the asset. The policy calls for flagging language or locale constraints when a specific language is forced without user opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file presents all instructions and quality criteria exclusively in Chinese, and nowhere indicates that the user can choose another language or that the skill is intentionally limited to a Chinese-language context. Under the 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

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file presents all instructional content in Chinese and does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the policy rule for language or locale constraints, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown skill content presents all instructions and summaries only in Chinese, which can constitute a language/locale policy issue when no user opt-in or alternative language is offered. The file does not indicate that the skill is intentionally region-specific or limited to Chinese-speaking users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The document explicitly states a Chinese-only compression estimate ("中文按 字数 × 1.5 估算 token") as the operative guidance, which imposes a language-specific assumption in natural-language instructions. There is no opt-in, alternative for other languages, or statement limiting the skill to a Chinese-writing context.

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 contains all user-facing instructions in Chinese and does not indicate that users may choose another language or that the skill is intended only for a Chinese-language context. Under the policy rule for natural-language violations, forcing a specific language without user opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring, command descriptions, and all user-facing messaging are written only in Chinese, which imposes a specific language on users. The file does not offer an alternate language, opt-in, or any documented reason that the skill is intentionally region- or locale-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

Runtime outputs such as version warnings, success messages, and command errors are emitted exclusively in Chinese. Because the skill provides no language selection or documented locale restriction, this is a natural-language policy issue under the language/locale rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring, usage instructions, and all user-facing CLI messages are written only in Chinese, which imposes a specific language on users. Under the policy, locale or language constraints should either be optional or clearly justified; this file does not provide a user language choice or explain why Chinese-only output is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file contains natural-language strings and usage documentation entirely in Chinese, including the top-level usage text shown to users. Under the policy, forcing a specific language without user opt-in can be a locale/language policy violation when no alternative or justification is provided.

Content

No source excerpt is available for this finding.