Back to skill

Security audit

Openclaw Config Audit

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious with medium confidence because scanners report instructions that bypass a database access guard, require an external test message during a local audit, and include an unsafe maintenance sequence; coverage was partial.

Consider avoiding installation until the database-access instructions and maintenance sequence are reviewed and the live messaging requirement is removed or made explicitly optional with approval. Scanning was incomplete: only 2 of 3 components were fully scanned, and several static checks were degraded, so the remaining evidence does not establish safety.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Warning
Location
references/会话库膨胀分诊.md
Finding

Explicit instructions to bypass a database-access guard

Content
View full analysis

Impact

The demonstrated workflow enables database size, structure, and row-count inspection despite the stated guard refusal. Credential disclosure or database modification is not established.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Reframes a denied database-access operation as routine forensics and directs the agent to use another interpreter to perform it.

High
Category
Prompt Injection
Confidence
97% confidence
Finding

The reference explicitly responds to denied external database access by directing the agent to use Python's sqlite3 module against the same protected database. Read-only queries reduce integrity risk, but substituting interpreters to evade an access guard undermines the authorization boundary and can expose sensitive session data.

Content

No source excerpt is available for this finding.

The local configuration audit requires sending a real message through an external channel to verify a delivery fix.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The skill mandates a real Feishu message as verification during an otherwise local configuration audit, without explicitly requiring approval of the recipient and message content. An allowFrom entry identifies an allowed sender, not necessarily the intended delivery recipient, so this can cause unsolicited external communication or unintended disclosure.

Content

No source excerpt is available for this finding.

