Back to skill

Security audit

workspace-declutter

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because its cleanup guidance uses permanent removal for empty directories, creating a risk of removing useful workspace structure; scanner coverage is partial.

Review the cleanup instructions before installing, especially how they handle empty directories and whether needed workspace structure could be removed. ClawScan found no install or persistence concern, but the scan is partial: some referenced paths were not included, so the evidence does not cover those references.

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
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

md
- **根目录的 `AGENTS.md` / `SOUL.md` / `IDENTITY.md` / `USER.md` / `BOOTSTRAP.md` 不是「stray 垃圾」,是某个会话的 OpenClaw 工作区脚手架**:删掉会**当场打挂**该目录上的会话(`WORKSPACE_VANISHED` / `Refusing to reseed BOOTSTRAP.md`)。判据:`BOOTSTRAP.md` 在位 = 该目录做过工作区初始化。⇒ 本类清理**先读 `openclaw-workspace-registration`**;要「不污染 git」用 `.gitignore` 而不是删文件(教训 #422)。
- **同名同内容 ≠ 冗余**:`run/<项目>/final/图件/` 与 `scripts/` 下的同名 png 是**有意副本**(交付面 × 工作面),删掉破坏交付面。
- **空目录可能是别家技能声明的结构位,而消费者 grep 极易漏掉**:实测 `memory/{daily,decisions,people,projects}/` 被工作区内已装技能 `skills/koompi-memory/SKILL.md` 声明为自己的存储约定;当时我只 grep 了 `MEMORY.md` / `lessons.md` / `projects.md` **三个手挑文件**,漏掉 `skills/`,把四个结构目录当空目录删了。⇒ 消费者 grep 必须**全工作区**跑(含 `skills/`),**不得手挑文件列表**。(`radar/` 实测 0 消费者,删掉无碍 —— 判据是「有没有消费者」,不是「是不是空目录」。)
- **`.learnings/` 不是本次清理的产物**:`self-improving-agent` 的 HOOK 会往里写,属依赖项。
- **`run/<项目>/.git` 是活仓库**:先 `git -C <dir> status --short` 看是否干净,能留则留。
- **报告包类要分清原件与残留**:`outputs/clawhub-scan/*.zip` 是 `scripts/scan-history.py` 的数据源(留),同目录的解压目录才是残留。

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · references/冗余分类与保留清单.md (reported line 33)May include surrounding context.

md
1. **全仓 grep 消费者**
   `grep -rn "<路径片段>" --include="*.md" --include="*.py" --include="*.sh" --include="*.json" . | grep -v '^./.git/'`
   实测:根目录 `*-scan-*` / `scan-*` / `*.migrated.*` 均命中 0 条。
   ⚠️ **必须跑全工作区,不能手挑文件列表**:09-17 那次我只 grep 了 `MEMORY.md` / `lessons.md` / `projects.md`,结论是 `memory/{daily,decisions,people,projects}/` 无引用 ⇒ 当空目录删了;复查时把范围放到全工作区,命中 `skills/koompi-memory/SKILL.md`(4 个子目录全被它声明为存储约定)。范围不对,0 消费者这个结论就是假的。
2. **`.bak` 取代者存在性**
   `for f in $(find . -name '*.bak' -not -path './.git/*'); do o="${f%.bak}"; [ -e "$o" ] && echo "OK $o" || echo "WARN $f"; done`
   ⚠️ 剥后缀名对「带版本后缀的备份」必然误报 WARN(`定稿-v1.pdf.bak` → 取代者是 `定稿.pdf`)⇒ 改比 md5 / 时间再判。

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · references/冗余分类与保留清单.md (reported line 51)May include surrounding context.

md
| `run/ai-pilled-vs-agi-pilled/.git` | 活仓库(`status --short` 为空) |
| `skills/evolver/`(14M) | catalog 内技能,非冗余 |
| `memory/archive`、`memory/dreaming`、`memory/.dreams/session-corpus/` | 记忆系统现役(`dreaming/*` 以 session-corpus 为证据源) |
| `memory/{daily,decisions,people,projects}/` 空目录 | 被 `skills/koompi-memory/SKILL.md` 声明为存储约定(09-17 误删,见 §B 注) |
| `.learnings/` | `self-improving-agent` 依赖(HOOK 写入) |
| `outputs/clawhub-scan/*.zip` | `scripts/scan-history.py` 数据源 |
| `media/`、`notes/`、`diary/`、`scripts/` | 用户资料 / 常驻脚本,不属清理面 |

Empty-directory cleanup uses rmdir rather than the manifest's promised recoverable gio trash.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The cleanup table prescribes rmdir, which permanently removes empty directory entries rather than preserving them in recoverable trash. The document records earlier mistaken removal of required structural directories, demonstrating a plausible availability impact even without file-content loss; the required consumer checks mitigate but do not eliminate that risk.

Content

No source excerpt is available for this finding.

Empty directories are removed directly rather than through the promised recoverable trash mechanism.

Low
Category
Excessive Agency
Confidence
99% confidence
Finding

Using rmdir bypasses the promised recoverable deletion mechanism: it removes directory entries without preserving their original metadata or a trash-based restore record. Empty directories can still be required runtime or storage locations, as the skill's own examples demonstrate; consumer checks reduce this risk but do not make rmdir recoverable.

Content

No source excerpt is available for this finding.