Security Audit (Sona)

👤 virtaava 📦 v0.1.3 ⭐ 4.2 ⬇️ 3.5K 下載
🔒 IT運維與安全 免費

📖 技能介紹


name: security-audit description: "Fail-closed security auditing for OpenClaw/ClawHub skills & repos: trufflehog secrets scanning, semgrep SAST, prompt-injection/persistence signals, and supply-chain hygiene checks before enabling or installing." metadata: {"openclaw":{"emoji":"🛡️","requires":{"bins":["jq","trufflehog","semgrep","python3"]},"install":[{"id":"apt-jq","kind":"apt","package":"jq","bins":["jq"],"label":"Install jq (apt)"},{"id":"apt-ghog","kind":"apt","package":"python3","bins":["python3"],"label":"Install Python 3 (apt)"},{"id":"apt-trufflehog","kind":"apt","package":"trufflehog","bins":["trufflehog"],"label":"Install trufflehog (apt)"},{"id":"pipx-semgrep","kind":"shell","label":"Install semgrep (pipx)","command":"python3 -m pip install --user pipx && python3 -m pipx ensurepath && pipx install semgrep"},{"id":"brew-jq","kind":"brew","formula":"jq","bins":["jq"],"label":"Install jq (brew)"},{"id":"brew-trufflehog","kind":"brew","formula":"trufflehog","bins":["trufflehog"],"label":"Install trufflehog (brew)"},{"id":"brew-semgrep","kind":"brew","formula":"semgrep","bins":["semgrep"],"label":"Install semgrep (brew)"}]}}


security-audit

A hostile-by-design, fail-closed audit workflow for codebases and OpenClaw/ClawHub skills.

It does not try to answer “does this skill work?”. It tries to answer: “can this skill betray the system?”

What it checks (high level)

This skill’s scripts combine multiple layers:

  • Secrets / credential leakage: trufflehog
  • Static analysis: semgrep (auto rules)
  • Hostile repo audit (custom): prompt-injection signals, persistence mechanisms, suspicious artifacts, dependency hygiene

If any layer fails, the overall audit is FAIL.

Run an audit (JSON)

From this skill folder (use bash so it works even if executable bits were not preserved by a zip download):

bash scripts/run_audit_json.sh <path>

Example:

bash scripts/run_audit_json.sh . > /tmp/audit.json
jq '.ok, .tools' /tmp/audit.json

Security levels (user configurable)

Set the strictness level (default: standard):

7w4.net小蔥技能站收錄全網優質技能,值得收藏。

OPENCLAW_AUDIT_LEVEL=standard bash scripts/run_audit_json.sh <path>
OPENCLAW_AUDIT_LEVEL=strict   bash scripts/run_audit_json.sh <path>
OPENCLAW_AUDIT_LEVEL=paranoid bash scripts/run_audit_json.sh <path>
  • standard: pragmatic strict defaults (lockfiles required; install hooks/persistence/prompt-injection signals fail)
  • strict: more patterns become hard FAIL (e.g. minified/obfuscation artifacts)
  • paranoid: no "best-effort" hashing failures; more fail-closed behavior

Manifest requirement (for zero-trust install workflows)

For strict/quarantine workflows, require a machine-readable intent/permissions manifest at repo root:

  • openclaw-skill.json

If a repo/skill does not provide this manifest, the hostile audit should treat it as FAIL.

See: docs/OPENCLAW_SKILL_MANIFEST_SCHEMA.md.

Optional: execution sandbox (Docker)

Docker is optional here. This skill can be used for static auditing without Docker.

If you want to execute any generated/untrusted code, run it in a separate sandbox workflow (recommended).

Files

  • scripts/run_audit_json.sh — main JSON audit runner
  • scripts/hostile_audit.py — prompt-injection/persistence/dependency hygiene scanner
  • scripts/security_audit.sh — convenience wrapper (always returns JSON, never non-zero)
  • openclaw-skill.json — machine-readable intent/permissions manifest

🤖 AI 評測

這個 Skill 質量不錯,能有效檢測程式碼中的金鑰洩露、提示注入和惡意持久化等風險,文件清晰、支援靈活配置。但它依賴多個外部工具才能完整執行,且預設級別下某些敏感檢測只警告不失敗,執行時可能無法捕獲所有問題。整體適合安全意識強的使用者使用。

📊 多維度評分

適應性4.4
規範性4.2
有效性4.4
可靠性4.2
可信度4

📁 包含檔案 (11 個)

📄 CHANGELOG.md 538 B
📄 README.md 575 B
📄 SKILL.md 3.4 KB
📄 _meta.json 138 B
📄 docs/OPENCLAW_SKILL_MANIFEST_SCHEMA.md 925 B
📄 docs/README_ZERO_TRUST_INSTALL.md 1.3 KB
📄 openclaw-skill.json 1.1 KB
📄 scripts/hostile_audit.py 12.8 KB
📄 scripts/run_audit_json.sh 2.4 KB
📄 scripts/security_audit.sh 1 KB
📄 skill-card.md 2.3 KB