Back to skill

Security audit

Skill Evolution

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed project wiki tool, but its Claude hook can persistently run scripts from a mutable project directory, so it should be reviewed before installation.

Install only if you are comfortable with persistent local memory and hook behavior. Prefer project installs with --no-hook unless you specifically want Claude Stop-hook reminders; if enabling hooks, review the exact .claude/settings.json diff and avoid committing or accepting changes to .wiki/scripts/ from untrusted sources. Do not store secrets, tokens, customer data, or other sensitive content in .wiki/ unless it is redacted.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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)

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/install.py:237
Finding
Repository-Controlled Reminder Script Is Automatically Executed by a Persistent Claude Stop Hook## Vulnerability Details **File Location**: `scripts/install.py:237-243, 319-320, 404-407, 559-560` **Vulnerability Type**: Project-controlled hook executable / tool hijacking **Risk Level**: Medium ### Complete Code Snippets The installer copies executable reminder scripts into the project-controlled `.wiki/scripts/` directory: ```python pairs = ([(scripts_src / n, target / ".wiki" / "scripts" / n, "scripts/" + n) for n in RUNTIME_FILES] + [(refs_src / n, target / ".wiki" / "references" / n, "references/" + n) for n in REFERENCE_FILES]) for src, dst, label in pairs: if src.exists(): with_retry(lambda s=src, d=dst: shutil.copy2(str(s), str(d))) copied.append(label) else: missing.append(label) ``` It then constructs a hook command that directly executes the project-local script: ```python if project_level: rel = ".wiki/scripts/wiki_remind.py" if os.name == "nt" else ".wiki/scripts/wiki_remind.sh" return '%s "%s"' % (detect_python() if os.name == "nt" else "bash", rel) ``` The command is persisted as a Claude Code Stop hook: ```python settings.setdefault("hooks", {}).setdefault("Stop", []).append( {"hooks": [{"type": "command", "command": command}]}) write_text(settings_path, json.dumps(settings, indent=2, ensure_ascii=False) + "\n") ``` Project-level installation enables that behavior by default unless `--no-hook` is selected: ```python if args.no_hook or not spec["supports_hook"]: reason = "已用 --no-hook 指定" if args.no_hook else "平台无 hook 机制" print("[4/4] 跳过 hook 安装(%s)" % reason) else: settings_path = target / spec["user_dir"] / "settings.json" print("[4/4] " + merge_hook(settings_path, remind_command(True, target))) ``` ### Technical Analysis Project-level installation creates a persistent Claude Code hook whose executable payload remains inside the project tree. The ho ...[truncated 2755 chars]
Remediation
## Remediation Suggestions 1. **Move executable hook helpers outside the repository.** Install the reminder script into a user-owned location such as `~/.claude/scripts/skill-evolution/` and configure both project-level and user-level hooks to invoke that protected copy. 2. **Keep repository content declarative.** Project files may contain reminder configuration or data, but automatically executed code should not be sourced from a collaborator-controlled working tree. 3. **If project-local execution is required, verify integrity before execution.** Use a trusted launcher outside the repository that: - Resolves the helper to an expected canonical path. - Rejects symbolic links and unexpected file types. - Computes and verifies a pinned cryptographic digest or signature. - Refuses execution when verification fails. 4. **Do not commit executable hook helpers by default.** Revise the recommendation to commit only non-executable `.wiki` data, or explicitly exclude `.wiki/scripts/` through version-control configuration. 5. **Require informed opt-in for project-local hooks.** Make `--no-hook` the default for project installation, clearly disclose that the configured hook will execute mutable project files, and require a dedicated flag to enable that behavior. 6. **Provide migration logic.** Existing installations should replace relative project-local hook commands with commands pointing to the protected user-owned runtime.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (46)

Agent Config Directory Access

High
Category
Agent Snooping
Content
> 用户级安装会把运行时放到 **Claude Code 自己的目录** `~/.claude/scripts/skill-evolution/`,
> 而不是 WorkBuddy 的目录,因此不装 WorkBuddy 也能用。
> 注意:它会修改 `~/.claude/settings.json`(该文件可能含 API token 等配置,
> 安装器只追加 hooks 字段,其余内容原样保留)。

手动方式(不用安装器,或想精细控制):
Confidence
90% confidence
Finding
The README instructs the installer to modify `~/.claude/settings.json`, a sensitive agent configuration file that may contain tokens, permissions, hooks, and environment settings. Even if intended for legitimate setup, automated modification of agent-global config creates a high-risk trust boundary: a compromised or buggy installer could inject persistent hooks, alter permissions, or expose secrets across all Claude Code projects.

Agent Config Directory Access

