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

- skill · `type=skill` · Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 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/providers/cursor/.cursor/skills/agent-sast-gap-analyzer/SKILL.md
- Updated: 2026-06-12
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/sast-gap-analyzer

## What it does

The skill evaluates traced data flows supplied in `flows.json` alongside warning lists like `static-warnings.json` from CodeQL, Semgrep, or Cppcheck. It spots flaws inside validation logic that looks correct on the surface. These include off-by-one boundary comparisons, integer truncation across differing variable widths, time-of-check to time-of-use gaps, and cleanup paths that bypass filters.

For PHP targets, the analyzer flags pattern-specific risks such as loose comparisons on token hashes, path traversal via stream wrappers, and edge-case bypasses in URL validation. This analyzer requires the Opus model because tracking contradictory interaction states across components exceeds the reasoning capacity of smaller models.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add H-mmer/pentest-agents --skill sast-gap-analyzer -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/agent-sast-gap-analyzer/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/agent-sast-gap-analyzer/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add H-mmer/pentest-agents --skill sast-gap-analyzer -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/agent-sast-gap-analyzer/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add H-mmer/pentest-agents --skill sast-gap-analyzer -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/agent-sast-gap-analyzer/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install H-mmer/pentest-agents providers/cursor/.cursor/skills/agent-sast-gap-analyzer
```

2. **Manually: put the files in place**
- File: `.github/skills/agent-sast-gap-analyzer/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add H-mmer/pentest-agents --skill sast-gap-analyzer -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/H-mmer/pentest-agents --path providers/cursor/.cursor/skills/agent-sast-gap-analyzer
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/agent-sast-gap-analyzer/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

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/providers/cursor/.cursor/skills/agent-sast-gap-analyzer/SKILL.md

## When to use it
- identify incomplete boundary checks before memory write calls
- detect validation bypasses caused by integer type truncation
- locate race conditions between access verification and resource consumption
- inspect PHP path normalization and URL filter logic for bypass flaws

## Example prompts
- /sast examine flows.json to detect missing boundary checks across the parser
- /sast compare static-warnings.json with traced data flows in the request handler

## Similar
- [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-sca-security-analyzer](https://affpapa.org/en/nevibecode/agents/sast-sca-security-analyzer.md) — subagent · ★ 41430 repo stars
- [sast-scanning](https://affpapa.org/en/nevibecode/skills/sast-scanning.md) — skill · 415 installs
- [sast-configuration](https://affpapa.org/en/nevibecode/skills/sast-configuration.md) — skill · 10800 installs
- [sentinel](https://affpapa.org/en/nevibecode/skills/sentinel.md) — skill · 106 installs

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
