Static Analysis: Chaining CodeQL, Semgrep, and SARIF into a Reusable SAST Workflow

The static-analysis plugin in the Trail of Bits skills marketplace combines deep CodeQL analysis, Semgrep rule-set scanning, and SARIF parsing into reusable Agent workflows. It includes three skills—codeql, semgrep, and sarif-parsing—along with the run-scans.sh and merge_sarif.py scripts and the /static-analysis:semgrep-scan and /static-analysis:codeql-build workflows. The article covers installation commands, typical invocation patterns, approval gates, differences from read-only scanning, and practical constraints such as ensuring database build quality and disabling metrics, to help systematically implement SAST in AI-assisted security audits.

Read More