High
Category
Agent Snooping
Content
| `.wiki/` 目录名本身 | **不改名** | 旧项目、旧 hook、旧文档全都指向它 |
| `~/.workbuddy/skills/wikiskill` 等三个旧 skill 目录 | 移入归档目录 | 触发词已并入 `skill-evolution` |
| `~/.claude/scripts/wikiskill/` | 确认新 hook 生效后删除 | 旧运行时快照,不再被引用 |
| `~/.claude/settings.json` 里的 Stop hook | **必须更新** | 否则永远调用旧目录里的脚本 |
| 项目内 `CLAUDE.md` / `AGENTS.md` 里指向旧 skill 的路径 | 改为项目内 `.wiki/references/` | 旧路径指向已归档目录 |
| 自动化任务 / 定时任务里的旧 skill 名 | 改为 `skill-evolution` | 否则触发不到 |
Confidence
90% confidence
Finding
This section directs users to update the Stop hook in `~/.claude/settings.json`, reinforcing persistent modification of global agent behavior. Persistent hook changes are dangerous because they can silently execute code on future sessions and affect unrelated repositories, increasing blast radius well beyond the target project.

Agent Config Directory Access

High
Category
Agent Snooping
Content
~/.workbuddy/skills_archived/<今天日期>_merged_into_skill-evolution/;
   该归档目录已存在就跳过,不要删除任何内容。

2. 检查 ~/.claude/settings.json 的 hooks.Stop:若 command 指向
   .../scripts/wikiskill/ 或包含旧 skill 名,先备份该文件,再执行
   python ~/.workbuddy/skills/skill-evolution/scripts/install.py --platform claude --user
   安装器会自动替换旧 hook 并保留其余配置。若本身没装 Claude Code hook,跳过。
Confidence
91% confidence
Finding
The migration prompt tells an AI to inspect and rewrite `~/.claude/settings.json` and execute an installer based on that result. Having an agent modify a sensitive config file from natural-language instructions is risky because it normalizes broad filesystem/config access and could be abused to persist malicious hooks or tamper with security-relevant settings under the guise of migration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The English description similarly overstates the presence of memory deposition, gating, rollback, and autonomy progression features that are not actually implemented. In security terms, overstated guarantees are risky because operators may assume controls exist around a skill that can persist changes into toolchain configuration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The English description similarly overstates the presence of memory deposition, gating, rollback, and autonomy progression features that are not actually implemented. In security terms, overstated guarantees are risky because operators may assume controls exist around a skill that can persist changes into toolchain configuration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The English description similarly overstates the presence of memory deposition, gating, rollback, and autonomy progression features that are not actually implemented. In security terms, overstated guarantees are risky because operators may assume controls exist around a skill that can persist changes into toolchain configuration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The English description similarly overstates the presence of memory deposition, gating, rollback, and autonomy progression features that are not actually implemented. In security terms, overstated guarantees are risky because operators may assume controls exist around a skill that can persist changes into toolchain configuration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The English description similarly overstates the presence of memory deposition, gating, rollback, and autonomy progression features that are not actually implemented. In security terms, overstated guarantees are risky because operators may assume controls exist around a skill that can persist changes into toolchain configuration.

Agent Config Directory Access

High
Category
Agent Snooping
Content
- 用户提到自己装过 `wikiskill` / `rsi-knowledge` / `rsi-self-improvement-designer`;
- `~/.workbuddy/skills/` 下仍存在上述任一目录;
- `~/.claude/settings.json` 的 `hooks.Stop` 命令指向 `scripts/wikiskill/` 或包含旧 skill 名;
- 项目内 `CLAUDE.md` / `AGENTS.md` 引用了 `~/.workbuddy/skills/wikiskill/...` 之类的旧路径。

**四步动作**:
Confidence
96% confidence
Finding
The skill explicitly references inspecting and potentially modifying agent configuration under `~/.claude/settings.json` and related home-directory paths. Access to agent config directories is sensitive because it enables persistence, hook installation, and cross-project behavioral changes beyond the current workspace.

Ae1

High
Category
analysis-evasion
Content
> 完整操作手册(含可直接粘贴给 AI 的迁移指令、分平台步骤、回滚方式)见 `README.md` 的「从旧版迁移」。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
> 完整操作手册(含可直接粘贴给 AI 的迁移指令、分平台步骤、回滚方式)见 `README.md` 的「从旧版迁移」。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
prompt 模板见 `references/automation.md`。**CodeBuddy 不能直接套用**:其定时任务仅存在于
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
prompt 模板见 `references/automation.md`。**CodeBuddy 不能直接套用**:其定时任务仅存在于
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
prompt 模板见 `references/automation.md`。**CodeBuddy 不能直接套用**:其定时任务仅存在于
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Agent Config Directory Access

High
Category
Agent Snooping
Content
| 位置 | 作用范围 |
|------|---------|
| `~/.claude/settings.json` | 所有项目(一次配置永久生效) |
| `<项目>/.claude/settings.json` | 仅当前项目 |

