Back to skill

Security audit

novel creator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed Chinese novel-writing workflow, but it needs review because it embeds an unjustified BL exclusion in reference guidance and its clean reset script can delete project folders without its own confirmation prompt.

Review the reference-material exclusion before installing if you expect inclusive or neutral genre support. Use the initializer only in a dedicated novel project directory, and avoid `--clean` unless you have verified the target path and are comfortable relying on the generated backup.

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

Note
Location
scripts/init-novel.sh:32
Finding

Unescaped User Input Can Corrupt or Inject Fields into the JSON Manifest

Content
View full analysis

Vulnerability Details

File Location: scripts/init-novel.sh:32-42, 160; assets/init/manifest.json:1-8
Vulnerability Type: Improper escaping during JSON generation
Risk Level: Low

Vulnerable Code

bash
get_template_content() {
  local template_name="$1"
  local template_path="$INIT_TEMPLATE_DIR/$template_name"
  local content

  content="$(cat "$template_path")"
  content="${content//\{\{NOVEL_NAME\}\}/$NOVEL_NAME}"
  content="${content//\{\{MODE\}\}/$MODE}"
  content="${content//\{\{CREATED_AT\}\}/$CREATED_AT}"

  printf '%s' "$content"
}
bash
write_markdown_file "$MANIFEST_PATH" "$(get_template_content "manifest.json")"

The affected template is:

json
{
  "novel_name": "{{NOVEL_NAME}}",
  "init_mode": "{{MODE}}",
  "created_at": "{{CREATED_AT}}",
  "current_chapter": 0,
  "current_arc": "",
  "status": "active"
}

Technical Analysis

The initialization script accepts the novel name as user-controlled command-line input and replaces {{NOVEL_NAME}} in a JSON template through raw Bash string substitution. The value is not encoded according to JSON string rules.

A novel name containing a double quote, backslash, control character, or newline can therefore produce malformed JSON. A deliberately crafted value can also terminate the original string and introduce additional JSON properties. Shell command injection is not present because the relevant variables are quoted and are not evaluated as commands; the issue is confined to generated-data integrity.

The MODE value is restricted to two known strings, and the timestamp is generated internally, so the practical attacker-controlled input is NOVEL_NAME.

Attack Path

  1. An attacker or untrusted caller invokes scripts/init-novel.sh with a crafted novel name containing JSON syntax.
  2. The script stores that argument in NOVEL_NAME.
  3. get_template_content substitutes the value verbatim into assets/init/manifest.json.
  4. The resulting content is written ...[truncated 1125 chars]
Remediation
View remediation

Remediation Suggestions

Generate JSON with a JSON-aware serializer rather than textual substitution. For example, use Python:

bash
python3 - "$MANIFEST_PATH" "$NOVEL_NAME" "$MODE" "$CREATED_AT" <<'PY'
import json
import sys

path, novel_name, mode, created_at = sys.argv[1:]

manifest = {
    "novel_name": novel_name,
    "init_mode": mode,
    "created_at": created_at,
    "current_chapter": 0,
    "current_arc": "",
    "status": "active",
}

with open(path, "w", encoding="utf-8") as handle:
    json.dump(manifest, handle, ensure_ascii=False, indent=2)
    handle.write("\n")
PY

Alternatively, use jq --arg if adding that dependency is acceptable. Do not attempt to maintain JSON escaping through ad hoc shell replacements.

Additional hardening should include:

  1. Validate the generated manifest immediately with a JSON parser.
  2. Write to a temporary file in the target directory and atomically rename it after successful validation.
  3. Add regression tests for names containing double quotes, backslashes, newlines, tabs, Unicode characters, and JSON-like fragments.
  4. Keep the MODE allowlist and quoted shell expansions already present.
  5. Ensure downstream consumers validate the manifest schema and reject unexpected fields or invalid field types.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (41)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
---
name: novel-creator
description: 为中文长篇小说、连载网文、章节样稿、已有草稿续写提供一套完整且内聚的创作流程:分流新建/续写/救稿任务,维护 plan/ 与 memory/ 记忆系统,在写正文前先学习指定题材的文风笔触,再按节奏持续产出章节,并在同一技能内完成文风校准、题材适配、连载维护与必要的创作研究。适用于用户要求写小说、开书、搭大纲、出样章、分章节连载、继续写下一章、修大纲救稿、想让 AI 先学某个题材的文风再开写时。
metadata:

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1)May include surrounding context.

