Three-mode code auditor for OpenClaw workspaces. (1) Security audit — finds hardcoded secrets, dangerous shell commands, SQL injection, unsafe deserializatio...
scripts/audit_scanner.py — 核心扫描工具,支持三种模式。
# 全量审计(默认)
python3 scripts/audit_scanner.py <目标路径> --mode all
# 仅安全审计
python3 scripts/audit_scanner.py <目标路径> --mode security
# 仅质量审计
python3 scripts/audit_scanner.py <目标路径> --mode quality
# 仅灵魂文件审计
python3 scripts/audit_scanner.py <目标路径> --mode soul
脚本自动区分"灵魂文件"(SOUL.MD / MEMORY.MD / AGENTS.MD / HEARTBEAT.MD / USER.MD / SKILL.MD)和普通代码文件,分别应用不同规则集。
soul 模式security 或 qualityallaudit_scanner.pyreferences/security-rules.mdreferences/quality-rules.mdreferences/soul-rules.md(含 SOUL.md 铁律完整性检查清单)| 场景 | 命令 |
|---|---|
| 审计整个 workspace | --mode all ~/.openclaw/workspace |
| 只看灵魂文件 | --mode soul ~/.openclaw/workspace |
| 审计某个 GEO 脚本 | --mode security scripts/geo_analyzer.py |
| 审计所有 Skills | --mode soul ~/.openclaw/workspace/skills |
ZIP package — ready to use