#20266: feat: skills-audit โ Phase 1 security scanner for installed skills
scripts
size: M
## Summary
Prototype implementation of `skills-audit`, the Phase 1 security scanner proposed in [RFC #10890](https://github.com/openclaw/openclaw/issues/10890).
This is a standalone bash script that scans all installed OpenClaw skills and flags security risks. It's designed to be the foundation for a future `openclaw skills audit` CLI command.
## What it scans
| Check | Description |
|-------|-------------|
| **Tool references** | Flags skills that reference `exec`, `browser`, `web_fetch`, `gateway`, `nodes`, `cron`, `message` in SKILL.md |
| **Executables** | Detects `.sh`, `.py`, `.js`, `.rb`, `.go` files in skill directories |
| **Sensitive paths** | Checks for references to `~/.ssh/`, `~/.aws/`, credentials, tokens, private keys |
| **Exfiltration patterns** | Scans executables for `curl POST`, `requests.post`, `webhook`, `base64 encode`, etc. |
| **Permission manifest** | Checks for `permissions.json`, `permissions.yaml`, or `skill.json` |
| **Integrity hashes** | Computes SHA-256 of each SKILL.md for tamper detection |
## Risk classification
| Level | Criteria |
|-------|----------|
| ๐ด **High** | `exec` + network tool combo, or exfiltration patterns found |
| ๐ก **Medium** | Uses `exec`, or references sensitive paths |
| ๐ต **Low** | Contains executables but no other flags |
| ๐ข **Clean** | No executables, no risky tools, no sensitive path access |
## Usage
```bash
# Scan default skill locations
./scripts/security/skills-audit.sh
# Verbose (detailed findings per skill)
./scripts/security/skills-audit.sh -v
# JSON output (for CI/automation)
./scripts/security/skills-audit.sh -j
```
## Test results
Ran against a real OpenClaw 2026.2.15 installation (51 bundled + 1 workspace skill):
- ๐ก 3 medium-risk skills flagged (coding-agent, tmux, 1p3a-sweep)
- ๐ข 49 clean skills
- ๐ **0 out of 52 skills have a permission manifest** โ confirming the RFC's urgency
- ๐ฆ 0 exfiltration patterns detected in bundled skills (good!)
## Next steps
This PR is the first building block. Follow-up work:
1. **Permission manifest JSON Schema** โ so skills can declare what they need (Phase 1.2 of the RFC)
2. **Hash persistence** โ store hashes on install, compare on audit to detect tampering (Phase 1.3)
3. **CLI integration** โ wire this into `openclaw skills audit` as a first-class command
4. **Runtime enforcement** โ [SkillSandbox](https://github.com/theMachineClay/skillsandbox) implements Phase 3 (capability-based runtime isolation with seccomp-bpf, iptables, filesystem scoping, MCP integration)
5. **Session-aware policy** โ [AgentTrace](https://github.com/theMachineClay/agenttrace) adds stateful violation tracking for Phase 3 anomaly detection
Happy to iterate on feedback. The goal is to make the skill ecosystem trustworthy enough to grow safely.
Refs: #10890, #7827, #12565, #10827
Co-Authored-By: Ivy Fei <ivy.d.fei@gmail.com>
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds a standalone bash script (`scripts/security/skills-audit.sh`) that scans installed OpenClaw skills for security risks (dangerous tool references, executables, sensitive paths, exfiltration patterns) and classifies them by risk level. This is a Phase 1 prototype for RFC #10890.
- The table header output is broken: `echo -e` is used with `printf`-style format specifiers (`%-8s`) which it doesn't interpret, resulting in literal format strings in the output
- JSON output mode has an injection vulnerability: `$skill_name` is interpolated directly into a heredoc JSON template without escaping โ skill names containing `"` or `\` will produce invalid/injected JSON
- The "no permission manifest" footer summary uses wrong logic โ it checks if any non-clean skills exist but reports **all** skills as missing manifests
- The sensitive path patterns (`token`, `secret`, `password`, `credentials`) will produce high false-positive rates when scanning SKILL.md documentation files, since these words appear legitimately in 23+ skill docs across the repo
<h3>Confidence Score: 2/5</h3>
- This PR has multiple functional bugs that need fixing before merge โ broken output formatting, JSON injection, and incorrect summary logic.
- Score reflects three distinct bugs (broken echo/printf header, JSON injection in output mode, wrong manifest count logic) plus a design issue with false-positive-prone patterns. The script is a standalone addition so risk to existing code is low, but it won't work correctly as-is.
- `scripts/security/skills-audit.sh` โ all issues are in this file
<sub>Last reviewed commit: beff8e6</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#10705: security: extend skill scanner to detect threats in markdown skill ...
by Alex-Alaniz ยท 2026-02-06
79.9%
#13894: feat(security): add manifest scanner for SKILL.md trust analysis
by jdrhyne ยท 2026-02-11
77.9%
#8821: Security: Holistic capability-based sandbox (replaces pattern-match...
by tonioloewald ยท 2026-02-04
77.2%
#13012: Security: detect invisible Unicode in skills and plugins (ASCII smu...
by agentwuzzi ยท 2026-02-10
76.7%
#8075: fix(skills): add --ignore-scripts to all package managers
by yubrew ยท 2026-02-03
76.6%
#18196: feat(security): add client-side skill security enforcement
by orlyjamie ยท 2026-02-16
76.4%
#21308: feat(skills): add ClawTrust โ reputation engine & gig marketplace f...
by clawtrustmolts ยท 2026-02-19
76.3%
#17502: feat: normalize skill scanner reason codes and trust messaging
by ArthurzKV ยท 2026-02-15
76.1%
#15757: feat(security): add hardening gap audit checks
by saurabhsh5 ยท 2026-02-13
75.2%
#10514: Security: harden AGENTS.md with gateway, prompt injection, and supp...
by catpilothq ยท 2026-02-06
74.5%