sast-devils-advocate — Claude Code subagent for SAST review
sast-devils-advocate is a Claude Code subagent that challenges SAST findings by looking for reasons a reported flaw cannot be exploited. Run it with /sast.
no license ★ 1,298 updated 2026-06-12
.claude/agents/sast-devils-advocate.mdWhat sast-devils-advocate does
sast-devils-advocate examines a vulnerability candidate and tries to disprove it by tracing the code, external input paths and checks around the dangerous operation. A finding remains open if the subagent cannot refute it.
It checks types and exploitation conditions, and considers mitigations and existing static-analysis results. For PHP findings, it also examines items such as middleware, input filters and prepared SQL queries. The project needs to contain the code being reviewed.
What it helps with
- dismiss a false-positive SAST finding
- trace whether an external input can reach a vulnerable path
- find a missed check in a call chain
- assess whether protections or runtime conditions block exploitation
- review a PHP finding against filters and middleware
Example prompts for the agent
- Check this SAST finding and look for reasons it cannot be exploited.
- Trace external input to the dangerous operation and check for missing validation.
- Review this PHP finding against middleware, input filters and SQL parameters.
How to install sast-devils-advocate
Manually: put the files in place
.claude/agents/sast-devils-advocate.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/sast-devils-advocate.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/sast-devils-advocate.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about sast-devils-advocate
How do I install sast-devils-advocate in Claude Code?
Add .claude/agents/sast-devils-advocate.md to the project.
What does sast-devils-advocate do?
It challenges SAST vulnerability candidates and searches for evidence that a finding is not exploitable. If it cannot refute the finding, it remains open.
How do I run sast-devils-advocate?
Run it with /sast.