Back to skill

Security audit

story-setup:网文写作工具集基础设施部署

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious with high confidence because it reports unsafe command handling, unpinned installation instructions, browser research and writing controls beyond the described setup purpose, and incomplete analysis of some files.

Consider not installing until the command-injection issue is addressed and the install and update instructions use pinned, verified sources. Review whether you want browser research and persistent writing hooks in your setup, and note that the scan was partial: 153 of 171 components were fully inspected, with 18 only partially inspected.

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

Error
Location
references/templates/agents/story-researcher.md
Finding

Externally discovered URLs are interpolated into shell-interpreted commands

Content
View full analysis

Impact

On POSIX shells, command substitution remains active inside double quotes, even when the enclosed JavaScript contains single quotes. A URL containing a literal $(id) illustrates the parsing issue: the shell executes id before passing the argument to agent-browser. A malicious substitution could execute other commands with the agent process's available permissions, enabling unauthorized file access or modification.

Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (55)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied commands retrieve content from an external webpage rather than install, configure, or validate the writing environment. No connection to an environment check is shown, so this is an undeclared research capability rather than a supporting setup detail. The snippet does not establish data exfiltration or malicious intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied chunk performs web research rather than writing-environment deployment or validation. Its search-result navigation and page-content extraction are not described capabilities and show no direct connection to checking infrastructure. Although located in an agent template, the displayed behavior is not merely a setup implementation detail.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Deployment-version checks and path-discovery utilities fit the declared infrastructure purpose. However, much of this module implements ongoing writing-workflow enforcement and editorial analysis rather than environment deployment or inspection. For example, proseBlockReason returns blocking reasons for chapter writes, proseAfterWrite reads manuscripts and produces corrective findings, and stagedMarkdownWarnings invokes git diff to identify staged files and inspect their working-tree contents. These are substantive capabilities not disclosed by the environment-focused description. The supplied chunk exports these functions; it does not itself install hooks or automatically block writes. No network transmission or destructive file modification is shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Deployment-version checks and path discovery fit the declared infrastructure purpose. However, substantial functionality implements ongoing editorial and workflow controls rather than setup or environment inspection. For example, proseBlockReason returns write-blocking reasons, proseAfterWrite analyzes manuscript text, and stagedMarkdownWarnings runs git diff --cached before inspecting local Markdown files. These capabilities are not disclosed by the setup-focused description. This chunk only exports functions, so actual hook invocation and enforcement depend on callers. No network transmission or direct file modification is shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Deployment-sentinel and adapter-support utilities fit the description, but substantial portions implement ongoing editorial enforcement and manuscript-workflow supervision. Those capabilities go materially beyond deploying or checking a writing environment and are not disclosed by the stated purpose. This chunk exports functions rather than installing hooks or independently intercepting writes; blocking depends on callers using its returned findings. No network transfer or direct file modification is shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The supplied commands perform a research search, not installation, configuration, or environment validation. Although agent integrations are declared, this chunk implements operational browsing functionality rather than merely deploying or checking an integration. It also submits the supplied search term to Google, an external interaction not represented by the declared setup-and-check purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Adapter plumbing, local state files, and deployment validation are reasonable supporting details of the declared setup function. However, this adapter also actively enforces prose-writing policy during ordinary tool use and task termination. Those content-enforcement and agent-workflow controls materially exceed deploying or checking the writing environment and are not disclosed in the description. The precise prose checks reside in an unsupplied shared module, but the adapter's deny, instruction-injection, and forced-continuation behavior is explicit in the supplied code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Deployment-version checks and project discovery support the declared infrastructure purpose. However, much of this module implements ongoing manuscript governance and editorial review, not environment setup or infrastructure verification. It reads chapter text, outlines, character sheets, and continuity records and produces substantive writing restrictions and revision instructions. These capabilities are not disclosed by the description. The supplied chunk exports functions rather than installing or directly enforcing hooks; actual blocking depends on callers. Its only shown subprocess invocation is a read-only Git diff listing, and no network transmission or file modification is shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Deployment-version checks and project discovery fit the declared infrastructure purpose. However, the chunk also implements substantive writing-workflow enforcement and manuscript-content review, which go beyond deploying or checking the writing environment. Functions such as proseBlockReason return blocking decisions for host adapters, while proseAfterWrite and stagedMarkdownWarnings inspect creative content. These are implemented capabilities, although this module only exports them and does not itself install hooks or intercept writes. No network transmission, destructive file operations, or arbitrary shell execution is evident; the subprocess invocation runs a read-only Git diff.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The supplied command performs browser-based link extraction, which is a research capability not disclosed by the infrastructure setup and environment-checking description. Nothing in this chunk ties the extraction to installation, adapter configuration, or environment validation. It returns link metadata; it does not itself navigate to those links or demonstrate data exfiltration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Deployment-marker checks, project discovery, and Codex hook integration reasonably support the declared infrastructure purpose. However, this adapter also invokes proseBlockReason to deny tool operations and reads changed manuscript Markdown files for proseNetFindings, emitting instructions to revise the prose until findings are cleared. These are ongoing writing-policy enforcement and manuscript-analysis capabilities, not merely environment deployment or checking, and are not disclosed by the description. The shared core is not supplied, so the precise blocking and inspection criteria cannot be verified. No network access or exfiltration is visible in this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The supplied commands implement web searching rather than writing-environment deployment or verification. Although located in a researcher-agent template that could be distributed by a setup tool, the search behavior itself is not described by the declared infrastructure purpose, and the snippet shows no connection to an environment check.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The supplied command performs browser-based link extraction rather than configuring or validating a writing environment. Although its location suggests a researcher-agent template that could be distributed during setup, the shown behavior itself is a research capability not described in the declared purpose. The snippet does not show page modification, credential access, or exfiltration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The deployment-marker checks, workspace discovery, and ZCode hook formatting support the declared infrastructure-adaptation purpose. However, the code also actively governs writing operations: it emits permissionDecision='deny' when proseBlockReason returns a reason, adds continuity and writing advisories, and invokes stagedMarkdownWarnings before commits. These are substantive writing-workflow controls rather than merely deployment or environment checks, and the description does not disclose them. The imported helper implementations are not supplied, so their precise validation rules and any additional side effects cannot be established from this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

