security-audit · florianbruniaux — Claude Code command: security audit
The security-audit command for Claude Code and Codex inspects a project alongside Claude Code settings. It checks for exposed secrets, dependency flaws, injection risks, and hook issues, then returns a score and remediation plan.
CC-BY-SA-4.0 ★ 6,529 updated 2026-11-14
.claude/commands/security-audit.mdWhat security-audit does
The command reviews a project and its Claude Code configuration across six areas, then creates a scored report out of 100 with fixes ranked by priority. It searches for exposed credentials and prompt-injection signals, audits dependencies, and checks security hooks and settings. The configuration review runs /security-check.
Dependency checks use npm audit, pip-audit, cargo audit, or govulncheck, depending on the project files. If no package manager is detected, that phase is skipped without a score penalty. The report gives results for each phase and assigns a grade from A to F.
What it helps with
- find credentials committed in project files
- inspect Markdown and config files for injection signals
- audit dependencies with the matching package tool
- review Claude Code security hooks and settings
Example prompts for the agent
- Run a full security audit of this project and its Claude Code settings.
- Check dependencies, exposed credentials, and hooks, then rank the fixes.
- Assess prompt-injection risks and give the project a security score.
How to install security-audit
Manually: put the files in place
.claude/commands/security-audit.mdCall it with /security-audit. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/security-audit.mdCall it with /prompts:security-audit. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/security-audit.prompt.mdManually: put the files in place
.gemini/commands/security-audit.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about security-audit
How do I install security-audit in Claude Code?
Save the command as .claude/commands/security-audit.md.
What does security-audit do?
It checks credentials, Claude Code configuration, prompt-injection risks, dependencies, and security hooks. The final report includes a security grade and prioritized remediation plan.
Which tools does security-audit use for dependency checks?
It runs npm audit, pip-audit, cargo audit, or govulncheck according to the project files. If no package manager is detected, it skips that phase.
Similar slash commands
All slash commands for Security →security-audit by other authors comes first.