**安装器会合并而非覆盖**:已有的 `permissions`、`PostToolUse`、其他 `Stop` hook 全部保留,
Confidence
90% confidence
Finding
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Agent Config Directory Access

High
Category
Agent Snooping
Content
| 位置 | 作用范围 |
|------|---------|
| `~/.claude/settings.json` | 所有项目(一次配置永久生效) |
| `<项目>/.claude/settings.json` | 仅当前项目 |

**安装器会合并而非覆盖**:已有的 `permissions`、`PostToolUse`、其他 `Stop` hook 全部保留,
Confidence
90% confidence
Finding
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Agent Config Directory Access

High
Category
Agent Snooping
Content
| 位置 | 作用范围 |
|------|---------|
| `~/.claude/settings.json` | 所有项目(一次配置永久生效) |
| `<项目>/.claude/settings.json` | 仅当前项目 |

**安装器会合并而非覆盖**:已有的 `permissions`、`PostToolUse`、其他 `Stop` hook 全部保留,
重复安装自动跳过,卸载只移除本框架 hook 且**绝不删除 `.wiki/` 数据**。
Confidence
90% confidence
Finding
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Hidden Instructions

High
Category
Prompt Injection
Content
# 技能进化(知行环)— 初始化 .wiki 目录结构(Windows PowerShell 原生版)
#
# 用法:
#   powershell -ExecutionPolicy Bypass -File wiki_init.ps1
Confidence
60% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The quick-start and command examples instruct users to invoke the skill with Chinese phrases such as “初始化 wiki”, “记录轨迹”, and “复盘”, and the trigger table later centers activation on Chinese names as well. Although some English aliases exist for a few commands, the document does not clearly offer users a language/locale choice for the primary interaction model, which is a natural-language locale policy concern.

Lp3

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding
The skill describes and enables file reads/writes, environment-aware behavior, and configuration changes, but it does not declare an explicit tool scope or permission boundary. In a self-modifying or automation-oriented skill, missing scope declarations increase the chance of unintended access to project files or user config without clear operator awareness.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The activation conditions are extremely broad, covering common requests like retrospectives, capability assessment, and self-improvement design. Broad triggers increase the chance the skill is invoked in contexts where the user did not intend file writes, config changes, or installation behavior, which is especially risky given the skill's documented mutation capabilities.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The quick-command list contains ambiguous commands such as initialization, evolution, status, and review without strict scope or safety boundaries. In agent environments, ambiguous trigger phrases can cause users to unknowingly enter flows that write `.wiki/`, alter prompts, or install hooks.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The file's natural-language instructions, headings, warnings, and command explanations are all presented in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to Chinese-speaking contexts. This can violate language/locale policy because it imposes a specific language without user opt-in.

Session Persistence

Medium
Category
Rogue Agent
Content
**方式 B — 手动创建**(零外部依赖,任何环境都能用):
```bash
mkdir -p .wiki/raw .wiki/knowledge .wiki/skills .wiki/meta
printf '# 模式库\n\n## 失败模式\n\n(暂无记录)\n\n## 成功策略\n\n(暂无记录)\n' > .wiki/knowledge/patterns.md
printf '# 技能演化日志\n\n(暂无记录)\n' > .wiki/knowledge/evolution_log.md
printf '# 提案影响追踪\n\n(暂无记录)\n' > .wiki/knowledge/impact_tracker.md
Confidence
87% confidence
Finding
This duplicate finding points to the same persistence behavior: the manual initialization commands create durable knowledge and history files intended to accumulate cross-session records. In the surrounding skill context, that store is central to the workflow, so absent safeguards it can become a repository of sensitive traces and derived behavioral data that outlive the original task.

Session Persistence

Medium
Category
Rogue Agent
Content
**方式 B — 手动创建**(零外部依赖,任何环境都能用):
```bash
mkdir -p .wiki/raw .wiki/knowledge .wiki/skills .wiki/meta
printf '# 模式库\n\n## 失败模式\n\n(暂无记录)\n\n## 成功策略\n\n(暂无记录)\n' > .wiki/knowledge/patterns.md
printf '# 技能演化日志\n\n(暂无记录)\n' > .wiki/knowledge/evolution_log.md
printf '# 提案影响追踪\n\n(暂无记录)\n' > .wiki/knowledge/impact_tracker.md
Confidence
87% confidence
Finding
This duplicate finding points to the same persistence behavior: the manual initialization commands create durable knowledge and history files intended to accumulate cross-session records. In the surrounding skill context, that store is central to the workflow, so absent safeguards it can become a repository of sensitive traces and derived behavioral data that outlive the original task.

Static analysis

No suspicious patterns detected.