Back to skill

Security audit

Claude Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill is understandable as a Claude Code automation helper, but it asks for persistent, high-impact agent control that users should review carefully before installing.

Install only if you intentionally want OpenClaw to run and supervise Claude Code on your behalf. Before using it, review the exact changes to `~/.claude/settings.json` and `~/.openclaw/openclaw.json`, avoid auto mode unless you accept unprompted Claude tool execution, restrict Claude permissions to specific projects and commands, and remove the Stop hook when you no longer need this automation.

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
hooks/on_complete.py:31
Finding

Predictable Shared Temporary Files Enable Symlink Attacks and PID Manipulation

Content
View full analysis
> "$LOG_FILE"; } ``` `hooks/start_claude.sh`: ```bash MONITOR_PID_FILE="/tmp/claude_monitor_${SESSION}.pid" nohup bash "$SKILL_DIR/hooks/pane_monitor.sh" "$SESSION" > /dev/null 2>&1 & echo $! > "$MONITOR_PID_FILE" ``` `hooks/stop_claude.sh`: ```bash MONITOR_PID_FILE="/tmp/claude_monitor_${SESSION}.pid" # Stop pane monitor if [ -f "$MONITOR_PID_FILE" ]; then kill "$(cat "$MONITOR_PID_FILE")" 2>/dev/null || true rm -f "$MONITOR_PID_FILE" ``` ### Technical Analysis The Skill creates logs and PID files at predictable paths in the shared `/tmp` directory. These files are opened or overwritten without: - Atomic exclusive creation. - Symbolic-link rejection. - Ownership verification. - Restrictive file permissions. - Validation of PID-file contents and process identity. An attacker with local access can create the expected path before the Skill runs. If the path is a symbolic link, the Skill may append to or overwrite another file that the Skill user can modify. The completion hook makes this more consequential because it logs the working directory and up to 200 characters ...[truncated 1713 chars]
Remediation
View remediation
/cmdline` or an equivalent mechanism to confirm it is the expected pane monitor before signaling it. - Prefer process supervision or retain the child process handle rather than using a predictable PID file. 4. Reduce logged information: - Do not log Claude response content or absolute working directories by default. - Add an explicit debug mode for sensitive diagnostic logging. - Separate logs by session and apply mode `0600`. 5. Validate session names with a strict allowlist such as `^[A-Za-z0-9_-]+$` before using them in filenames or process matching. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
hooks/on_complete.py:227
Finding

Absolute Transcript Path Is Delivered Through an External Messaging Channel

Content
View full analysis
bool: """Wake the OpenClaw agent and report whether the process started.""" try: cmd = [ "openclaw", "agent", "--agent", AGENT_NAME, "--message", msg, "--deliver", "--channel", CHANNEL, "--timeout", "120", ] if ACCOUNT: cmd.extend(["--account", ACCOUNT]) proc = subprocess.Popen( cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, ) log(f"agent wake fired (pid {proc.pid})") return True except Exception as e: log(f"agent wake error: {e}") return False ``` The transcript path is read from the hook payload: ```python transcript_path = notification.get("transcript_path", "") ``` It is then included unconditionally when present: ```python agent_lines = [ "[Claude Hook] Task completed; inspect the output and report.", f"session: {session_id}", ] if transcript_path: agent_lines.append(f"transcript: {transcript_path}") if WAKE_INCLUDE_SUMMARY: agent_lines.append(f"summary: {trim_summary(summary)}") agent_msg = "\n".join(agent_lines) agent_ok = wake_agent(agent_msg) ``` ### Technical Analysis The hook avoids sending response summaries by default, but it always inserts `transcript_path` into the agent wake message when that field exists. Because `wake_agent()` invokes OpenClaw with both `--deliver` and `--channel`, the resulting message can be transmitted through Telegram, Discord, or another externally hosted messaging service. Absolute transcript paths can reveal: - Local account names. - Home-directory structure. - Repo ...[truncated 1299 chars]
Remediation
View remediation
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (91)

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · CHANGELOG.md (reported line 19)May include surrounding context.

md
### Changed (Breaking)
- **CLI Migration**: From OpenAI Codex CLI to Anthropic Claude Code CLI
- **Config Format**: From `~/.codex/config.toml` (TOML) to `~/.claude/settings.json` (JSON)
- **Hook Mechanism**: From Codex notify hook (argv JSON) to Claude Code Stop hook (stdin JSON)
- **Models**: From GPT series to Claude series (opus / sonnet / haiku)
- **Permissions**: From sandbox + approval policy to permissions.allow/deny

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · knowledge/changelog.md (reported line 22)May include surrounding context.

