Back to skill

Security audit

open-novel-writing

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Chinese novel-writing helper that creates local project files for outlines, chapters, and reviews, with some documentation rough edges but no evidence of hidden, destructive, or exfiltrating behavior.

Use this skill in a dedicated novel project directory and review generated files before running batch mode, since it can overwrite chapter specs, text, and review files. Treat the CLI examples as rough documentation, and install optional dependencies only through your normal trusted Python environment.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Note
Location
scripts/auto_write.py:11
Finding

Unpinned Third-Party Dependency Installation Guidance

Content
View full analysis

Vulnerability Details

File Location: scripts/auto_write.py, lines 11-17
Vulnerability Type: Unpinned third-party dependency
Risk Level: Low

Vulnerable Code

python
try:
    import yaml
    HAS_YAML = True
except ImportError:
    HAS_YAML = False
    print("提示: 安装 pyyaml 可获得更好的YAML支持: pip install pyyaml")

Technical Analysis

When the yaml module is unavailable, the script recommends installing PyYAML through pip install pyyaml. The command does not constrain the dependency to a reviewed version, verify package hashes, use a lock file, or require an isolated environment.

Consequently, package resolution depends on the mutable state of the configured Python package index at installation time. If the legitimate package, its distribution infrastructure, or the user's package-index configuration is compromised, an attacker-controlled release could be installed. Code from the dependency would subsequently execute when the module is imported.

The script only prints this recommendation and does not automatically execute pip, which substantially limits exploitability and makes user action necessary.

Attack Path

  1. A user runs scripts/auto_write.py in an environment where the yaml module is unavailable.
  2. The script displays the unconstrained pip install pyyaml recommendation.
  3. The user executes that command using a compromised or attacker-controlled package index, or while a malicious package release is available.
  4. pip resolves and installs the attacker-controlled distribution without version or hash verification.
  5. The malicious package executes code during installation or when import yaml is performed in a subsequent run.

Impact Assessment

Successful exploitation could execute arbitrary Python code with the privileges of the user performing the installation or running the script. This could permit access to that user's files, environment variables, crede ...[truncated 305 chars]

Remediation
View remediation

Remediation Suggestions

  1. Declare PyYAML in a maintained dependency file rather than recommending an ad hoc installation command.
  2. Pin the dependency to a reviewed version or tightly controlled compatible range.
  3. Generate and verify cryptographic hashes, such as by using a hashed requirements file and:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
  4. Document installation inside a dedicated virtual environment rather than the system Python environment.
  5. Use only trusted package indexes and explicitly configure the expected index URL where appropriate.
  6. Add automated dependency auditing and controlled update procedures so security updates can be reviewed before changing the pinned version.
  7. Replace the runtime installation prompt with a neutral error that directs users to the project's verified dependency installation documentation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The manifest presents the skill as a dialogue-guided writing assistant and explicitly says it is non-CLI-driven, but the body documents batch automation, filesystem workflows, and CLI execution. This mismatch can cause users or orchestration systems to invoke a far more autonomous and state-changing workflow than expected, including multi-file writes and unattended progression across chapters.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill describes reading and writing project files but does not declare any tool scope, permissions, or allowed-tools constraints. In an agent environment, undeclared filesystem capability increases the chance of overbroad file access or unexpected writes beyond the intended novel workspace.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The description states the skill is a Chinese long-form novel writing assistant, and later specifies output such as "纯中文正文", which indicates a fixed language requirement. The file does not offer an explicit language choice or explain that the Chinese-only constraint is optional or user-selected.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Broad trigger phrases like general writing-assistance requests can cause the skill to activate in contexts where the user did not intend this specific workflow. In agent routing, ambiguous activation increases the risk of unintended file reads, file writes, or autonomous content generation under the wrong skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Automation triggers such as '推进10章' or '写5章' are ambiguous because they can overlap with ordinary conversational writing requests while initiating a high-autonomy batch process. Without clearer boundaries, the skill may start repeated generation and file updates that the user did not explicitly authorize.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The output specification requires 正文/第XXX章.txt to contain "纯中文正文", which is a language policy constraint. Because no alternative language option or opt-in mechanism is described, this appears to force a specific locale/language choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The automated batch-writing section does not clearly warn that the skill will create and update multiple files across several project directories. Users may believe they are requesting content help, while the skill actually performs persistent state changes and bulk file operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The batch-writing activation section uses broad natural-language phrases without defining when they mean simple assistance versus autonomous execution. In practice, that makes it easier for routine requests to escalate into unattended looping behavior with repeated writes and revisions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill claims to be non-CLI-driven while also exposing direct command-line usage for automated batch writing. This inconsistency weakens trust boundaries and can mislead deployment or review systems about how the skill is intended to be executed and what level of automation it enables.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document is entirely written in Chinese and the required output template also mandates Chinese headings and labels such as '第X章评审报告' and '综合得分'. This appears to impose a specific language/locale on skill behavior without user opt-in or an explicit justification that the skill is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

This markdown file is entirely framed as prescriptive writing rules in Chinese and does not indicate that language use is optional or limited to a justified Chinese-language context. Under the policy, forcing a specific language or locale 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

The file-level description states the script is an automated writing tool and all user-facing text, directory conventions, and outputs are fixed in Chinese. There is no indication that language is configurable or that the Chinese-only constraint is an intentional region-specific requirement, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

技能清单明确强调该技能是“对话式引导,非CLI驱动”,但此文件通过 sys.argv 解析命令行参数并以 main() 入口直接执行批量流程,属于典型命令行脚本。这个运行方式不是实现细节差异,而是与声明的交互模式直接相反。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring and all user-facing messages are written only in Chinese, indicating the skill is intended to operate in a fixed language/locale. Under the policy, forcing a specific language without user opt-in or a clearly documented regional justification 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
92% confidence
Finding

This markdown file contains user-facing natural-language instructions exclusively in Chinese, including the title and all template sections. Under the policy rule for language or locale constraints, forcing a specific language without user opt-in can be a policy violation when no alternative or opt-in is provided.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

在运行流程中,注释和输出文本表明第1步会“更新设定”,并且“从上一章提取新伏笔/角色”,但后续没有任何读取上一章内容、分析角色或写入设定目录的实现。这不是单纯注释不完整,而是文档化步骤与真实行为明显不一致。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.