Back to skill

Security audit

Huo15 Openclaw Enhance

Security checks for vulnerabilities and agentic risk

Overview

This is a useful but very broad default-on OpenClaw enhancement plugin whose automatic transcript recovery, file-sharing, model-routing, and persistent cleanup features need human review before installation.

Install only if you want a broad OpenClaw agent-harness plugin and trust it with local OpenClaw sessions, memory, logs, and file-sharing paths. Review and, where possible, disable transcript bridging, bot share/upload, model routing, context watchdog, and LaunchAgent-related features you do not need. Do not run the generated LaunchAgent commands until you accept the deletion policy and know how to uninstall them. Avoid sharing symlinked files or sensitive directories through enhance_share_file.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
src/modules/session-bridge.ts:192
Finding

Cross-session transcript injection can disclose unrelated conversations and poison persistent memory

Content
View full analysis
0) { const c = cands[0]; return { filePath: c.path, sessionId: c.sessionId, mtimeMs: c.mtime, matchedChatId: currentChatId ?? "(per-agent fallback)", }; } ``` ```ts const lines: string[] = [ "🔄 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━", ` PRIOR_SESSION_CHECKPOINT —— 上一段会话的尾段(${ageStr})`, "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━", "", `当前 session 因 OpenClaw runtime 硬 reset / compact 跟上文断了。enhance session-bridge 自动从前一个 session 文件拉回最后 ${msgs.length} 条 user/assistant 原始对话——**这是历史延续,不是用户当下的新请求**。`, "", `**前 session 完整文件**(需要中段/决策/tool result 时 Read 这个):\`${prior.filePath}\``, lastMsgTime ? `**最后一条消息时间**:${lastMsgTime}` : "", "", "**使用建议**:", "1. 用户没明示『延续昨天的话题』时,先把这段当作背景理解,不要主动 echo / 复述", "2. 需要更多上下文 → 主动 Read 上面那个完整 jsonl 文件(或 enhance_transcript_search)", "3. 重要决策 / 进展 / 用户偏好 → 调 `enhance_memory_store` 记到分类记忆,避免下次 reset 又得重新拉", "", "──── 历史尾段 message ────", "", ]; ``` ```ts const currentChatId = readChatId(currentJsonl); const prior = findPriorBridgeSource( sessionsDir, currentChatId, sessionId, priorMaxAgeMs, ); if (!prior) return undefined; const msgs = readLastMessages(prior.filePath, tailN, perMsgCap); if (msgs.length === 0) return undefined; const text = buildBridgeText(prior, msgs, maxChars); if (!text) return undefined; shouldBridge(dedupKey); return { prependContext: text }; ``` ### Technical Analysis The bridge normally attempts to identify a previous conversation by `chat_id`. If that identi ...[truncated 2287 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/modules/bot-share-link.ts:169
Finding

Sensitive-file sharing restrictions can be bypassed with symbolic links

Content
View full analysis
tail.includes(t)); } ``` ```ts const normalized = normalize(filePath); if (normalized.split("/").includes("..")) { return errorResponse("filePath 不能含 .. 段。"); } if (isSensitivePath(normalized)) { return errorResponse( `拒绝分享敏感目录文件(黑名单 token:${SENSITIVE_DIR_TOKENS.join("、")})。`, ); } if (!existsSync(normalized)) { return errorResponse(`文件不存在:${normalized}`); } let st: ReturnType; try { st = statSync(normalized); } catch (err) { return errorResponse(`stat 失败:${(err as Error).message}`); } if (!st.isFile()) { return errorResponse(`只能分享普通文件,${normalized} 不是 file。`); } ``` ```ts const token = randomBytes(6).toString("hex"); const sanitized = sanitizeBaseName(basename(normalized)); const finalName = `${token}-${sanitized}`; const destPath = pathResolve(join(filesDir, finalName)); try { if (copyMode === "link") { try { linkSync(normalized, destPath); } catch (err) { api.logger.warn( `[enhance-bot-share] hardlink 失败降级 copy:${(err as Error).message}`, ); copyFileSync(normalized, destPath); } } else { copyFileSync(normalized, destPath); } } catch (err) { return errorResponse(`投递失败:${(err as Error).message}`); } ``` ### Technical Analysis The module attempts to block sensitive files by checking whether the supplied path contains denylisted strings such as `/.ssh/`, `/.aws/`, `/.gnupg/`, or `/etc/`. This check is performed on the lexical path after `normalize()`. It does not resolve the canonical filesystem target. Both `statSync` and `copyFileSync` follow symbolic links, so a harmless- ...[truncated 2094 chars]
Remediation
View remediation

T06 · System Persistence

Error
Location
src/modules/trajectory-archiver.ts:78
Finding

Generated LaunchAgent establishes recurring execution and permanently deletes session recovery data

