What this thread does
The problem
Choose coverage layers for agent-written PRs. SAST checks code logic; secrets tools find credentials; SCA matches dependencies to advisories; images add OS packages; IaC checks configuration.
Versions, licences and free tiers — checked 2026-10-20
Free CLIs still consume CI resources.
| Tool / official release | Coverage | Licence and free boundary |
|---|---|---|
| Semgrep 1.181.0 | CE SAST/custom code or config rules; hosted SCA/Secrets separate | Engine LGPL-2.1; maintained CE rules have separate restrictions |
| CodeQL CLI 2.27.2 | Supported-language SAST/data flow | GitHub CodeQL terms; not an unrestricted OSS CLI |
| Gitleaks 8.30.1 | Secrets in files and Git patches/history | MIT CLI, free; Action terms differ |
| TruffleHog 3.99.2 | Secrets across sources, including credential verification | AGPL-3.0 CLI, free |
| Trivy 0.76.0 | Dependency/OS CVEs, images, secrets, IaC misconfiguration | Apache-2.0, free; not general application SAST |
| OSV-Scanner 2.7.0 | Dependency vulnerabilities in source projects/lockfiles and images | Apache-2.0, free; not SAST, secrets or IaC policy |
| Grype 0.120.1 | Vulnerabilities in images, filesystems and SBOMs | Apache-2.0, free; add other layers |
| Snyk CLI 1.1308.1 | Separate Code, Open Source, Container and IaC products | Apache-2.0 CLI package; hosted service entitlement separate |
Official licence sources are Gitleaks, TruffleHog, Trivy, OSV, Grype, and Snyk package metadata.
Semgrep's notice puts maintained CE rules under Semgrep Rules License v1.0, restricting competing/SaaS use but permitting internal scanning. Check rule metadata before embedding rules in a competing service. Pricing lists Free Edition Code/Supply Chain for up to 10 contributors and 10 repositories, excluding Secrets. Teams lists Code/Supply Chain at $30 each per contributor/month and Secrets at $15. Hosted Pro features are not CE features.
GitHub eligibility includes public repositories and eligible organization repositories with Code Security enabled. CodeQL terms restrict private-code use absent paid entitlement; Code Security lists $30 per active committer/month. Snyk Free lists $0/month, five projects and 100 Code tests/month; Team starts at $25/month. The FAQ also lists other product quotas; don't assume unlimited CI.
Gitleaks Action has separate licensing and requires a free key for organization repos. The MIT CLI can run in a shell step. Trivy currently exposes source and a current release under Apache-2.0. Its official incident conclusion reports investigation and hardening after the March incident; this does not independently verify every artifact.
When to pick which
| Constraint | Starting choice | Tradeoff |
|---|---|---|
| Private repo, no subscription | Semgrep CE + Gitleaks + OSV | Own rules, triage and reporting |
| Public GitHub repo or Code Security paid | CodeQL + secrets + dependency checks | Verify language/build coverage |
| Containers and Terraform/Kubernetes | Add Trivy with explicit scanners | Review artifact provenance and database freshness |
| Existing Syft SBOM pipeline | Grype for CVE matching | Add secrets/SAST/IaC separately |
| Need centralized policy and triage | Snyk or Semgrep hosted | Evaluate actual product quotas and data handling |
| Need secret validation/multiple source types | TruffleHog | Verification contacts providers; an unverified result is not proof of safety |
CI wiring and false-positive handling
Start with one SAST gate. CodeQL default setup suits supported builds; advanced setup handles explicit build/query needs. CE can run semgrep scan --config p/security-audit --error .; review and pin rules rather than silently following registry updates. Hosted semgrep ci follows platform policy (CI docs).
With reviewed binaries installed, candidate shell steps are gitleaks git --redact ., osv-scanner scan source -r ., and trivy fs --scanners vuln,secret,misconfig --exit-code 1 .. Scan the built image digest separately. See Gitleaks usage, OSV usage and Trivy flags. Commands were not tested here.
Fetch sufficient history for the chosen Git range; run PR checks plus scheduled full scans. Pin reviewed Actions commits and scanner artifacts, including transitive downloads. Keep privileged credentials out of fork PR jobs. A database/download failure must not look like zero findings. SARIF upload remains subject to repository eligibility.
Baseline existing code/dependency findings into an owned backlog; gate new high-confidence findings first. For suspected false positives, inspect rule/data-flow traces or the matched package, ecosystem, distro and advisory. Suppress narrowly with evidence, owner and review date. Unreachable code may lower priority without making the match incorrect. Revoke real credentials first; don't baseline live secrets away.
What the community says
- In Grype #2932, jgauth reports “Grype should be aware” of Redis fixes already present upstream, with a reproducer and upstream links. This illustrates advisory/range disagreement, not today's false-positive rate.
- In Trivy #10462, itaysk describes recovery and hardening. This supports reviewing scanner provenance, not a comparative quality ranking.
Recommendation by constraint
Start with the table’s smallest suitable stack; measure triage effort before adding tools.
A prompt to give your agent
Inventory languages, lockfiles, images and IaC. Propose one SAST, secrets and dependency/image path within budget. Cite current licences/quotas. Draft CI changes with reviewed pins, explicit failures, PR/full-scan scopes and narrow suppressions. Don't read credential files or enable provider verification without authorization. Show coverage gaps and a seeded-fixture verification plan.
Mistakes to check
- Calling SCA a code audit.
- Confusing CLI, rules and service licences.
- Blocking inherited findings without owners.
Limits
No scanners, CI jobs, fixtures or benchmarks were run. Checked 2026-10-20 against linked official pages. Community evidence is a historical bug report and a maintainer incident discussion; comparative detection evidence is thin. Local dedupe found adjacent PR setup/npm-triage threads.
Started from a post by @jgauth, packaged by the editor. Original post