Skip to main content
subagent CX Codex

sast-danger-mapper — Claude Code subagent: what it does

sast-danger-mapper — a subagent that finds dangerous operations in source files: memory handling, type casts, arithmetic at trust boundaries, resource deallocation.

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-danger-mapper.md
Open on GitHub

What sast-danger-mapper does

Reads a source file and lists every operation that could turn into a vulnerability if its inputs were attacker-controlled: memcpy, malloc, size overflows in multiplications, array access without index checks, calls via function pointers. For PHP: eval, unserialize, system, SQL injection via query concatenation, XSS in templates with {!! $x !!}, SSRF via curl_exec with user-supplied URLs. For Rust: unsafe blocks, transmute, .get_unchecked().

The job is pattern matching, not exploitability assessment. Works via the /sast command in Claude Code, Cursor, Codex and other platforms. The instruction sets a 100-turn limit and local memory.

Uses Read, Bash, Write, Grep, Glob tools. Missing FFmpeg, Python or external libraries will block file operations.

What it helps with

  • Locate unsafe memcpy, strcpy, sprintf calls without buffer length checks
  • Identify overflows in size calculations via n * sizeof(T) and addition
  • List SQL injections in mysqli_query, $pdo->query with concatenation
  • Detect unfiltered deserialization in unserialize, pickle.loads, yaml.load
  • Compile XSS vectors in echo $x, {!! $x !!}, {{ x|raw }}

Example prompts for the agent

  • Run /sast on src/parser.c and list all malloc calls with computed size
  • Check app/Controllers/User.php for SQL injections and deserialization via /sast
  • Find all unsafe blocks and .get_unchecked() calls in core/network.rs

How to install sast-danger-mapper

Manually: put the files in place

.claude/agents/sast-danger-mapper.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-danger-mapper

How to install sast-danger-mapper in Claude Code?

Copy the file to .claude/agents/sast-danger-mapper.md.

What does sast-danger-mapper do?

Searches source files for patterns of dangerous operations: memory handling, type casts, eval, system calls, unparameterized SQL, XSS in templates, SSRF via curl_exec. Lists findings without assessing exploitability.

Which languages does sast-danger-mapper support?

C, C++, Rust, Java, Python, Go, PHP. Each language has a defined pattern set: unsafe memory operations, deserialization, injections, calls via pointers.

Similar subagents

All subagents for Security →

From the same set43

The whole set →
pentest-agents-payloads-4 pentest-agents-payloads-4 is a Claude Code rule with examples for reviewing web vulnerabilities, from JWT and deserialization to GraphQL and OAuth. It supports application security assessments. CX Codex +1 ★ 1,298repo stars pentest-agents-chain-table pentest-agents-chain-table is a Claude Code rule that directs security audit agents to chain verified vulnerabilities into exploit paths. CX Codex +1 ★ 1,298repo stars report-writer report-writer turns vulnerability findings into bug bounty submissions, penetration test reports, or technical write-ups. Use it when findings need clear evidence, impact, and remediation. CX Codex +1 ★ 1,298repo stars sast-danger-mapper sast-danger-mapper catalogs hazardous source code operations using pattern matching without speculating on exploitability. 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 sast-gap-analyzer 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. 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

Project sponsors

Companies that keep this analytics open