Deployment-marker checks, project discovery, and Git inspection are consistent with environment setup and platform adaptation. However, this chunk primarily implements ongoing writing-workflow enforcement and model-context augmentation, not deployment or environment verification. The declared description does not disclose these runtime controls. The imported shared core is not supplied, so its exact checks cannot be verified, but the visible hook logic clearly establishes write blocking, analysis calls, and modification of model-visible context and tool results.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

代码注释明确将浏览器快照用于检查搜索结果加载情况,属于浏览器搜索或资料研究流程。声明描述的是环境部署、项目配置和基础设施检查,未涵盖此类页面内容检查。所提供片段未体现它与环境配置验证之间的联系。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

The declared purpose covers writing-project infrastructure deployment and environment checks, but the supplied command inspects browser search-result content. This is a browser research capability rather than an infrastructure check. Although the command appears in an agent template, the supplied material does not establish that this browser inspection supports the declared setup function.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
cripts/deploy-antigravity-skills.js`、`scripts/merge-project-instructions.js` 与 `scripts/copy-path-safety.js` 也必须存在(宿主部署步骤、Claude/Codex/Antigravity hooks 合并、Anti

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
th` 相对当前 `SKILL.md` 所在包目录;`Target path` 相对用户项目根。每个递归复制步骤前,先把通配符具体化为单个源/目标,再用同级 `scripts/copy-path-safety.js` 检查(按 `Path.resolve` / `realpath` 跟随 symlink,两侧存在时用

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
(8 份宿主部署文件)、`scripts/merge-hooks.js`、`scripts/generate-antigravity-agents.mjs`、`scripts/deploy-antigravity-skills.js`、`scripts/merge-project-instructions.js` 与

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
nix`、`generic`;同级 `references/deploy-*.md`(8 份宿主部署文件)、`scripts/merge-hooks.js`、`scripts/generate-antigravity-agents.mjs`、`scripts/deploy-antigravity-skills.js`、

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
`zcode`、`openclaw`、`reasonix`、`generic`;同级 `references/deploy-*.md`(8 份宿主部署文件)、`scripts/merge-hooks.js`、`scripts/generate-antigravity-agents.mjs`、`scripts/deplo

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
cripts/generate-antigravity-agents.mjs`、`scripts/deploy-antigravity-skills.js`、`scripts/merge-project-instructions.js` 与 `scripts/copy-path-safety.js` 也必须存在(宿主部

External Script Fetching

High
Category
Supply Chain
Confidence
99% confidence
Finding

The suggested curl-to-bash command executes a mutable network response without inspecting or verifying its contents. A compromised distribution endpoint could execute arbitrary commands with the user's privileges, exposing manuscripts, credentials, and agent configuration; legitimate upgrade context does not remove this risk.

Content

Scanner excerpt · UPGRADING.md (reported line 95)May include surrounding context.

md
OpenCode 2.0 起发布在 npm 包 `@opencode/cli`(`opencode-ai` 停在 1.x)。本适配只支持 2.x:1.x 的插件 loader 读不了新版 `story-hooks.ts`,在 1.x 上会没有写正文守卫与写后兜底;1.x 也不认 agents 的 `permissions:` 规则,只读 agent 会失去权限限制。story-setup 在版本是 1.x 或无法确定时停止部署。

1. 升级 OpenCode:先卸载旧包 `npm rm -g opencode-ai`,再 `npm i -g @opencode/cli`(或 `curl -fsSL https://opencode.ai/v2/install | bash`),确认 `opencode --version` 为 2.x。两个包都提供 `opencode` 命令,不先卸载旧包时 PATH 上可能仍是 1.x。
2. 更新技能包后,在写作项目根重跑 story-setup:替换 `.opencode/plugins/story-hooks.ts` 与 `.opencode/agents/`(改为 2.x 原生 `permissions:` 规则列表,已配的 `model:` 会保留),并从 `opencode.json` / `opencode.jsonc` 删除旧的 story-hooks 插件注册。

## 插件打包身份迁移(v0.7.9 同版本修复)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/antigravity/hooks/story_antigravity_hook.js (reported line 191)May include surrounding context.

js
state.findings[key] = finding
      state.hardFindings[key] = core.hasHardProseFindings(root, key)
    } else {
      delete state.findings[key]
      delete state.hardFindings[key]
    }
    changed = true