Trail of Bits Static Analysis
Draft · awaiting reviewClaude Code plugin that drives CodeQL, Semgrep and SARIF parsing to find security vulnerabilities in a codebase.
For Code review and static analysis (SAST)Works with Claude Code, CodexMaintained trailofbits, last push 2026-10-15
PluginA plugin bundles skills, commands, hooks or MCP servers for one AI client. by trailofbits · read from the code at 5c99c03 (1.5.0) on 2026-10-19The date we last read the tool’s files. The code after “at” names the exact version (the git commit) we read; a newer version may differ. · Not run yet.Whether we have run the tool in our lab. “Did more than it said” means the run used rights its description does not name; “did no more than it said” means it stayed within them.
What the code shows, worst first. No run advice yet: the one word needs a read under the full rule.
Level 2. Files. Copies generated data-extension YAML into the CodeQL pack cache outside the working directory.
Level 2. Network. Shallow-clones every third-party rule URL, and L281 accepts any https host.
Level 2. Execution. Installs the target project's dependencies and runs its build.
Level 2. Persistence. Suggests a global npm install for SARIF validation.
Level 2. Approval. Frontmatter pre-approves unscoped Bash plus Write and Edit, which equals broad pre-approval.
No evidence. Secrets. Unknown: the plugin's own scripts show no credential or environment access; the pattern scan matched only the repo-root marketplace keyword list, not plugins/static-analysis. That never counts as zero.
Before first useSettings for your AI client that limit the tool to the rights its task needs; derived from the code unless marked tested. derived from the code, not tested
- Claude Code: run only against code you trust; keep the Semgrep ruleset-approval gate on and review the cloned third-party rule repos before scanning.
- Codex: sandbox_mode=workspace-write; allow outbound only to the rule repositories listed in references/rulesets.md.
What the code can reach, 0 to 3 per right; a dashed point means no evidence, never zero. The three readings
Is it for you?
- Made for
- Detects security vulnerabilities in codebases.
- Runs CodeQL for interprocedural taint tracking and data flow analysis, and Semgrep for pattern-based bug detection.
- Parses SARIF output and aggregates and deduplicates findings from several tools.
- Use it when
- Scan a repository with CodeQL: build the database, create data extensions, then run the analysis Code review and static analysis (SAST)
- Run a Semgrep security audit of a codebase, or find vulnerabilities before code review Code review and static analysis (SAST)
- Read, aggregate and deduplicate SARIF findings from several security scanners Code review and static analysis (SAST)
- Build a CodeQL database when the build is the long, uncertain part and should be driven to a conclusion Code review and static analysis (SAST)
- Not for
- The semgrep skill is not meant for binary analysis.
- The sarif-parsing skill does not run scans; it processes existing SARIF results.
- The semgrep skill points projects that already run Semgrep in CI to their existing pipeline.
- You need
- Ships as a Claude Code plugin marketplace; Codex can load the same marketplace through its Claude marketplace compatibility
- The CodeQL skill stops unless the codeql CLI is on PATH (gh-codeql extension, Homebrew cask or codeql-bundle)
- The CodeQL skill also requires jq and uv on PATH
+5 more
Details: You need
Install
linked, not distributed: the Field Guide does not bundle agents or MCP serversUpstream
/plugin marketplace add trailofbits/skills /plugin menu
Quoted from README.md#L12-18 at the pinned commit; a quotation, not a command to copy.
Run it with least privilege
- claude code
run only against code you trust; keep the Semgrep ruleset-approval gate on and review the cloned third-party rule repos before scanning- codex
sandbox_mode=workspace-write; allow outbound only to the rule repositories listed in references/rulesets.md- note
derived from the code, not tested in the lab
derived, not tested: proposed from the code analysis
The record · every value with its evidence
What we checked, and what we found.
Profile read at commit 5c99c03 on 2026-10-25: 56 facts, each with its quoted line confirmed by script; not installed, not run in the lab.Each fact was read from the tool's files at the checked version and links to the line it comes from. Where nothing was found, the page says so instead of assuming “none”.
Selected by criteria v0.1, approved by Ilja Schlak: awaiting approval. Each section opens with the answer; the file and line of every fact follow it.
What it can change the capability groups as upstream groups them, worst first
Changes, deletes, runs commands, according to the capabilities read.
| Group | What it covers | Effect | On by default |
|---|---|---|---|
| codeql | Deep security analysis with taint tracking and data flow. README.md L16, plugins/static-analysis/README.md#L16 at the checked commit | reads, changes, deletes, runs commands | yes |
| semgrep | Pattern-based security scanning with Semgrep. README.md L17, plugins/static-analysis/README.md#L17 at the checked commit | reads, changes, deletes, runs commands | yes |
| /static-analysis:semgrep-scan | Workflow shipped as /static-analysis:semgrep-scan with four phases: Detect, Select, Scan, Report. README.md L72, plugins/static-analysis/README.md#L72 at the checked commit | reads, changes, deletes, runs commands | yes |
| /static-analysis:codeql-build | /static-analysis:codeql-build walks the build-method ladder (autobuild, custom command, multi-step, no-build), retrying at each rung, then enforces the quality gate. README.md L73, plugins/static-analysis/README.md#L73 at the checked commit | reads, changes, deletes, runs commands | yes |
| sarif-parsing | Parses and processes results from static analysis tools. README.md L18, plugins/static-analysis/README.md#L18 at the checked commit | reads, runs commands | yes |
Where it sends data and who can connect to it
5 outside connections found in the files read: Semgrep registry, Third-party Semgrep rule repositories, CodeQL pack registry, Target project's package registries, Homebrew.
- Semgrep registry download, by default. semgrep resolves p/ ruleset identifiers such as p/default against the Semgrep registry when it runs. scan-workflow.md L73-76, plugins/static-analysis/skills/semgrep/workflows/scan-workflow.md#L73-76 at the checked commit
- Third-party Semgrep rule repositories download, by default. run-scans.sh shallow-clones each third-party rule repository URL with git clone --depth 1. run-scans.sh L409, plugins/static-analysis/skills/semgrep/scripts/run-scans.sh#L409 at the checked commit
- CodeQL pack registry download, if you turn it on. Trail of Bits CodeQL query packs (cpp, go, java) are fetched with codeql pack download. ruleset-catalog.md L27-31, plugins/static-analysis/skills/codeql/references/ruleset-catalog.md#L27-31 at the checked commit
- Target project's package registries download, if you turn it on. When a build fails, the fix catalog installs the target project's dependencies with its own package manager. build-fixes.md L35, plugins/static-analysis/skills/codeql/references/build-fixes.md#L35 at the checked commit
- Homebrew download, if you turn it on. After the user picks the option, the macOS arm64e path installs llvm and make with Homebrew before retrying the build. macos-arm64e-workaround.md L178-186, plugins/static-analysis/skills/codeql/references/macos-arm64e-workaround.md#L178-186 at the checked commit
Listens for no connections in the files read.
Other connections not ruled out: read in the documentation and the cited code, not searched in full.
How it runs generated from the files read, never drawn by hand
The semgrep-scan workflow's Scan phase calls run-scans.sh; exit codes come from the semgrep processes and finding counts from the JSON they wrote. README.md L86-88, plugins/static-analysis/README.md#L86-88 at the checked commit
Your AI client
Parts that live inside the AI client: skill instructions, client configuration.
- Skills: codeql, semgrep, sarif-parsing SKILL.md files with reference and workflow documents that the client model follows step by step. SKILL.md L20, plugins/static-analysis/skills/codeql/SKILL.md#L20 at the checked commit
- Workflows: semgrep-scan.js, codeql-build.js Plugin workflow script shipped as /static-analysis:semgrep-scan, namespaced by the plugin's name field. semgrep-scan.js L1-3, plugins/static-analysis/workflows/semgrep-scan.js#L1-3 at the checked commit
Your machine
Programs and files on the machine where you run the tool.
- Bundled bash and Python scripts run-scans.sh runs the selected Semgrep rulesets, generates every semgrep command, and reports what each scan produced. run-scans.sh L2-4, plugins/static-analysis/skills/semgrep/scripts/run-scans.sh#L2-4 at the checked commit
- CodeQL CLI The codeql CLI on PATH; the skill stops if it is missing and names gh-codeql, the Homebrew cask or codeql-bundle as install routes. SKILL.md L141-147, plugins/static-analysis/skills/codeql/SKILL.md#L141-147 at the checked commit
- Semgrep CLI Semgrep CLI, required and checked with semgrep --version. SKILL.md L89, plugins/static-analysis/skills/semgrep/SKILL.md#L89 at the checked commit
The six rights, read three waysThe six rights a tool can take (files, network, execution, secrets, persistence, approval), each read three ways and rated 0 to 3. 0 never means safe; “?” means no evidence. what the author says, what the code shows, what one lab run showed
Level 2 (open), one right unknown, read from the code. Not run in our lab yet.
0 contained · 1 scoped · 2 open · 3 privileged · ? no evidence · 0 never means safe · zero means: none declared (Declared), none found (Code), none observed (Lab)
Author says: the evidence
- Files · 1SKILL.md L51 author keeps all generated files in one output directory
- Network · 1README.md L79 author declares that run-scans.sh clones the third-party rule repositories
- Execution · 2SKILL.md L13 frontmatter pre-approves Bash with no command pattern
- Approval · 2SKILL.md L13 frontmatter pre-approves unscoped Bash plus Write and Edit
Code shows: the evidence
- Files · 2extension-yaml-format.md L165 copies generated data-extension YAML into the CodeQL pack cache outside the working directory
- Network · 2run-scans.sh L409 shallow-clones every third-party rule URL, and L281 accepts any https host
- Execution · 2build-fixes.md L54 installs the target project's dependencies and runs its build
- Secrets · ?no evidence: the plugin's own scripts show no credential or environment access; the pattern scan matched only the repo-root marketplace keyword list, not plugins/static-analysis
- Persistence · 2SKILL.md L381 suggests a global npm install for SARIF validation
- Approval · 2SKILL.md L13 frontmatter pre-approves unscoped Bash plus Write and Edit, which equals broad pre-approval
Valid for commit 5c99c03 (1.5.0) · checked 2026-10-19 · method reach-v0.1The published rules we follow: how tools are selected, how their rights are read and rated, how a lab run is done.
Limits and risks what the files say that fits nowhere else, and what this reading does not cover
- To fix a failed CodeQL build, the skill installs the target project's dependencies (pip install -r requirements.txt, pip install -e ., npm install). build-fixes.md L45-54, plugins/static-analysis/skills/codeql/references/build-fixes.md#L45-54 at the checked commit
- For compiled languages the CodeQL build methods run the target project's own build (autobuild, custom command, multi-step tracing). build-database.md L27-32, plugins/static-analysis/skills/codeql/workflows/build-database.md#L27-32 at the checked commit
- run-scans.sh accepts third_party entries that match an https URL pattern allowing any host name and port, and exits otherwise. run-scans.sh L279-282, plugins/static-analysis/skills/semgrep/scripts/run-scans.sh#L279-282 at the checked commit
- Semgrep OSS mode cannot track data flow across files; cross-file analysis needs Semgrep Pro. SKILL.md L105, plugins/static-analysis/skills/semgrep/SKILL.md#L105 at the checked commit
- Semgrep sends telemetry by default and --config auto also phones home, so the skill requires --metrics=off on every semgrep command. SKILL.md L23, plugins/static-analysis/skills/semgrep/SKILL.md#L23 at the checked commit
- The build-fix catalog cleans build state in the target project (make clean, rm -rf build CMakeCache.txt CMakeFiles, gradlew, mvn and cargo clean). build-fixes.md L23-30, plugins/static-analysis/skills/codeql/references/build-fixes.md#L23-30 at the checked commit
- As a workaround for pre-compiled packs, the CodeQL skill copies generated data extension YAML into the ext/ directory inside CodeQL's managed pack cache. extension-yaml-format.md L154-156, plugins/static-analysis/skills/codeql/references/extension-yaml-format.md#L154-156 at the checked commit
- To locate run-scans.sh, the semgrep-scan workflow checks the plugin root and plugin cache and, as a fallback, searches the home directory to depth 9. semgrep-scan.js L203-212, plugins/static-analysis/workflows/semgrep-scan.js#L203-212 at the checked commit
- If the user picks the Rosetta option on an affected Apple Silicon Mac, the CodeQL skill runs softwareupdate --install-rosetta --agree-to-license before retrying the build. macos-arm64e-workaround.md L190-198, plugins/static-analysis/skills/codeql/references/macos-arm64e-workaround.md#L190-198 at the checked commit
- As a database quality improvement, the CodeQL skill pip-installs the type stubs types-requests, types-PyYAML and types-redis into the target project's environment. quality-assessment.md L163-170, plugins/static-analysis/skills/codeql/references/quality-assessment.md#L163-170 at the checked commit
- The sarif-parsing skill's schema validation example installs ajv-cli globally with npm install -g. SKILL.md L379-382, plugins/static-analysis/skills/sarif-parsing/SKILL.md#L379-382 at the checked commit
- The semgrep-scan workflow scans the current working directory when no target is given, and by default creates its output directory beside the target. semgrep-scan.js L9, plugins/static-analysis/workflows/semgrep-scan.js#L9 at the checked commit
- The Semgrep ruleset selection adds third-party rule repositories (Trail of Bits, 0xdea, Decurity and others) automatically whenever the language matches and marks them as not optional. rulesets.md L122-130, plugins/static-analysis/skills/semgrep/references/rulesets.md#L122-130 at the checked commit
- Not covered: what it does at runtime. Other connections not ruled out: read in the documentation and the cited code, not searched in full.
What you need and what the documented installer does
| Kind | What |
|---|---|
| AI client | Claude Code, Codex |
| Runtime | Ships as a Claude Code plugin marketplace; Codex can load the same marketplace through its Claude marketplace compatibility. README.md L3, README.md#L3 at the checked commit |
| Other tools | The CodeQL skill stops unless the codeql CLI is on PATH (gh-codeql extension, Homebrew cask or codeql-bundle). SKILL.md L141-147, plugins/static-analysis/skills/codeql/SKILL.md#L141-147 at the checked commit |
| Other tools | The CodeQL skill also requires jq and uv on PATH. SKILL.md L151-160, plugins/static-analysis/skills/codeql/SKILL.md#L151-160 at the checked commit |
| Other tools | The Semgrep skill requires the Semgrep CLI. scan-workflow.md L68-71, plugins/static-analysis/skills/semgrep/workflows/scan-workflow.md#L68-71 at the checked commit |
| Other tools | For C/C++, Java/Kotlin, C# and Rust, complete extraction needs a build CodeQL can trace; --build-mode=none gives partial analysis. build-database.md L23-26, plugins/static-analysis/skills/codeql/workflows/build-database.md#L23-26 at the checked commit |
| Runtime | The codeql skill's two Python scripts declare Python 3.11 or later and run standalone under uv run. pyproject.toml L4-10, plugins/static-analysis/skills/codeql/scripts/pyproject.toml#L4-10 at the checked commit |
| Account | Semgrep Pro is optional; it enables cross-file taint tracking, inter-procedural analysis and Apex, C# and Elixir. SKILL.md L91, plugins/static-analysis/skills/semgrep/SKILL.md#L91 at the checked commit |
| Credentials | When the target's dependencies come from a private registry, the CodeQL build-fix step asks the user to configure registry authentication and retry, or to skip them. build-fixes.md L84-92, plugins/static-analysis/skills/codeql/references/build-fixes.md#L84-92 at the checked commit |
What the documented installer does
- Claude Code: add the trailofbits/skills marketplace with /plugin marketplace add, then pick the plugin from /plugin menu. README.md L11-18, README.md#L11-18 at the checked commit
- The plugin README gives a one-line install by repository path: /plugin install trailofbits/skills/plugins/static-analysis. README.md L102, plugins/static-analysis/README.md#L102 at the checked commit
- Codex: codex plugin marketplace add trailofbits/skills, then codex plugin add <plugin-name>@trailofbits. README.md L27-31, README.md#L27-31 at the checked commit
Lab runs one run is an observation, not a benchmark
About this entry
- Type
- Plugin · Defensive · works with Claude Code, Codex
- Source
- github.com/trailofbits/skills ·
plugins/static-analysis· CC-BY-SA-4.0 · manifestplugin.json - Version readThe install command installs exactly the version we checked (the pinned git commit), so what you get is what the card describes.
- 5c99c03 · 1.5.0 · last upstream push 2026-10-15 · no release since the pinned commit
- In the catalog
- listed · added 2026-10-19 · last checked 2026-10-19 · next check 2027-01-17 · fresh
- ScannersA scan of the tool's files with a scanner for malicious patterns. “Pending” means it has not run yet.
- cisco-skill-scanner: not run, pending
- Changes
- none since the entry was added on 2026-10-19
Disagree?
Dispute a value with evidence (file, line, commit): write to hello@readbeforerun.ai. A dispute is checked against the pinned commit; a changed value is logged under Changes.
How this entry was checked, and how to cite it
Selected by the published criteria (method v0.1). What the author says comes only from author statements; what the code shows comes from the code and manifests at commit 5c99c03, each with one evidence line. A “?” means no evidence, never zero; zero never means safe.
The descriptive profile (what it does, can do, how it runs, what it needs) was read through the same isolated pipeline at commit 5c99c03 on 2026-10-25: one reader proposed every fact with a quoted line, a script confirmed each quoted line (56 of 56), and a second reader checked each sentence against its lines. Where nothing was found, the page says so instead of assuming “none”.
Known issues and limits: remote server-side behaviour stays “?”; the lab is not your production; static analysis can miss runtime behaviour.
Placement, badges or fast tracks are not for sale. The author is employed by an IT consultancy; the company has no influence on selection, execution or result.
Cite this:
Ilja Schlak. "Trail of Bits Static Analysis". Agentic Security Field Guide, checked 2026-10-19, method reach-v0.1. https://readbeforerun.ai/catalog/trailofbits-static-analysis/For maintainers
Badge for your README (reach ≥2 · not run yet):
[](https://readbeforerun.ai/catalog/trailofbits-static-analysis/)Dispute a value with evidence (file, line, commit): write to hello@readbeforerun.ai. A dispute is checked against the pinned commit; a changed value is logged under Changes.
Claim the entry with a fieldguide.yaml in your repository: planned.
Other tools for the same task
Task: Code review and static analysis (SAST). The task pages compare every tool side by side.- Code showsCloudflare Security Audit SkillDraft · awaiting review
Agent skill that runs a multi-phase, source-first security audit of a codebase and verifies each candidate finding.
Can write outside the project · run shell commands or eval · read broad tokens or the environment · not run yet · checked 2026-10-19
- Code showsTrail of Bits Agentic Actions AuditorDraft · awaiting review
Claude Code plugin that statically audits GitHub Actions workflows which invoke AI coding agents for injection and permission flaws.
Can run shell commands or eval · run with broad pre-approvals · not run yet · checked 2026-10-19