md
---
name: novel-creator
description: 为中文长篇小说、连载网文、章节样稿、已有草稿续写提供一套完整且内聚的创作流程:分流新建/续写/救稿任务,维护 plan/ 与 memory/ 记忆系统,在写正文前先学习指定题材的文风笔触,再按节奏持续产出章节,并在同一技能内完成文风校准、题材适配、连载维护与必要的创作研究。适用于用户要求写小说、开书、搭大纲、出样章、分章节连载、继续写下一章、修大纲救稿、想让 AI 先学某个题材的文风再开写时。
metadata:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README advertises a clean initialization mode and mentions clearing old projects, but it does not give an explicit warning near the feature description about deletion risk, scope, or confirmation requirements. In an agent skill context, this can normalize destructive operations and increase the chance that a user or agent invokes cleanup in the wrong directory, leading to data loss despite backup behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest sets language: zh-CN, and the surrounding description is entirely written as a mandatory Chinese-writing workflow. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the restriction is explicitly justified as region-specific, which is not stated here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill template is written in Chinese and does not indicate that language selection is optional or configurable. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The visible headings and column labels are entirely in Chinese, which indicates a language-specific requirement in the skill content. The file does not offer any user language choice or explain a justified region-specific constraint, so it appears to enforce a locale without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file’s visible headings and structure are entirely in Chinese, indicating the skill is authored to operate in a specific language without offering any alternative or user-selectable locale. This can violate language/locale policy when no opt-in or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file contains user-facing guidance entirely in Chinese, and there is no indication that the user can opt into this language or select another locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the constraint 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
91% confidence
Finding

The file is entirely written as a Chinese-only template and includes structural instructions intended for direct use, but it does not offer an opt-in language choice or explain that the skill is intentionally limited to Chinese users. Under the policy, forcing a specific language without user choice is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown guide mandates a single language/locale for the skill content through all headings and instructions, but provides no user opt-in, alternative language, or justification that the skill is region-specific. Under the policy, forcing a specific language without user 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
93% confidence
Finding

This markdown file presents all instructions in Chinese and does not indicate that the skill is region-specific or that users may opt into another language. Under the policy, forcing a specific language without user choice 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
91% confidence
Finding

The entire skill reference is written exclusively in Chinese, including headings, instructions, and examples, with no indication that the user may choose another language or that the skill is intentionally limited to a Chinese-language context. Under the policy, a language-only constraint without opt-in or clear justification 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
94% confidence
Finding

The document presents all guidance and examples only in Chinese, which effectively imposes a specific language on users. Under the policy criteria, forcing a language without user opt-in or a documented justification 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
94% confidence
Finding

该 markdown 文件从标题到说明均以中文固定表达,且未向用户提供语言/locale 选择,也没有说明这是仅面向中文用户或特定地区的材料。根据规则,强制单一语言且无用户选择或明确正当性,属于自然语言层面的语言/locale 政策风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document establishes a blanket exclusion of BL works as a collection policy, which is a discriminatory content restriction tied to sexual orientation/relationship theme rather than a neutral editorial criterion. In a content curation skill, this can encode biased behavior into downstream selection, generation, or moderation workflows and lead to systematic exclusion of LGBTQ+ content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This category description explicitly restricts entries to heterosexual or no-CP themes while excluding BL, making the discriminatory rule more operational and likely to affect actual corpus composition. Because this is a taxonomy used to guide content collection, it increases the chance that an agent or curator will enforce biased filtering against same-sex relationship content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The wuxia/xianxia section repeats a categorical BL exclusion, reinforcing a discriminatory rule across multiple genres rather than an isolated wording issue. Repetition in policy text makes biased enforcement more likely in downstream dataset building, recommendation logic, or agent behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The version history records removal of all BL works as a deliberate policy change, showing that the exclusion is intentional and systemic rather than accidental. This matters because it indicates the bias is part of the maintained standard and may propagate into future revisions, automated curation, or model conditioning.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents the skill content entirely in Chinese and does not indicate that language choice is optional or user-selectable. Under the stated policy, 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
94% confidence
Finding

This code explicitly defines its purpose around counting only Chinese characters and presents all documentation and CLI output in Chinese, effectively imposing a single language/locale with no opt-in or alternative. The policy for this audit flags language/locale constraints when they are forced rather than offered as a user choice or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script performs irreversible deletion with rm -rf on workspace directories when --clean is supplied, but it does not require an interactive confirmation or a stronger safety check before destruction. Although paths are quoted and constrained under TARGET_DIR, a user can still accidentally point --target-dir at the wrong location and lose data in output, memory, plan, or manifest.json, which is especially relevant for a content-creation workspace where those files may contain substantial work.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The example trigger "继续写下一章" is very generic and could match ordinary conversational requests outside a clearly bounded novel-project context. The README provides surrounding context for the skill, but this specific invocation lacks explicit constraints or negative examples to distinguish when the skill should or should not activate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown asset presents all instructions and content structure exclusively in Chinese, beginning with the title and user guidance. Under the policy scope for natural-language violations, forcing a specific language without offering user choice can be a locale/language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown template is entirely written in Chinese and provides no indication that language selection is optional or user-configurable. Under the policy criteria, a skill that enforces a specific language without opt-in can constitute a locale/language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The entire template is written in Chinese and implicitly requires users to author or consume the skill content in that language, with no indication that another language is supported or that the user can choose their preferred locale. Under the policy, a language constraint without opt-in can be a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.