/install audit-code
audit-code -- Project Code Security Review
Security-focused code review of project source code. Covers OWASP-style vulnerabilities, hardcoded secrets, dangerous function calls, and patterns relevant to AI-assisted development.
What to do
Run the auditor against the target path:
python3 "$SKILL_DIR/scripts/audit_code.py" "$ARGUMENTS"
If $ARGUMENTS is empty, default to $PROJECT_ROOT.
What it checks
- Hardcoded secrets -- API keys (AWS, GitHub, Stripe, OpenAI, Slack), tokens, private keys, connection strings, passwords
- Dangerous function calls -- eval, exec, subprocess with shell=True, child_process.exec, pickle deserialization, system(), gets(), etc.
- SQL injection -- String concatenation/interpolation in SQL queries
- Dependency risks -- Known hallucinated package names, unverified installations
- Sensitive files -- .env files committed to git, credential files in repo
- File permissions -- Overly permissive chmod patterns
- Exfiltration patterns -- Base64 encode + network send, DNS exfiltration, credential file reads
Output
Structured report with severity-ranked findings, file locations, and actionable remediation steps.
When to use
- Before committing or pushing code
- When reviewing third-party contributions or PRs
- As part of a periodic security audit of the codebase
- After AI-assisted code generation to verify no secrets or vulnerabilities were introduced
Advisory hooks
The repository's .claude/settings.json includes PreToolUse hooks that warn on
dangerous Bash and Write operations. These hooks are advisory only -- they
produce warnings but do not block execution.
- audit-code is the detection layer for source code security issues
- The hooks provide supplementary runtime warnings during agent operation
- To enforce blocking, hooks must return
{"decision": "block"}instead of warning messages
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install audit-code - 安装完成后,直接呼叫该 Skill 的名称或使用
/audit-code触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Audit Code 是什么?
Security-focused code review for hardcoded secrets, dangerous calls, and common vulnerabilities. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2507 次。
如何安装 Audit Code?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install audit-code」即可一键安装,无需额外配置。
Audit Code 是免费的吗?
是的,Audit Code 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Audit Code 支持哪些平台?
Audit Code 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Audit Code?
由 ItsNishi(@itsnishi)开发并维护,当前版本 v1.1.1。