# codeql

Runs interprocedural taint tracking and data flow analysis using CodeQL. Helps detect security flaws across nine programming languages.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 8300 installs · ★ 7805
- Author: trailofbits
- License: CC-BY-SA-4.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/trailofbits/skills/tree/HEAD/plugins/static-analysis/skills/codeql/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/trailofbits-codeql

## What it does

The skill manages the full CodeQL workflow directly from the agent. It extracts database facts, runs query suites, and saves SARIF reports under `./static_analysis_codeql_1`. Two scanning targets are supported: an exhaustive run covering quality and experimental queries, or a high-precision run focused on verified vulnerabilities.

Compiled targets such as C/C++, Go, and Java require a valid build. On Apple Silicon, exit code 137 indicates an `arm64e` mismatch. Running via Rosetta or Homebrew binaries resolves the issue. Dedicated validation scripts verify database extraction immediately to prevent silent query drops.

The workflow writes project-specific data extension models. Without them, CodeQL overlooks tainted data flowing through custom wrappers in Django, Spring, or Express.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill codeql -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill codeql -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill codeql -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install trailofbits/skills codeql
```

2. **Manually: put the files in place**
- File: `.github/skills/codeql/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill codeql -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/trailofbits/skills --path plugins/static-analysis/skills/codeql
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill codeql -a opencode
```

### 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/trailofbits/skills/tree/HEAD/plugins/static-analysis/skills/codeql/SKILL.md

## When to use it
- Track taint and data flow vulnerabilities across whole repositories
- Build CodeQL databases with automated extraction quality checks
- Model custom sources and sinks for frameworks like Django or Express
- Export static analysis findings directly into SARIF reports

## Example prompts
- Run a codeql scan on this repository
- Build a codeql database and run the important only query suite
- Perform taint analysis and report security vulnerabilities

## Similar
- [git-guardrails-claude-code](https://affpapa.org/en/nevibecode/skills/git-guardrails-claude-code.md) — skill · 499069 installs
- [ponytail-review](https://affpapa.org/en/nevibecode/skills/ponytail-review.md) — skill · 57000 installs
- [ponytail-audit](https://affpapa.org/en/nevibecode/skills/ponytail-audit.md) — skill · 45400 installs
- [security-audit](https://affpapa.org/en/nevibecode/skills/cloudflare-security-audit.md) — skill · 54800 installs
- [security-and-hardening](https://affpapa.org/en/nevibecode/skills/security-and-hardening.md) — skill · 70200 installs
- [supabase](https://affpapa.org/en/nevibecode/skills/supabase.md) — skill · 8 installs

## Other versions with the same name
- [codeql · github](https://affpapa.org/en/nevibecode/skills/codeql.md) — 2000 installs

From the same set: [trailofbits/skills](https://affpapa.org/en/nevibecode/by/trailofbits/skills.md) — 77 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
