skill-security ยท diff
git:20260228.f9c909d to git:20261010.ef59299
14 added, 8 removed. Audit A to A.
---
name: skill-security
- description: >
- Security audit tool for AI agent skills. Scans for credential harvesting, code injection,
- network exfiltration, obfuscation. ALWAYS run before installing any new skill from external
- sources. Triggers on: new skill installation, skill audit, security scan, skill review,
- before loading external skill.
+ description: "Security audit tool for AI agent skills. Scans for credential harvesting, code injection, network exfiltration, obfuscation. ALWAYS run before installing any new skill from external sources. Triggers on: new skill installation, skill audit, security scan, skill review, before loading external skill."
+ license: MIT
+ compatibility: "Requires Bash and standard Unix utilities. audit-all.sh discovers OpenClaw built-in skills and ~/skills; it does not accept a target-directory argument. audit.sh and preinstall-check.sh accept a skill path."
---
# Skill Security Scanner
Security audit tool for AI agent skills. **Run before installing any new skill.**
+ ## Bundled Resources
+
+ Run from this skill directory (resolve it from the installed package, not the workspace).
+
+ - [audit.sh](audit.sh) โ scan one skill; critical findings append to this package's [blocklist.txt](blocklist.txt).
+ - [audit-all.sh](audit-all.sh) โ scan OpenClaw built-in skills and `~/skills`; no directory argument.
+ - [preinstall-check.sh](preinstall-check.sh) โ check the [allowlist.txt](allowlist.txt) and blocklist before auditing.
+
## Quick Audit
```bash
# Audit a skill directory
- ./skill-security/audit.sh /path/to/skill
+ ./audit.sh /path/to/skill
# Audit all installed skills
- ./skill-security/audit-all.sh
+ ./audit-all.sh
```
## What It Checks
| Check | Risk Level | Pattern |
|-------|------------|---------|
| **Network Exfiltration** | ๐จ HIGH | `requests.`, `urllib`, `http.client`, `socket.`, `fetch(`, `axios` |
| **Credential Harvesting** | ๐จ HIGH | `.ssh/`, `.aws/`, `pass `, `keyring`, `credential`, `secret`, `token` file reads |
| **Code Injection** | ๐จ CRITICAL | `exec(`, `eval(`, `compile(`, `Function(`, `__import__` |
| **Obfuscation** | โ ๏ธ MEDIUM | `base64.decode`, `atob`, encoded payloads |
| **Env Dumping** | โ ๏ธ MEDIUM | `os.environ`, `process.env`, `getenv` bulk access |
| **Subprocess Abuse** | โ ๏ธ MEDIUM | `subprocess.run`, `os.system`, `child_process` with credentials |
## Severity Levels
- **CRITICAL** (๐จ): Block installation, report to owner
- **HIGH** (๐ด): Requires manual review before use
- **MEDIUM** (๐ก): Note but allow if from trusted source
- **LOW** (๐ข): Informational only
## Safe Skill Checklist
Before using any skill:
1. โ
Is it from a trusted source? (official OpenClaw, known publisher)
2. โ
Is the code readable (not obfuscated)?
3. โ
Does it document why it needs network/credential access?
4. โ
Does it scope file access to its own directory?
5. โ
Has it been audited by the community?
## Integration with AGENTS.md
Add this to your workflow:
```markdown
## Skill Installation Protocol
Before loading any new skill:
- 1. Run `./skill-security/audit.sh <skill-path>`
+ 1. Run `./audit.sh <skill-path>`
2. If CRITICAL/HIGH findings โ STOP, alert the user
3. If MEDIUM findings โ Review manually, proceed if justified
4. If CLEAN โ Safe to use
```
## Automatic Protection
The scanner creates a blocklist at `./blocklist.txt`.
Skills with CRITICAL findings are automatically added.
## Manual Override
If a skill is flagged but you've verified it's safe:
```bash
echo "skill-name:verified:YYYY-MM-DD:reason" >> allowlist.txt
```
---
## Premium Skills
Like this? Check out our premium skills at **[skillpacks.dev](https://skillpacks.dev)**:
- ๐ก๏ธ **Security Suite** โ Full PII scanning, secrets detection, prompt injection defense โ [$9.90](https://polycatai.gumroad.com/l/bsrugo)
- ๐ง **Structured Memory** โ Three-tier memory replacing flat MEMORY.md โ [$9.90](https://polycatai.gumroad.com/l/goawrg)
- ๐ **Planning & Execution** โ Systematic task plans with batch execution โ [$9.90](https://polycatai.gumroad.com/l/uydfto)
- ๐ **[Bundle โ all 3 for $24.90](https://polycatai.gumroad.com/l/atsrl)**