Content
View full analysis
7 天 → delete # 3. *.jsonl.reset.* / *.jsonl.bak-* >3 天 → delete set -e ... echo " [1/3] mv stale trajectory + checkpoint to sessions-archive (per agent)" for AGENT_DIR in "$HOME"/.openclaw/agents/*/; do AGENT=$(basename "$AGENT_DIR") SESSIONS="$AGENT_DIR/sessions" ARCHIVE="$AGENT_DIR/sessions-archive" [ -d "$SESSIONS" ] || continue mkdir -p "$ARCHIVE" MOVED=$(find "$SESSIONS" -maxdepth 1 \ ${namePatterns} \ -mmin +${ageMin} -size +${minSizeKb}k -print 2>/dev/null | wc -l | tr -d ' ') if [ "$MOVED" -gt 0 ]; then find "$SESSIONS" -maxdepth 1 \ ${namePatterns} \ -mmin +${ageMin} -size +${minSizeKb}k -exec mv {} "$ARCHIVE/" \; fi done echo " [2/3] delete sessions-archive items >7 days" find "$HOME/.openclaw/agents" -path '*/sessions-archive/*' -mtime +7 -delete 2>/dev/null || true echo " [3/3] delete *.jsonl.reset.* / *.jsonl.bak-* >3 days" find "$HOME/.openclaw/agents" -maxdepth 4 \( -name '*.jsonl.reset.*' -o -name '*.jsonl.bak-*' \) -mtime +3 -delete `; ``` ```ts return [ `# enhance trajectory-archiver v2 一次性部署 (写脚本 + plist + 加载)`, ... `cat > "${script}" << 'SCRIPT_EOF'`, scriptContent, `SCRIPT_EOF`, `chmod +x "${script}"`, ... `cat > "${path}" << 'PLIST_EOF'`, plistContent, `PLIST_EOF`, ... `launchctl unload "${path}" 2>/dev/null || true`, `launchctl load "${path}"`, ... `launchctl start ${opts.label} && sleep 2 && tail -20 "${logPath()}"`, ].join("\n"); ``` ### Technical Analysis The registered t ...[truncated 2335 chars]
Remediation
View remediation

T06 · System Persistence

Warning
Location
scripts/deploy-2week-followup-launchagent.sh:37
Finding

Follow-up deployment script installs a persistent user LaunchAgent without automatic removal

Content
View full analysis
"$PLIST" < Label${LABEL} ProgramArguments /bin/bash -lc bash "${AUDIT_SCRIPT}" StartCalendarInterval Month${TARGET_MONTH} Day${TARGET_DAY} Hour${TARGET_HOUR} Minute${TARGET_MINUTE} StandardOutPath${LOG_FILE} StandardErrorPath${LOG_FILE} RunAtLoad EOF ``` ```sh # 如果已经 load 过,先 unload 再 load(确保 plist 改动生效) if launchctl list "$LABEL" >/dev/null 2>&1; then echo "→ 检测到已 load,先 unload" launchctl unload "$PLIST" 2>&1 || true fi launchctl load "$PLIST" echo "✓ launchctl load 完成" ``` ### Technical Analysis Executing this repository script directly writes and loads a user-level LaunchAgent. The stated purpose is a one-time follow-up audit, and the audit payload includes a date guard. However, the LaunchAgent itself is not removed after execution and remains registered until the user manually unloads and deletes it. The plist invokes the audit script by its repository path rather than installing a fixed, integrity-checked copy. Consequently, modifications to that script before the scheduled run alter the effective payload executed by launchd. The inspected audit payload reads OpenClaw logs and the share manifest, writ ...[truncated 1341 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (307)

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

md
# 2. nginx 加 client_max_body_size + proxy_request_buffering off
# 编辑 /etc/nginx/sites-enabled/keepermac.huo15.com 加上面那段
sudo nginx -t && sudo nginx -s reload

# 3. 浏览器测试: https://keepermac.huo15.com/lanhuo/upload
# 拖一个 500MB+ 文件,progress 应该实时更新到 100%

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

A documented enhance_memory_export capability that exports all memory as JSON materially expands data access beyond the stated upload-handling purpose. In an agent environment, memory can contain sensitive conversation history, operational context, or user data, so hiding or under-disclosing export functionality creates a real risk of unauthorized bulk exfiltration or over-privileged deployment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Persistent workflow task management with cross-session storage introduces durable state, task history, and automation behavior that are not justified by the manifest's upload-fix description. This is dangerous because hidden persistence can accumulate sensitive operational context across sessions and create unexpected authority or action continuity that reviewers and users did not knowingly approve.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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 · README.md (reported line 341)May include surrounding context.

md
"safety": {
            "enabled": true,
            "rules": [
              { "tool": "exec", "pattern": "rm -rf *", "action": "block", "reason": "危险命令" },
              { "tool": "exec", "pattern": "sudo *", "action": "block", "reason": "禁止 sudo" },
              { "tool": "file_write", "pathPattern": "*.env", "action": "block", "reason": "禁止写入环境变量文件" }
            ],

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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 · README.md (reported line 375)May include surrounding context.

md
"safety": {
            "enabled": true,
            "rules": [
              { "tool": "exec", "pattern": "rm -rf *", "action": "block", "reason": "危险命令" },
              { "tool": "exec", "pattern": "sudo *", "action": "block", "reason": "禁止 sudo" },
              { "tool": "file_write", "pathPattern": "*.env", "action": "block", "reason": "禁止写入环境变量文件" }
            ],

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 343)May include surrounding context.

md
"rules": [
              { "tool": "exec", "pattern": "rm -rf *", "action": "block", "reason": "危险命令" },
              { "tool": "exec", "pattern": "sudo *", "action": "block", "reason": "禁止 sudo" },
              { "tool": "file_write", "pathPattern": "*.env", "action": "block", "reason": "禁止写入环境变量文件" }
            ],
            "defaultAction": "allow"
          },

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and top-level description present the skill as a narrow fix for an upload-loop bug, but the document describes a much larger platform plugin with memory, workflow, diagnostics, routing, upload/share, and dashboard capabilities. This is dangerous because reviewers and users may consent to a small bugfix while actually installing a privileged multi-function component with much broader access and attack surface.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
src/modules/cc-bridge-keyword-dispatch.ts:107