Skip to main content
subagent CX Codex

sast-gap-analyzer — Claude Code subagent: find validation gaps

sast-gap-analyzer — a subagent for Claude Code, Cursor and other IDEs that identifies where validation chains break down — missing, insufficient or bypassable checks. Detects bugs between code fragments that each look correct in isolation.

no license ★ 1,298 updated 2026-06-12

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/sast-gap-analyzer.md
Open on GitHub

What sast-gap-analyzer does

Takes traced data flows and spots seven categories of validation gaps: no check at all, bounds that do not cover the constraint, type mismatches between check and use, checks of the wrong property, race conditions between check and use, interactions between individually correct checks that create impossible-yet-satisfiable conditions, and skipped checks in error paths.

The agent excels at finding interaction gaps — the hardest vulnerabilities, such as the SACK pattern in TCP or sentinel-value collision in FFmpeg. Requires Claude Opus to reason through complex chains. Access it via /sast, passing files with traced flows and source code; the agent reads, verifies and suggests concrete fixes.

In PHP codebases, it spots classic traps: loose token comparison with == instead of ===, is_numeric as a guard, non-strict in_array, path traversal through stream wrappers and second-order SQL injection through logs.

What it helps with

  • spot missing or insufficient checks in data validation
  • find bugs in the gaps between separately correct checks
  • detect race conditions between permission checks and file use
  • catch type mismatches where data is validated in one type but used in another
  • diagnose PHP pitfalls: loose comparison, path traversal, second-order SQL injection

Example prompts for the agent

  • Analyze validation in auth.php — find gaps in token checks between parse_jwt and validate_claims
  • Review data flows in the file handler: where could a race condition exist between extension checks and path use
  • Examine buffer boundary interactions in memcpy — can two separately correct checks contradict each other

How to install sast-gap-analyzer

Manually: put the files in place

.claude/agents/sast-gap-analyzer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about sast-gap-analyzer

How do I install sast-gap-analyzer in Claude Code?

Create .claude/agents/sast-gap-analyzer.md at your project root with the agent description and instructions. Call it via /sast in Claude Code, passing files with traced data flows.

What does sast-gap-analyzer do?

It reviews validation in data flows and identifies seven kinds of gaps: missing checks, incorrect bounds, type mismatches, checks of the wrong property, race conditions, interactions between correct checks and omitted error-path checks. It finds bugs between separately correct code fragments.

Why does it require Claude Opus?

Finding interaction gaps — the hardest vulnerabilities — demands extended reasoning chains that only Opus provides. Other models yield shallow results.

Similar subagents

All subagents for Security →

From the same set43

The whole set →
sast-danger-mapper sast-danger-mapper catalogs hazardous source code operations using pattern matching without speculating on exploitability. CX Codex +1 ★ 1,298repo stars sast-danger-mapper sast-danger-mapper — a subagent that finds dangerous operations in source files: memory handling, type casts, arithmetic at trust boundaries, resource deallocation. CX Codex +1 ★ 1,298repo stars report-writer The report-writer subagent for Claude Code compiles vulnerability findings into reports for pentests, bounty submissions, and technical writeups. CX Codex +1 ★ 1,298repo stars sast-gap-analyzer sast-gap-analyzer analyzes traced data flows to uncover validation gaps in source code. Catches incomplete boundary checks, type mismatches, and race conditions before risky operations. CX Codex +1 ★ 1,298repo stars dast-devils-advocate dast-devils-advocate — a skill that catches inflated vulnerabilities in DAST reports. CX Codex +1 ★ 1,298repo stars dast-devils-advocate dast-devils-advocate — an adversarial subagent that questions DAST findings, reruns PoC commands, flags publicly accessible data, and lowers inflated severity ratings before you submit reports. CX Codex +1 ★ 1,298repo stars ssti-hunter ssti-hunter is a Claude Code skill that investigates server-side template injection (SSTI). It activates for user-controlled templates, rule engines, and rendered messages. CX Codex +1 ★ 1,298repo stars pentest-agents-hunting The pentest-agents-hunting rule structures security hunting around scope, practical impact, and attack chains. It helps an agent drop weak leads and investigate confirmed bugs more deeply. CX Codex +1 ★ 1,298repo stars

Project sponsors

Companies that keep this analytics open