md
### Changed (Breaking)
- **CLI Migration**: From OpenAI Codex CLI to Anthropic Claude Code CLI
- **Config Format**: From `~/.codex/config.toml` (TOML) to `~/.claude/settings.json` (JSON)
- **Hook Mechanism**: From Codex notify hook (argv JSON) to Claude Code Stop hook (stdin JSON)
- **Models**: From GPT series to Claude series (opus / sonnet / haiku)
- **Permissions**: From sandbox + approval policy to permissions.allow/deny

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · INSTALL.md (reported line 144)May include surrounding context.

openclaw message send --channel telegram --account 你的账号名 --target 你的Chat_ID --message "claude-agent 通知测试"

5. Claude Code hook 可触发

claude -p "say hello"

你应该收到通知

text

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description centers on operating Claude Code as an interactive project-management/task-execution system using tmux, hooks, and monitoring. The actual code chunk instead performs a release/publishing function: it computes a version and invokes a package publication command to ClawHub. This is a materially different primary purpose and introduces an undeclared capability (software/package publishing). There is no evidence here of tmux interaction, prompt design, execution monitoring, quality checks, iteration, reporting, or asynchronous wake-up behavior. Therefore the code does not accurately match the declared description.

Content

No source excerpt is available for this finding.

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
95% confidence
Finding

This command launches Claude in print mode with --dangerously-skip-permissions, explicitly disabling approval safeguards while running in the background. In a skill designed to autonomously execute prompts, this creates a direct path to unreviewed shell/file actions and potential exfiltration or destructive changes.

Content

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

bash
# 后台执行,Stop hook 完成后自动唤醒
nohup claude -p --dangerously-skip-permissions --model claude-sonnet-4-6 "<prompt>" > /tmp/claude_output.txt 2>&1 &

附加选项:

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

The skill instructs modification of ~/.claude/settings.json, which is a sensitive agent configuration file controlling permissions, hooks, and MCP servers. Altering this file can persistently weaken security boundaries, add execution hooks, or enable future unauthorized behavior beyond the immediate task.

Content

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

常见操作

json
// ~/.claude/settings.json

