# sast-devils-advocate

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.

- subagent · `type=agent` · Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop) · ★ 1298 repo stars
- Author: H-mmer
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/H-mmer/pentest-agents/tree/HEAD/.claude/agents/sast-devils-advocate.md
- Updated: 2026-06-12
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/sast-devils-advocate

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/sast-devils-advocate.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/sast-devils-advocate.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/sast-devils-advocate.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/H-mmer/pentest-agents/tree/HEAD/.claude/agents/sast-devils-advocate.md

## When to use it
- 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
- 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.

## Similar
- [sast-scanning](https://affpapa.org/en/nevibecode/skills/sast-scanning.md) — skill · 415 installs
- [security-scanning-security-sast](https://affpapa.org/en/nevibecode/skills/security-scanning-security-sast.md) — skill · ★ 50109 repo stars
- [security-sast](https://affpapa.org/en/nevibecode/commands/security-sast.md) — command · ★ 42780 repo stars
- [sast-configuration](https://affpapa.org/en/nevibecode/skills/sast-configuration.md) — skill · 10800 installs
- [codeql](https://affpapa.org/en/nevibecode/skills/trailofbits-codeql.md) — skill · 9100 installs
- [Devils Advocate](https://affpapa.org/en/nevibecode/agents/devils-advocate.md) — subagent · ★ 41430 repo stars

From the same set: [h-mmer/pentest-agents](https://affpapa.org/en/nevibecode/by/h-mmer/pentest-agents.md) — 43 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
