Back to skill

Security audit

Xuanhuan Novelist

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real Chinese fantasy-novel writing skill, but it needs Review because it can automatically scan, write, rewrite, and run commands on workspace files with weak path and consent boundaries.

Install only if you are comfortable with a skill that creates and edits many files under a chosen workspace. Use a dedicated empty project folder, avoid analyzing unrelated drafts, review titles and generated plan paths for unsafe characters, and do not use parallel/agent-team modes or automatic repair unless you can monitor the changes.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
references/flows/phase2-planning.md:7
Finding

Unsanitized Novel and Chapter Titles Are Used in Filesystem Paths

Content
View full analysis
用户可通过 "Other" 自行输入标题。 ``` ```markdown - **命名项目目录**:`{base}/{timestamp}-{标题}/` ``` From `references/flows/phase2-planning.md`: ```markdown 1. **清理临时文件**:如果存在 `{base}/.pending-title`,读取标题后删除该文件 2. **创建项目文件夹**:`{base}/{YYYYMMDD-HHmmss}-{Layer 3 确认的标题}/` ``` From `references/flows/phase3-writing.md`: ```markdown 7. 创建章节文件 — 文件名格式:`第{XX}章-{章节标题}.md`,使用 [chapter-template.md](../guides/chapter-template.md) 模板 ``` ### Technical Analysis The workflow permits a user to enter an arbitrary custom novel title and then directly interpolates that title into a project directory path. Generated chapter titles are similarly interpolated into filenames. No rule requires normalization, filename character allowlisting, path canonicalization, or verification that the resulting path remains under `{base}` or `{projectPath}`. A title containing path separators, traversal components such as `..`, absolute-path syntax, control characters, or operating-system-specific reserved names can therefore alter the intended output location. The exact behavior depends on the filesystem API used by the hosting agent, but the Skill instructions themselves do not establish a containment boundary. The same issue can arise during interrupted-project recovery because persisted title and plan data are reused in later phases. ### Attack Path 1. The attacker selects the custom-title option. 2. The attacker supplies a title containing path separators or traversal components. 3. The title is written to `{base}/.pending-title`. 4. Phase 2 reads the title and constructs `{base}/{timestamp}-{title}/` without sanitization. 5. The agent ...[truncated 1029 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/flows/phase3-writing.md:50
Finding

Unquoted Chapter Paths Are Interpolated into Shell-Style Commands

Content
View full analysis
[writingRules.contentRules.chapterWordCount.min]` ``` ```markdown 16. 运行字数检查: python scripts/check_chapter_wordcount.py <文件路径> [writingRules.contentRules.chapterWordCount.min] ``` From `references/flows/phase4-validation.md`: ```bash python scripts/check_chapter_wordcount.py <章节文件路径> [writingRules.contentRules.chapterWordCount.min] ``` From `references/flows/shared-infrastructure.md`: ```bash python scripts/check_chapter_wordcount.py {base}/项目文件夹/第01章.md python scripts/check_chapter_wordcount.py --all {base}/项目文件夹/ python scripts/check_chapter_wordcount.py {base}/项目文件夹/第01章.md 3500 ``` ### Technical Analysis The workflow instructs the agent to construct shell-style command strings by interpolating chapter paths and a configurable word-count threshold. It does not require argument-array execution, shell disabling, quoting, escaping, path validation, or numeric validation. Chapter paths may be influenced through: - A custom novel title. - A generated chapter title. - A resumed or manually modified `02-写作计划.json`. - A project directory supplied or modified by an attacker with workspace access. If the host agent executes the resulting string through a shell, shell metacharacters in an attacker-controlled path may be interpreted as command syntax rather than as part of a filename. Quoting alone is not a complete defense when values can contain quote characters; shell invocation should be avoided entirely. The Python script itself does not contain an execution sink. The vulnerability is in the Skill's command-construction instructions a ...[truncated 1590 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
references/flows/draft-analysis.md:43
Finding

Untrusted Draft Content Is Loaded Without a Data-Only Instruction Boundary

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (46)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a creative writing assistant specialized in Xuanhuan/xianxia novel generation and refinement. The supplied code does not generate, edit, or structure novels; instead, it checks chapter files on disk for minimum Chinese character counts and prints a report. While chapter length checking could be a supporting utility within a larger writing workflow, this code chunk’s primary and only visible behavior is content-length validation. That is materially different from the declared purpose, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README presents the skill entirely in Chinese and frames its behavior around Chinese-language xuanhuan novel generation, but it does not indicate that language is configurable or chosen by the user. Under the stated policy, forcing a specific language without an explicit opt-in or offering alternatives is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The invocation examples include very broad natural-language phrases like '帮我写一部玄幻小说', which can overlap with ordinary conversation and trigger the skill unexpectedly. In an agent environment, overly broad activation increases the chance that filesystem-writing behavior and automated multi-phase execution occur without the user clearly intending to invoke this specific skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README documents automatic creation of directories and multiple output files, plus later 'automatic validation and repair' rewriting, but does not present a prominent up-front warning that the skill will write to and modify the filesystem. In an agent context, hidden or insufficiently disclosed side effects can lead to unintended file creation, overwrites, or repeated edits in the user's workspace.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 215)May include surrounding context.

md
如果输出版本号 ≥ 3.6 即满足要求。如果未安装 Python:
- **Windows**:`winget install Python.Python.3.12` 或从 [python.org](https://www.python.org/downloads/) 下载
- **macOS**:`brew install python3`
- **Linux**:`sudo apt install python3` 或对应包管理器

> **无 Python 时的降级行为**:如果环境中没有 Python,字数检查步骤会被跳过,Skill 仍能正常创作,仅无法自动校验章节字数。

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill instructs the agent to read multiple referenced files and detect existing drafts or unfinished projects, but it declares no explicit tool scope or file-access limits. In practice, this can lead to broader-than-expected filesystem reads and makes it harder for users or the platform to constrain what project data the skill may inspect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad enough that the skill may activate for many general fiction-writing requests without clear boundaries. Because the skill also includes automatic draft detection, continuation, planning, and file creation, overbroad activation increases the chance of unintended execution and project-side effects when the user did not explicitly request them.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states it will create project folders, continue unfinished work, and automatically rewrite chapters without further confirmation, but the description does not warn users about these autonomous file and content modifications. This reduces informed consent and can cause unwanted overwrites, surprise persistence, or edits to existing material, especially in a writing environment with local drafts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

All headings, prompts, options, filenames, and prescribed outputs in the skill are written in Chinese, and the workflow directs the agent to present questions and generated artifacts in that language. There is no indication that the user can opt into another language or that the locale restriction is required for a documented region-specific purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The flow authorizes automatic scanning of the user's working directory for chapter files based on broad heuristics, but does not require clear, prior consent before local files are read. Even in a writing assistant context, this can expose unrelated sensitive documents in the workspace and normalize silent file access beyond user expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs creation of multiple output files in the project directory without an upfront warning or consent gate covering filesystem writes. This can surprise users, overwrite expectations about a clean workspace, and create persistence of potentially sensitive extracted content without the user realizing files will be saved.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Automatically creating a user-preferences.json file without prior notice or consent introduces persistent storage of user behavior and preferences without transparency. Even if the data is not highly sensitive, silent persistence creates privacy risk and can surprise users who expected a stateless writing interaction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs scanning the user workspace for project state and pending files without an explicit privacy warning or prior approval. Although resume detection is functionally related to the skill, silently enumerating files across the workspace can expose unrelated project names, manuscript metadata, or other sensitive local information.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill directs scanning the entire user workspace for chapter-like files to infer writing style and settings, which can access unrelated documents far beyond the minimum data needed for the task. In a writing assistant context, broad workspace discovery risks collecting private manuscripts or notes the user did not intend to share, especially because the scan happens proactively before the user selects specific files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

All prompts and required user interactions in the file are written exclusively in Chinese, and the flow does not indicate that language is optional or configurable. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation unless clearly justified or opt-in based.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction to 'silently update' user-preferences.json without notifying the user is a genuine privacy weakness. Silent persistence removes informed consent and makes it difficult for users to understand that their responses are being retained and potentially reused in later sessions, which increases the risk of unauthorized profiling or unexpected data exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file presents all prompts and workflow instructions only in Chinese, which can amount to forcing a specific language without user opt-in. There is no indication that the skill is intentionally region-specific or that users can choose another language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The flow explicitly says to 'silently update' user-preferences.json after collecting answers, without any user-facing disclosure or explicit opt-in for persistence. This creates a privacy and consent problem because user-provided preferences may be stored beyond the immediate session unexpectedly, and could later influence behavior or be exposed through logs, sync, or other components.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

All user-facing instructions, prompts, and examples in this file are in Chinese, including the required AskUserQuestion text, and there is no indication that the user may choose another language. Per SQP-3, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file is entirely framed as a Chinese-only writing workflow and does not indicate that the language is optional or limited to a region-specific use case. 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.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file directs the agent to keep creating and modifying files chapter-by-chapter without further user confirmation. In a skill that performs extensive writes and state transitions, suppressing confirmation increases the chance of unintended bulk modification, overwrites, or runaway actions if the plan files are incorrect or adversarially altered.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The workflow explicitly instructs the agent to execute a local Python script during chapter generation. For a writing-only skill, invoking local code expands capabilities beyond text generation into host-side execution, which increases attack surface and could be repurposed if project files or arguments are influenced by untrusted input.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The sub-agent template repeats the same local Python execution pattern, multiplying risk across parallel agents. Even though the stated purpose is only word-count checking, enabling multiple agents to run local scripts creates unnecessary execution privileges for a fiction-writing skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file is written as a prescriptive workflow entirely in Chinese and presents fixed Chinese user-facing reporting text, implying the skill operates in a specific language by default. There is no indication that users may choose another language or that the Chinese-only constraint is intentionally limited to a region-specific use case.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The flow explicitly directs the agent to perform automatic validation and up to three rounds of automatic repair and file rewriting without user confirmation or a clear opt-in boundary. In a skill that creates and edits many chapter files plus shared project metadata, this can cause unintended destructive or repetitive modifications, overwrite user-authored content, and reduce user visibility into what changed.

Content

No source excerpt is available for this finding.