// 配置权限(自动审批指定工具)
{

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Referencing ~/.claude/settings.json for Stop hooks ties the skill to persistent global hook configuration. Hook-based execution can be abused to run commands automatically on future sessions, making this especially dangerous because it creates durable post-task effects.

Content

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

md
### on_complete.py(Stop hook)

**配置**:`~/.claude/settings.json` → `hooks.Stop`

**触发**:Claude Code 每次完成一个 turn

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

print 模式

bash
claude -p "prompt"
claude -p --dangerously-skip-permissions "prompt"
claude -p --model claude-opus-4-6 "prompt"
claude -p --max-turns 20 "prompt"

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
95% confidence
Finding

This example explicitly advertises running claude -p with --dangerously-skip-permissions. That disables approval gates for an external model-driven agent, materially increasing the risk of autonomous unsafe tool use and unintended disclosure or modification.

Content

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

bash
claude -p "prompt"
claude -p --dangerously-skip-permissions "prompt"
claude -p --model claude-opus-4-6 "prompt"
claude -p --max-turns 20 "prompt"
claude -p --output-format json "prompt"

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

bash
claude -p "prompt"
claude -p --dangerously-skip-permissions "prompt"
claude -p --model claude-opus-4-6 "prompt"
claude -p --max-turns 20 "prompt"
claude -p --output-format json "prompt"
claude -p --system-prompt "额外指令" "prompt"

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

claude -p "prompt" claude -p --dangerously-skip-permissions "prompt" claude -p --model claude-opus-4-6 "prompt" claude -p --max-turns 20 "prompt" claude -p --output-format json "prompt" claude -p --system-prompt "额外指令" "prompt"

text

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

claude -p --dangerously-skip-permissions "prompt" claude -p --model claude-opus-4-6 "prompt" claude -p --max-turns 20 "prompt" claude -p --output-format json "prompt" claude -p --system-prompt "额外指令" "prompt"

text

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

claude -p --model claude-opus-4-6 "prompt" claude -p --max-turns 20 "prompt" claude -p --output-format json "prompt" claude -p --system-prompt "额外指令" "prompt"

text

### 继续/恢复会话

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

The preflight checklist normalizes permanent changes to ~/.claude/settings.json as part of routine setup. Embedding sensitive config modification into onboarding increases the likelihood of users enabling persistent privileged behavior without fully understanding the long-term implications.

Content

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

md
首次使用前确认:

- [ ] `~/.claude/settings.json` 中已添加 `hooks.Stop` 指向 `on_complete.py`
- [ ] 环境变量 `CLAUDE_AGENT_CHAT_ID` 已设置(或已修改脚本中的默认值)
- [ ] 环境变量 `CLAUDE_AGENT_NAME` 已设置(默认 `main`,通常不需要改)
- [ ] `claude --version` 可用

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · CHANGELOG.md (reported line 19)May include surrounding context.

md
1. 给用户发通知(Telegram/Discord 等)
2. 唤醒 OpenClaw agent(去检查输出)

配置:~/.claude/settings.json 中添加:
  {
    "hooks": {
      "Stop": [{

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · INSTALL.md (reported line 38)May include surrounding context.

md
1. 给用户发通知(Telegram/Discord 等)
2. 唤醒 OpenClaw agent(去检查输出)

配置:~/.claude/settings.json 中添加:
  {
    "hooks": {
      "Stop": [{

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · INSTALL.md (reported line 179)May include surrounding context.

md
1. 给用户发通知(Telegram/Discord 等)
2. 唤醒 OpenClaw agent(去检查输出)

配置:~/.claude/settings.json 中添加:
  {
    "hooks": {
      "Stop": [{

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · SECURITY.md (reported line 35)May include surrounding context.

md
1. 给用户发通知(Telegram/Discord 等)
2. 唤醒 OpenClaw agent(去检查输出)

配置:~/.claude/settings.json 中添加:
  {
    "hooks": {
      "Stop": [{

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · hooks/on_complete.py (reported line 7)May include surrounding context.

python
1. 给用户发通知(Telegram/Discord 等)
2. 唤醒 OpenClaw agent(去检查输出)

配置:~/.claude/settings.json 中添加:
  {
    "hooks": {
      "Stop": [{

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · knowledge/changelog.md (reported line 22)May include surrounding context.

md
1. 给用户发通知(Telegram/Discord 等)
2. 唤醒 OpenClaw agent(去检查输出)

配置:~/.claude/settings.json 中添加:
  {
    "hooks": {
      "Stop": [{

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · knowledge/config_schema.md (reported line 9)May include surrounding context.

md
1. 给用户发通知(Telegram/Discord 等)
2. 唤醒 OpenClaw agent(去检查输出)

配置:~/.claude/settings.json 中添加:
  {
    "hooks": {
      "Stop": [{

Agent Config Directory Access

High
Category
Agent Snooping
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.

Content

Scanner excerpt · references/claude-code-reference.md (reported line 51)May include surrounding context.

md
1. 给用户发通知(Telegram/Discord 等)
2. 唤醒 OpenClaw agent(去检查输出)

配置:~/.claude/settings.json 中添加:
  {
    "hooks": {
      "Stop": [{

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

In auto mode the script launches claude --dangerously-skip-permissions, explicitly disabling the CLI's permission safeguards. In this skill's context—project-management orchestration that can run unattended in tmux and wake asynchronously—this materially increases the chance that prompted or compromised agent actions execute without human approval.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · hooks/stop_claude.sh (reported line 30)May include surrounding context.

sh
fi

# 清理日志(可选,取消注释启用)
# rm -f "/tmp/claude_monitor_${SESSION}.log"

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Referencing ~/.claude/settings.json as the configuration file location exposes a sensitive config path and normalizes interaction with private agent configuration. While merely naming the path is less dangerous than instructing full file reads, in this skill context it supports workflows that may lead the agent to inspect user-local config containing sensitive values.

Content

Scanner excerpt · knowledge/capabilities.md (reported line 10)May include surrounding context.

md
- **版本**: 待检测(`claude --version`)
- **默认模型**: claude-sonnet-4-6
- **可用模型**: opus / sonnet / haiku
- **配置文件**: `~/.claude/settings.json`

## 内置工具

Static analysis

No suspicious patterns detected.