Back to skill

Security audit

novel-free

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Chinese novel-writing workflow, but its local shell project-management scripts have unsafe file-generation and overwrite behaviors that warrant Review before installation.

Review before installing or running. Use only simple project names with letters, numbers, underscores, or hyphens; avoid switching to pre-existing project directories with unusual names; do not source generated .novel-free-env or isolated-env.sh files from untrusted directories; and consider fixing project-manager.sh to validate and shell-escape all generated values before use.

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/project-manager.sh:158
Finding

Shell Command Injection in Generated Environment Scripts

Content
View full analysis
"$PROJECT_ENV_FILE" << EOF # novel-free 项目环境配置 # 生成时间: $(date) NOVEL_FREE_PROJECT="$project_name" NOVEL_FREE_PROJECT_DIR="$project_dir" NOVEL_FREE_PROJECTS_DIR="$projects_dir" # 快捷命令 alias novel-status="$0 status $project_name" alias novel-backup="$SKILL_DIR/scripts/error-handler.sh backup $project_dir" alias novel-resume="$SKILL_DIR/scripts/error-handler.sh resume $project_dir" echo "已切换到项目: $project_name" echo "项目路径: $project_dir" echo "" echo "可用快捷命令:" echo " novel-status - 查看项目状态" echo " novel-backup - 备份项目" echo " novel-resume - 恢复项目" echo " $0 current - 显示当前项目" EOF echo "✅ 已切换到项目: $project_name" echo "" echo "要激活环境,请运行:" echo " source $PROJECT_ENV_FILE" echo "" echo "或者直接使用:" echo " $0 status $project_name" } ``` ```bash # scripts/project-manager.sh:286-341 create_isolated_env() { local project_name="$1" local projects_dir="${2:-$DEFAULT_PROJECTS_DIR}" local project_dir="$projects_dir/$project_name" if [[ -z "$project_name" ]]; then echo "错误: 需要指定项目名称" return 1 fi if [[ ! -d "$project_dir" ]]; then echo "错误: 项目不存在: $project_name" return 1 fi local env_script="$project_dir/isolated-env.sh" cat > "$env_script" << EOF #!/usr/bin/env bash # # novel-fr ...[truncated 3642 chars]
Remediation
View remediation
&2 return 1 fi ``` 2. Canonicalize and validate `projects_dir`, ensuring that the resolved project path remains under the intended project root. 3. Serialize every value written into shell source using shell-safe escaping: ```bash printf 'NOVEL_FREE_PROJECT=%q\n' "$project_name" printf 'NOVEL_FREE_PROJECT_DIR=%q\n' "$project_dir" ``` 4. Do not construct aliases by concatenating untrusted strings. Prefer shell functions whose arguments are stored in safely escaped variables. 5. Generate the file with a quoted heredoc only for static content, and append dynamic assignments using `printf '%q'`. 6. Consider replacing sourceable shell files with a non-executable data format such as JSON. A trusted script can parse the data and set the required environment variables. 7. Add regression tests covering quotes, semicolons, command substitution, spaces, newlines, and option-like project names. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/project-manager.sh:174
Finding

Predictable Environment File Write Follows Symbolic Links

Content
View full analysis
"$PROJECT_ENV_FILE" << EOF # novel-free 项目环境配置 # 生成时间: $(date) NOVEL_FREE_PROJECT="$project_name" NOVEL_FREE_PROJECT_DIR="$project_dir" NOVEL_FREE_PROJECTS_DIR="$projects_dir" # 快捷命令 alias novel-status="$0 status $project_name" alias novel-backup="$SKILL_DIR/scripts/error-handler.sh backup $project_dir" alias novel-resume="$SKILL_DIR/scripts/error-handler.sh resume $project_dir" echo "已切换到项目: $project_name" echo "项目路径: $project_dir" echo "" echo "可用快捷命令:" echo " novel-status - 查看项目状态" echo " novel-backup - 备份项目" echo " novel-resume - 恢复项目" echo " $0 current - 显示当前项目" EOF ``` ### Technical Analysis The `switch` operation writes to a predictable relative filename, `.novel-free-env`, in the current working directory. The code does not verify whether the destination already exists, whether it is a symbolic link, or whether the current directory is trusted. Standard shell output redirection follows symbolic links. Therefore, if `.novel-free-env` is a symbolic link to another file writable by the victim, the `cat >` redirection truncates and replaces the linked file. Because the destination is relative to the caller’s current directory, the risk is elevated when the script is executed from a shared, downloaded, or attacker-controlled directory. ### Attack Path 1. An attacker gains write access to a directory from which the victim is expected to run the project manager. 2. The attacker creates a symbolic link from the predictable destination to a file writable by the victim: ```bash ln -s "$HOME/.bashrc" .novel-free-env ``` 3. The victim runs a valid project switch operation from that dire ...[truncated 1007 chars]
Remediation
View remediation
&2 return 1 fi ``` 3. Create a temporary file securely in the destination directory, set restrictive permissions, and atomically rename it: ```bash umask 077 tmp_file=$(mktemp "${PROJECT_ENV_FILE}.tmp.XXXXXX") || return 1 # Write validated content to "$tmp_file". mv -T -- "$tmp_file" "$PROJECT_ENV_FILE" ``` 4. Where supported, use no-follow file-opening semantics and verify the destination with `lstat` immediately before replacement. 5. Refuse to overwrite an existing file unless it is a regular file owned by the current user and explicit replacement was requested. 6. Add tests that pre-create `.novel-free-env` as a symbolic link and verify that the script exits without modifying the target. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (66)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is presented primarily as a novel-writing workflow, but the documented behavior includes reading local OpenClaw configuration and automatically rewriting config.md and agent-registry.json. That mismatch can mislead users into granting trust to a creative-writing skill that also performs environment discovery and configuration changes, which are materially more sensitive operations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented primarily as a novel-writing workflow, but the documented behavior includes reading local OpenClaw configuration and automatically rewriting config.md and agent-registry.json. That mismatch can mislead users into granting trust to a creative-writing skill that also performs environment discovery and configuration changes, which are materially more sensitive operations.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `references/lifecycle-phase1.md` — Phase 1 前期架构详细流程

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `references/lifecycle-phase2-key-chapter.md` — 重点章节工作流

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/init-project.sh` 仅本地文件操作,不含网络请求

Chaining Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The backup retention pipeline uses ls ... | tail ... | xargs rm -f, which is unsafe because filenames are parsed through whitespace/newline-delimited text processing. If an attacker can create crafted backup filenames in the backup directory, the cleanup step may delete unintended files or fail unpredictably; in an automation-oriented skill that operates on project paths and filesystem state, this is more dangerous than in a purely informational context.

Content

Scanner excerpt · scripts/error-handler.sh (reported line 142)May include surrounding context.

sh
echo "✅ 备份完成: $backup_name (${size})"
    
    # 保留最近5个备份
    ls -t "$backup_dir"/"${project_name}"_*.tar.gz 2>/dev/null | tail -n +6 | xargs -r rm -f
}

# 模型回退函数

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises and documents shell-script execution (./novel-free-launch.sh, project creation, backup, configuration) but does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization gap where file-modifying shell behavior may be invoked without clear confinement, increasing the risk of unintended command execution or broader filesystem access than users expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

描述中直接将技能定义为“中文长篇小说多智能体创作技能”,但未说明是否支持其他语言,或是否由用户主动选择中文创作模式。该表述可能构成默认强制特定语言/locale 的策略问题。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Broad trigger phrases such as '新建小说', '继续写作', or '世界观 / 角色 / 大纲' can overlap with ordinary conversation and cause accidental activation. In a skill that can launch scripts, create projects, switch environments, or modify files, accidental invocation meaningfully raises the risk of unintended local changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill states that it can automatically update configuration, create external projects, back up data, switch projects, and isolate environments, but it does not provide a prominent warning that these actions modify local files and directories. Users may assume a documentation-only or writing-only skill and unknowingly permit changes to configuration and project state.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This manifest description broadly presents the skill as a general Chinese long-form novel creation skill and mentions multiple built-in optimizations, but it does not define when the skill should activate, what exact trigger phrases are intended, or any exclusion conditions. For manifest files, this can create ambiguity about invocation scope and increase the chance of unintended activation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description explicitly defines the skill as a Chinese long-form novel creation skill, which reads as a fixed language constraint. There is no indication here that users may opt into another language or that the Chinese-only limitation is explicitly justified as a region- or compliance-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The headings and instructions are written entirely in Chinese, including references to '中文名称', which indicates a fixed language/locale expectation. There is no natural-language indication that users may choose another language or that the Chinese-only requirement is justified by a region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This JSON manifest contains multiple natural-language agent display names exclusively in Chinese, such as "世界观构建", "角色设计", and similar entries. Because the file provides no indication that this is a region-specific skill or that users can opt into the locale, it appears to enforce a specific language in violation of the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains user-facing instructions exclusively in Chinese, and there is no indication that the skill supports other languages or that use of Chinese is an explicit opt-in. Under the policy rule for language or locale constraints, forcing a specific language without user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · assets/project-template/meta/config.md (reported line 38)May include surrounding context.

md
|------|--------|------|
| auto_advance_chapters | 4 | 一次自动写4章 |
| write_interval_seconds | 6 | API缓冲 + 阅读思考时间 |
| auto_confirm | false | 保留手动安全感 |

## 备选模型配置(回退链)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/lifecycle-phase0.md (reported line 365)May include surrounding context.

md
|------|--------|------|
| auto_advance_chapters | 4 | 一次自动写4章 |
| write_interval_seconds | 6 | API缓冲 + 阅读思考时间 |
| auto_confirm | false | 保留手动安全感 |

## 备选模型配置(回退链)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · assets/project-template/meta/metadata.json (reported line 17)May include surrounding context.

json
"totalRequested": 0,
      "currentChapter": 0,
      "intervalSeconds": 6,
      "autoConfirm": false,
      "status": "idle"
    }
  },

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/lifecycle-phase0.md (reported line 274)May include surrounding context.

md
"totalRequested": 0,
      "currentChapter": 0,
      "intervalSeconds": 6,
      "autoConfirm": false,
      "status": "idle"
    }
  },

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file contains natural-language instructions exclusively in Chinese, including headings and writing requirements, but does not indicate 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 concern.

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 template is written in Chinese and instructs users to fill it directly in that language context, but there is no indication that language choice is optional or that the template is intentionally limited to a Chinese-only audience. 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
89% confidence
Finding

The file’s title and all operational instructions are written in Chinese and define the agent role and output format exclusively in Chinese, with no indication that the user may choose another language. This creates a natural-language locale constraint that appears mandatory rather than optional, which matches the policy-violation category for forced language or locale.

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 specification requires operation and output in Chinese, including the mandated output format and writing constraints, but it does not state that language selection is optional or user-driven. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation unless 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
91% confidence
Finding

The file is written entirely in Chinese and defines the agent persona, triggers, workflow, and output format only in Chinese, with no indication that users may choose another language. Under the policy rule for language or locale constraints, this is a natural-language policy issue because the skill appears to enforce a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file is written entirely in Chinese and repeatedly defines outputs such as meta/style-anchor.md using Chinese section headings and examples, which implicitly constrains the skill to a specific language/locale. There is no indication that the user may choose another language, nor any documented region-specific justification for enforcing Chinese.

Content

No source excerpt is available for this finding.