L35 requires sending a real Feishu test message without requiring user disclosure of the external transmission.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The required live delivery test crosses from local auditing into an external side effect without a specific disclosure or consent step. The general requirement to obtain instructions for interaction-changing hardening does not clearly authorize sending a message or establish its recipient and contents.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
先删数据再 VACUUM**,直接 compact 只省 1.4 MB)。完整分诊、收紧配置、**执行顺序(coldStorage → dry-run → enforce → compact)**、残留类别与命令形态见 `references/会话库膨胀分诊.md`。
- **插件自带的 SecretRef schema 可能与核心校验冲突**:openviking 的 `config.apiKey` 三种写法(`{source:file,id}` / `{source:file,provider,id}` / `{source:env,...}`)实测**全被拒**,schema lookup 声称允许 file 型而校验只认 env 型 ⇒ 属插件 bug。**改不动也要如实报**,把出路(升级插件 / 改 `${ENV}` + 环境变量)写进交付,不为「全绿」硬凑。
- **本 agent 永不 exec 重启本 Gateway**:`Restart the gateway to apply` 的项**集中列给主人**(或走 `openclaw` 工具),不要用 exec 跑 `systemctl restart`。同理**需要停网关的离线维护**(`backup create` / `doctor --session-sqlite compact`)**整段交主人**;本 agent 只给命令序列与理由。
- ⚠️ **`openclaw` 工具报 `Cannot find module .../tmp/plugin-captures/...` 时,先怀疑「清理时删过该目录」,而不是插件装坏。** 实测(2026-10-17):`config.set` 失败回执的 require stack 指向 `extensions/feishu/dist/index.js`、缺失模块却在 `tmp/plugin-captures/` 下 ⇒ **故障面只有「用工具写配置」这一条**,gateway 仍 `health OK`、通道仍 `configured`、插件本体在 `extensions/<id>/dist/` 完好;删后 40 分钟该目录**未自行再生**。⇒ 处置按 SKILL.md「第三条写入路径」**直接热编辑 `openclaw.json`** 绕过(

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
**先删数据再 VACUUM**,直接 compact 只省 1.4 MB)。完整分诊、收紧配置、**执行顺序(coldStorage → dry-run → enforce → compact)**、残留类别与命令形态见 `references/会话库膨胀分诊.md`。
- **插件自带的 SecretRef schema 可能与核心校验冲突**:openviking 的 `config.apiKey` 三种写法(`{source:file,id}` / `{source:file,provider,id}` / `{source:env,…}`)实测**全被拒**,schema lookup 声称允许 file 型而校验只认 env 型 ⇒ 属插件 bug。**改不动也要如实报**,把出路(升级插件 / 改 `${ENV}` + 环境变量)写进交付,不为「全绿」硬凑。
- **本 agent 永不 exec 重启本 Gateway**:`Restart the gateway to apply` 的项**集中列给主人**(或走 `openclaw` 工具),不要用 exec 跑 `systemctl restart`。同理**需要停网关的离线维护**(`backup create` / `doctor --session-sqlite compact`)**整段交主人**;本 agent 只给命令序列与理由。
- ⚠️ **`openclaw` 工具报 `Cannot find module …/tmp/plugin-captures/…` 时,先怀疑「清理时删过该目录」,而不是插件装坏。** 实测(2026-10-17):`config.set` 失败回执的 require stack 指向 `extensions/feishu/dist/index.js`、缺失模块却在 `tmp/plugin-captures/` 下 ⇒ **故障面只有「用工具写配置」这一条**,gateway 仍 `health OK`、通道仍 `configured`、插件本体在 `extensions/<id>/dist/` 完好;删后 40 分钟该目录**未自行再生**。⇒ 处置按 SKILL.md「第三条写入路径」**直接热编辑 `openclaw.json`** 绕过(只读 C

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

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

md
## 成功样例

**2026-09-20 全盘体检 +「依次全部修正」**:`doctor` 报明文密钥 / `lobster` 死引用 / `awk·jq·sed` 在 safeBins / legacy relay;`security audit` 8 warn(exec=full、autoAllowSkills、插件版本未锁等)。修:旧快照 341 MB→1.2 MB(`gio trash` 9 个);`alsoAllow` 48→47(删死条目,`view_image` 经核验保留);safeBins 81→78 **且 `safeBinProfiles` 必须 `--replace-path` 才同步降到 78**;新增 `session.maintenance{mode:enforce, archiveDashboardAfter:30d, preserveRecent:14d}`;`automations edit --clear-model` 清两个 job 的 model 覆盖;`extensionRelay.allowLegacyAuth=false`(**需重启**);`tools.exec.mode` full→ask + `autoAllowSkills=false`,有效策略 = `allowlist + ask=on-miss`。未修 1 项:openviking `apiKey` 明文——插件 schema 自相矛盾,三种 SecretRef 写法全拒,出路写进交付。
**同日会话面**:按「论衡」三组筛过期会话时先确认**分组无成员表**(只能启发式),命中 2 条 `kind:"spawn-child"` 的 failed 会话;`sessions archive` 假成功 → 改 `sessions delete` 真删并归档转录。

The documented maintenance sequence does not abort on backup failure despite explicitly claiming that it does.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The runnable sequence uses independent shell commands, so a failed verified backup does not stop database compaction despite the accompanying claim. Later prose requires exit checks and restart recovery, but those safeguards are absent from the copyable sequence, risking maintenance without a recoverable backup.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/会话库膨胀分诊.md (reported line 114)May include surrounding context.

md
- **用 `trap … EXIT` 兜底拉起网关**,避免中途失败把主机留在宕机态;正常走完启动流程后要置位跳过兜底,别重复启动。
- **确认网关真的停了再动数据库**:轮询 `pgrep -f "openclaw/dist/index.js gateway"`(有超时上限),`--force` 返回后仍可能有 systemd cgroup 里的子进程在跑。

⚠️ **不要在网关托管的会话里后台/脱离执行这个序列。** 停网关会同时杀掉承载当前会话的进程 ⇒ **本 turn 连同命令一起消失,且事后无法向主人汇报结果**(实测即如此)。正确形态是**写好脚本、把整条命令原样交给主人在自己的终端跑**,再回来读日志验收;不要用 `setsid nohup … &` 之类尝试后台发射——审批层也会以「高影响本地动作 + 子进程继承明文 apiKey 环境」为由拒绝。

⚠️ **审批层在拒绝这类脚本时点名的「行为与退出语义需确认」要当真实缺陷信号处理,不要绕道重试。** 实测它标出的退出语义缺陷确实存在(见上第一条)。被拒时的正确动作是回头改脚本并说明风险请主人批准,或改成「交主人执行」,不是换写法达成同一结果。

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/会话库膨胀分诊.md (reported line 114)May include surrounding context.

md
- **用 `trap … EXIT` 兜底拉起网关**,避免中途失败把主机留在宕机态;正常走完启动流程后要置位跳过兜底,别重复启动。
- **确认网关真的停了再动数据库**:轮询 `pgrep -f "openclaw/dist/index.js gateway"`(有超时上限),`--force` 返回后仍可能有 systemd cgroup 里的子进程在跑。

⚠️ **不要在网关托管的会话里后台/脱离执行这个序列。** 停网关会同时杀掉承载当前会话的进程 ⇒ **本 turn 连同命令一起消失,且事后无法向主人汇报结果**(实测即如此)。正确形态是**写好脚本、把整条命令原样交给主人在自己的终端跑**,再回来读日志验收;不要用 `setsid nohup … &` 之类尝试后台发射——审批层也会以「高影响本地动作 + 子进程继承明文 apiKey 环境」为由拒绝。

⚠️ **审批层在拒绝这类脚本时点名的「行为与退出语义需确认」要当真实缺陷信号处理,不要绕道重试。** 实测它标出的退出语义缺陷确实存在(见上第一条)。被拒时的正确动作是回头改脚本并说明风险请主人批准,或改成「交主人执行」,不是换写法达成同一结果。