static-analysis
Static analysis toolkit with CodeQL, Semgrep, and SARIF parsing for security vulnerability detection
Imported description, not reviewed yet
This item came from its original repository and was only scanned automatically; no editor has written an Arabic description for it yet. Read its content yourself before you rely on it. This page is not indexed by search engines until it is reviewed.
Download
Read this before you download
Talqeen never runs anything from this item. But what you download runs on your machine if you run it or let Claude Code run it, so read the files first.
- The item has script files.
Install
Plugins are installed from a plugin marketplace in Claude Code, not by copying files. Download the package to read its content and its license.
Instructions
Static Analysis
A comprehensive static analysis toolkit with CodeQL, Semgrep, and SARIF parsing for security vulnerability detection.
CodeQL and Semgrep skills are based on the Trail of Bits Testing Handbook:
Author: Axel Mierczuk & Paweł Płatek
Skills Included
| Skill | Purpose |
|---|---|
codeql | Deep security analysis with taint tracking and data flow |
semgrep | Fast pattern-based security scanning |
sarif-parsing | Parse and process results from static analysis tools |
When to Use
Use this plugin when you need to:
- Perform security vulnerability detection on codebases
- Run CodeQL for interprocedural taint tracking and data flow analysis
- Use Semgrep for fast pattern-based bug detection
- Parse SARIF output from security scanners
- Aggregate and deduplicate findings from multiple tools
What It Does
CodeQL
- Create databases for Python, JavaScript, Go, Java, C/C++, and more
- Run security queries with SARIF/CSV output
- Generate data extension models for project-specific APIs
- Select and combine query packs (security-extended, Trail of Bits, Community)
Semgrep
- Quick security scans using built-in rulesets (OWASP, CWE, Trail of Bits)
- Write custom YAML rules with pattern matching
- Taint mode for tracking data flow from sources to sinks
- CI/CD integration with baseline scanning
SARIF Parsing
- Understand SARIF 2.1.0 structure
- Resolve a result's severity from the rule it inherits it from, which CodeQL relies on
- Quick analysis using jq for CLI queries
- Python scripting with pysarif and sarif-tools
- Aggregate and deduplicate results from multiple files
- CI/CD integration patterns
Running a Semgrep scan
Two entry points over one implementation.
/static-analysis:semgrep-scan {"target": "/abs/path", "mode": "run-all"}
runs the scan end to end: detect languages and Pro, select rulesets, scan, merge, report. It
does not stop to have the ruleset list approved — invoking it with a target is the opt-in. That
is safe because the scan is read-only over the target: no --autofix, every write inside the
output directory, and it refuses to run when the output directory is the target.
Ask for the semgrep skill instead when the ruleset selection is the thing that matters. Its
five-step path presents the list and waits for approval before anything runs. Both paths read
the same references/, so a ruleset added to rulesets.md reaches both.
Workflows Included
| Workflow | Purpose |
|---|---|
workflows/semgrep-scan.js | Ships as /static-analysis:semgrep-scan. Four phases: Detect, Select, Scan, Report |
workflows/codeql-build.js | Ships as /static-analysis:codeql-build. Three phases: Detect, Build, Assess. Walks the build-method ladder — autobuild, custom command, multi-step, no-build — diagnosing and retrying at each rung, then enforces the quality gate |
Scripts Included
| Script | Purpose |
|---|---|
skills/semgrep/scripts/run-scans.sh | Builds every semgrep command from the selected rulesets, clones the third-party rule repos, runs the scans in batches and writes scans.json |
skills/semgrep/scripts/merge_sarif.py | Merges the per-scan SARIF into one results.sarif |
Generating the commands in one place is what makes --metrics=off, the --include scoping
rule, and the output-directory --exclude properties of the code rather than instructions a
model can drop.
No subagent runs any part of the scan — the workflow's Scan phase calls run-scans.sh. Exit
codes come from the semgrep processes and finding counts from the JSON they wrote, so nothing in
the result is a self-report that a later step has to go behind and verify.
Tests
Both suites are hermetic, reach no network, and are discovered by CI's existing shell-suite step.
| Suite | Covers |
|---|---|
tests/run_scan_tests.sh | run-scans.sh: command generation via --dry-run, plus execution, exit codes and clone failures against stub semgrep and git binaries |
tests/run_workflow_tests.sh | semgrep-scan.js, via tests/workflow-harness.js, which compiles it with stubbed globals. --self-test mutates the workflow and requires every mutation to turn a scenario red |
Installation
/plugin install trailofbits/skills/plugins/static-analysis
Related Skills
variant-analysis- Use CodeQL/Semgrep patterns to find bug variants
Files
- folder.claude-plugin239 B
- plugin.json239 B
- folderskills427 KBscript
- foldercodeql240 KBscript
- folderagents239 B
- openai.yaml239 B
- folderassets3 KB
- trail-of-bits-mark.svg3 KB
- folderreferences62 KB
- build-fixes.md3.2 KB
- diagnostic-query-templates.md9.5 KB
- extension-yaml-format.md7.4 KB
- important-only-suite.md5.1 KB
- language-details.md5.7 KB
- macos-arm64e-workaround.md7.3 KB
- performance-tuning.md2.8 KB
- quality-assessment.md7.8 KB
- ruleset-catalog.md2.1 KB
- run-all-suite.md5.4 KB
- sarif-processing.md3 KB
- threat-models.md2.7 KB
- folderscripts120 KBscript
- build_log.sh2.1 KBscript
- check_db_quality.py15 KBscript
- find_databases.sh2.5 KBscript
- generate_suite.sh3.3 KBscript
- pyproject.toml585 B
- test_build_log.py3.2 KBscript
- test_build_mode_claims.py3.6 KBscript
- test_check_db_quality.py20 KBscript
- test_find_databases.py6 KBscript
- test_generation_scripts.py12 KBscript
- test_script_flags.py6.3 KBscript
- test_section_pointers.py7.9 KBscript
- test_shell_blocks.py29 KBscript
- test_suite_templates.py5 KBscript
- test_verify_query_suite.py1.9 KBscript
- verify_query_suite.py2.7 KBscript
- folderworkflows37 KB
- build-database.md13 KB
- create-data-extensions.md10 KB
- run-analysis.md13 KB
- SKILL.md18 KB
- foldersarif-parsing59 KBscript
- folderagents231 B
- openai.yaml231 B
- folderassets3 KB
- trail-of-bits-mark.svg3 KB
- folderresources38 KBscript
- folderfixtures4 KB
- codeql-no-level.sarif2.2 KB
- levels-on-results.sarif1.7 KB
- jq-queries.md7.7 KB
- sarif_helpers.py13 KBscript
- test_sarif_helpers.py14 KBscript
- SKILL.md18 KB
- foldersemgrep128 KBscript
- folderagents229 B
- openai.yaml229 B
- folderassets3 KB
- trail-of-bits-mark.svg3 KB
- folderreferences16 KB
- rulesets.md7.5 KB
- scan-modes.md8.5 KB
- folderscripts70 KBscript
- merge_sarif.py14 KBscript
- run-scans.sh34 KBscript
- test_merge_sarif.py22 KBscript
- folderworkflows24 KB
- scan-workflow.md24 KB
- SKILL.md15 KB
- foldertests67 KBscript
- codeql_build_harness.js13 KBscript
- run_codeql_build_tests.sh770 Bscript
- run_scan_tests.sh32 KBscript
- run_workflow_tests.sh754 Bscript
- workflow-harness.js20 KBscript
- folderworkflows48 KBscript
- codeql-build.js19 KBscript
- semgrep-scan.js29 KBscript
- LICENSE20 KB
- README.md4.7 KB
What the automatic scan found
We scanned the files automatically when they were imported. This is what the scan pointed at. It does not mean the item is harmful, and it does not mean it is safe: read it yourself.
- Needs a lookA script file
In file plugins/static-analysis/skills/codeql/scripts/build_log.sh
- Needs a lookDeletes files forcibly and recursively
In file plugins/static-analysis/skills/codeql/references/build-fixes.md, line 14
- Needs a lookDeletes files forcibly and recursively
In file plugins/static-analysis/skills/semgrep/scripts/run-scans.sh, line 309
- Needs a lookDeletes files forcibly and recursively
In file plugins/static-analysis/skills/semgrep/workflows/scan-workflow.md, line 392
- Needs a lookObfuscation or dynamic evaluation of text
In file plugins/static-analysis/tests/codeql_build_harness.js, line 25
- Needs a lookDeletes files forcibly and recursively
In file plugins/static-analysis/tests/run_scan_tests.sh, line 69
- Needs a lookObfuscation or dynamic evaluation of text
In file plugins/static-analysis/tests/run_scan_tests.sh, line 391
- Needs a lookObfuscation or dynamic evaluation of text
In file plugins/static-analysis/tests/workflow-harness.js, line 25
- Needs a lookDeletes files forcibly and recursively
In file plugins/static-analysis/workflows/semgrep-scan.js, line 464
Comments (0)
No comments yet. Be the first.
Sign in to comment. Commenting comes at level 1 (Member).