Skills Explorer Add Skills

codeql

An agent skill by trailofbits, from trailofbits/skills. Tags: analysis, codeql, security, static-analysis.

What it does

Scans a codebase for security vulnerabilities using CodeQL's interprocedural data flow and taint tracking analysis. Triggers on "run codeql", "codeql scan", "build codeql database", "SAST scan", "taint analysis", "dataflow analysis", or "find vulnerabilities in this repo". Covers Python, JavaScript/TypeScript, Go, Java/Kotlin, C/C++, C#, Ruby, and Swift. Supports "run all" (security-and-quality + security-experimental) and "important only" (high-precision) scan modes, and creates data extension models for project-specific sources and sinks. For fast single-file pattern matching, or when no build is available for a compiled language, use the semgrep skill; to parse SARIF that already exists rather than produce it, use the sarif-parsing skill.

Install

With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:

npx skills add trailofbits/skills --skill codeql

Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):

git clone --depth 1 https://github.com/trailofbits/skills
cp -r skills/plugins/static-analysis/skills/codeql ~/.claude/skills/codeql

Safety box score

Grade D, elevated risk: 44 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.

This skill runs CodeQL database builds and security analyses on a local repository, including project build commands, package installs, and optional toolchain/OS setup. The main risks are arbitrary code execution during extraction, network-backed dependency installation, and cleanup steps that can delete build/database directories or modify the user's toolchain.

Category levels, from 0 (none) to 3 (high)
CategoryLevelWhy
Code & shell execution3 (high)High: it runs CodeQL and project build commands directly (`run_logged codeql database create "$DB_NAME" --language="$CODEQL_LANG" --command="$BUILD_CMD" --overwrite`) and also installs dependencies (`run_logged pip install -e .`, `npm install`), so it can execute arbitrary repo code.
Network access2 (moderate)Moderate: the docs call for fetching external dependencies and packs (`codeql pack download ...`, `go mod download`, `mvn dependency:resolve`, `cargo fetch`, `brew install ...`), so the skill can make outbound network requests.
Filesystem reach2 (moderate)Moderate: it writes all analysis artifacts under `$OUTPUT_DIR`, but also deletes and overwrites local paths (`rm -rf "$DB_NAME"`, `rm -rf build CMakeCache.txt CMakeFiles`, and copying extensions into CodeQL cache under `.codeql/libraries/.../ext`).
Secrets & credentials0 (none)Nothing in the supplied files reads keychains, browser sessions, `.env` files, passwords, or credential stores; the only auth mention is a generic private-registry prompt.
Privilege & persistence3 (high)High: it includes system/toolchain changes such as `brew install llvm make`, `softwareupdate --install-rosetta --agree-to-license`, and package-manager installs, which can change the user's machine outside the repo.
Instruction hijack surface0 (none)I did not find instructions to ignore safeguards, follow remote content, hide behavior, or override system/developer rules; the prompts are about database selection and scan mode.
Irreversible actions0 (none)The skill analyzes code and reports results, but it does not publish, deploy, send messages, pay, book, or delete remote resources.
Transparency1 (low)Low: the runtime workflow entrypoint `workflows/codeql-build.js` is referenced by tests (`scripts/test_script_flags.py`) but is not included in the supplied files, so the full behavior is not directly reviewable.

Before installing

Rated 2026-10-20 by an automated review of 32 files from the skill's repository.

Source

Repository
trailofbits/skills (all skills from this repository)
Path
plugins/static-analysis/skills/codeql/SKILL.md
Branch
main
Collection
static-analysis
Updated
2026-09-19