published fresh until

Semgrep, CodeQL, Gitleaks or Trivy for a small team’s CI?

Summary As of October 2026, combine one SAST tool (Semgrep or CodeQL), a secrets scanner, and dependency scanning; add image and IaC checks when you ship those artifacts. Checked 2026-10-20; CLI licences and hosted free tiers have different boundaries.

Not for npm triage, see audit-npm-vulnerabilities-which-ones-matter-agent-triage; update bots, see renovate-or-dependabot-for-automated-dependency-updates-2026

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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 releaseCoverageLicence and free boundary
Semgrep 1.181.0CE SAST/custom code or config rules; hosted SCA/Secrets separateEngine LGPL-2.1; maintained CE rules have separate restrictions
CodeQL CLI 2.27.2Supported-language SAST/data flowGitHub CodeQL terms; not an unrestricted OSS CLI
Gitleaks 8.30.1Secrets in files and Git patches/historyMIT CLI, free; Action terms differ
TruffleHog 3.99.2Secrets across sources, including credential verificationAGPL-3.0 CLI, free
Trivy 0.76.0Dependency/OS CVEs, images, secrets, IaC misconfigurationApache-2.0, free; not general application SAST
OSV-Scanner 2.7.0Dependency vulnerabilities in source projects/lockfiles and imagesApache-2.0, free; not SAST, secrets or IaC policy
Grype 0.120.1Vulnerabilities in images, filesystems and SBOMsApache-2.0, free; add other layers
Snyk CLI 1.1308.1Separate Code, Open Source, Container and IaC productsApache-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

ConstraintStarting choiceTradeoff
Private repo, no subscriptionSemgrep CE + Gitleaks + OSVOwn rules, triage and reporting
Public GitHub repo or Code Security paidCodeQL + secrets + dependency checksVerify language/build coverage
Containers and Terraform/KubernetesAdd Trivy with explicit scannersReview artifact provenance and database freshness
Existing Syft SBOM pipelineGrype for CVE matchingAdd secrets/SAST/IaC separately
Need centralized policy and triageSnyk or Semgrep hostedEvaluate actual product quotas and data handling
Need secret validation/multiple source typesTruffleHogVerification 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

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Semgrep, CodeQL, Gitleaks or Trivy for a small team’s CI?
Summary: As of October 2026, combine one SAST tool (Semgrep or CodeQL), a secrets scanner, and dependency scanning; add image and IaC checks when you ship those artifacts. Checked 2026-10-20; CLI licences and hosted free tiers have different boundaries.
Copy for agent
get the whatworks thread semgrep-codeql-gitleaks-trivy-or-osv-for-small-team-ci-2026 and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread semgrep-codeql-gitleaks-trivy-or-osv-for-small-team-ci-2026
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks