How it works
Scanners
Which open-source scanners run, why each one was chosen, how they are hardened against the pull request they scan, and how findings are normalized.
How it works
Which open-source scanners run, why each one was chosen, how they are hardened against the pull request they scan, and how findings are normalized.
Every review runs the scanners you enable for the repository against the checked-out head commit. They are all open source, pinned by version and SHA-256 checksum, and baked into the sandbox image. Each runs as its own step, so one failing does not stop the others.
| Scanner | Finds | Runs on a pull request when it changes |
|---|---|---|
| OpenGrep | Injection, XSS, SSRF, path traversal, unsafe deserialization and other code flaws | A source file in a language it has rules for |
| OSV-Scanner | Known-vulnerable and known-malicious dependencies | A lockfile |
| Gitleaks | Hard-coded API keys, tokens and private keys, in every commit of the pull request | Always |
| Trivy | Misconfigured Dockerfiles, Kubernetes, Helm, Terraform, CloudFormation and Azure ARM | A Dockerfile, Terraform, YAML or JSON file |
| zizmor | Exploitable GitHub Actions workflows | .github/workflows/, .github/actions/, action.yml or dependabot.yml |
| poutine | Exploitable GitLab CI, Azure Pipelines and Tekton pipelines | .gitlab-ci.yml, azure-pipelines*.yml, .tekton/, or a GitHub workflow |
| Spectral | OpenAPI specs that break the OWASP API Security Top 10 | A YAML or JSON file |
A scanner whose files a pull request didn't touch is skipped, and the run page says so. Branch reviews run every enabled scanner. You choose scanners per repository under Scanners in the repository's Review policy. See Repository settings.
The scanners are the cheap, deterministic first pass. The AI review then triages what they found and reads the diff for what rules can't express, such as broken access control and business-logic flaws. So the aim is high-signal findings across the common vulnerability classes, not the longest possible list.
Each was picked over its alternatives for a reason:
pull_request_target checkouts and ${{ }} script injection, are among the most exploited on GitHub. zizmor is the dedicated open-source auditor for them.Language-specific tools such as gosec, Bandit, FindSecBugs, Security Code Scan, njsscan and Flawfinder are already covered: the GitLab pack is a port of their rules to OpenGrep.
The scanners read files written by the pull request's author. So none of them honours anything the pull request could use to switch it off:
| Scanner | Ignored |
|---|---|
| OpenGrep | nosemgrep / nosem / noopengrep comments, .semgrepignore |
| OSV-Scanner | osv-scanner.toml (an empty config is passed instead), .gitignore |
| Gitleaks | .gitleaks.toml, .gitleaksignore, gitleaks:allow comments |
| Trivy | trivy.yaml, .trivyignore |
| zizmor | zizmor.yml, # zizmor: ignore comments, .gitignore |
| poutine | .poutine.yml, .github/poutine.yml (an empty config is passed instead) |
| Spectral | .spectral.yaml and other rulesets: only the image's OWASP ruleset is loaded |
None of the scanners runs the repository's code or build scripts. OSV-Scanner's call analysis, which would, is turned off.
The only network access any scanner has is OSV-Scanner's queries to api.osv.dev: POST /v1/querybatch and /v1/query with package names, versions and ecosystems, POST /v1experimental/determineversion with file hashes of vendored C/C++ code, then GET /v1/vulns/<id> for the advisories. No source code leaves the sandbox. Everything else is refused. See Security model.
OpenGrep is a Semgrep-compatible static analyzer. It follows untrusted input from where it enters a function (a request parameter, say) to where it is used dangerously (a SQL query), which is what separates a real injection from a call that merely looks risky.
opengrep scan --config /opt/opengrep-rules/python --config /opt/opengrep-rules/js \
--taint-intrafile \
--disable-nosem --x-ignore-semgrepignore-files \
--exclude node_modules --exclude vendor --exclude test ... \
--json --output /workspace/out/opengrep.json \
--disable-version-check --quiet \
--timeout 30 --max-target-bytes 1000000 \
/workspace/repoThe rules are stored by language (js, python, go, jvm for Java, Kotlin and Scala, c, csharp, php, ruby, rust, swift, solidity, apex, bash, clojure, elixir, ocaml, html). Before the scan, languages.sh lists the file extensions in the checkout, and only those languages' rules are loaded, which keeps a scan of a Python repository from parsing 360 Java rules.
About 980 rules, chosen when the image is built (engine/container/rules/curate.py) from five open-source packs pinned to a commit:
| Pack | Rules kept | License |
|---|---|---|
| opengrep-rules | ~405 | LGPL-2.1 with the Commons Clause |
| GitLab sast-rules | ~390 | MIT; rules/lgpl LGPL-3.0 |
| Trail of Bits | ~32 | AGPL-3.0 |
| 0xdea (C and C++ memory safety) | ~24 | MIT |
| mobsfscan (Android and iOS: Java, Kotlin, Swift) | ~125 | LGPL-3.0 |
From each pack, the curation keeps rules that find vulnerabilities and drops:
security category, rules tagged audit but not vuln (they flag a risky-looking API, not a bug), and LOW confidence rules;assert and subprocess checks, Flawfinder's checks of every strcpy, and detect-non-literal-*.Weak-crypto and weak-randomness rules (CWE-327, 328, 330, 331, 338, 916) are kept at info severity: rarely exploitable on their own, but worth knowing. A rule OpenGrep can't parse is dropped at build time, since one bad rule would abort a whole scan. The build log prints what was kept and dropped from each pack.
Files under node_modules, vendor, third_party, dist, test directories and test files (*.test.*, *.spec.*, *_test.go, test_*.py) are not scanned.
| OpenGrep severity | OpenVScan severity |
|---|---|
ERROR with HIGH impact and HIGH likelihood | critical |
ERROR | high |
WARNING | medium |
INFO | low |
Several rules often fire on the same line, for example a taint rule and a pattern rule for the same SQL injection. OpenVScan groups results by file, line and vulnerability class (SQL injection, XSS, command injection, code injection, SSRF, path traversal, or otherwise the CWE or rule id), keeps the most severe and lists the other rule ids with it. Rule ids have the form <pack>.<path>.<rule>, without the language directory.
OpenGrep spends at most 30 seconds running a rule on a single file, and skips files larger than 1,000,000 bytes.
OSV-Scanner reads lockfiles and checks every package version against OSV.dev.
osv-scanner scan source --recursive --no-resolve --no-call-analysis=all \
--allow-no-lockfiles --no-ignore --config /opt/openvscan/osv-scanner.toml \
--format json --output-file /workspace/out/osv.json /workspace/repoIt supports package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lock, deno.lock, pinned requirements.txt, poetry.lock, Pipfile.lock, pdm.lock, uv.lock, go.mod, Cargo.lock, Gemfile.lock, composer.lock, pom.xml, gradle.lockfile, NuGet's packages.lock.json, mix.lock, pubspec.lock, renv.lock, Package.resolved and conan.lock. --no-resolve keeps it to the versions written in those files, so it doesn't call deps.dev to resolve manifests. --no-ignore scans lockfiles even when the pull request lists them in .gitignore.
OSV groups the ids of one issue (a GitHub advisory, its CVE and the ecosystem's own id), and OpenVScan reports one finding per group, against the lockfile. The rule id is the GHSA- id when there is one. The title has the form package@version: summary, and the remediation names the lowest fixed version above the installed one, for example "Upgrade lodash to 4.17.21 or later." Severity comes from the highest CVSS score in the group: 9.0 and up is critical, 7.0 high, 4.0 medium, anything lower low.
A package version in the OpenSSF malicious packages dataset (ids starting MAL-) is reported as Malicious package: name@version, at critical severity, with instructions to remove it and treat machines that installed it as compromised. The AI can't dismiss it, the same as a secret: see How the gate works.
C and C++ projects often copy a library's source into the repository (third_party/zlib). OSV-Scanner hashes those files and asks OSV.dev which upstream commit they match, then reports that version's vulnerabilities. The finding is on the library's directory, its title uses the matched commit (zlib@cacf7f1d4e3d: ...), and it is in the diff when the pull request changed a file in that directory.
Gitleaks finds hard-coded secrets such as API keys, tokens and private keys. On a pull request it runs twice:
gitleaks git), so a key added in one commit and deleted in the next is still caught. Deleting it doesn't help: it stays in the branch's history on GitHub, and anyone who can read the repository can fetch it;gitleaks dir), which also reports secrets that predate the pull request.gitleaks git /workspace/repo --log-opts="<head> --not <base commits>" ...
gitleaks dir /workspace/repo --config /opt/gitleaks.toml \
--gitleaks-ignore-path /opt/openvscan --ignore-gitleaks-allow \
--report-format json --redact --no-banner --exit-code 0 --log-level warnTo get that history, checkout fetches the pull request's commits, stopping at the base branch, instead of only the head commit. If that fails, for example because the base branch was deleted, it falls back to the head commit and Gitleaks scans the files only. Branch reviews and Daytona checkouts (a tarball, with no git history) scan the files only.
A secret still in the head commit is reported on its file and line, and is in the diff when that line is. A secret a later commit removed is reported on its file with no line, notes the commit that added it, and always counts as part of the change. Only the commit id is kept; Gitleaks' author name, email and commit message are dropped.
Both runs use the default rules of the pinned release. A .gitleaks.toml, .gitleaksignore or gitleaks:allow comment in the pull request has no effect. --redact keeps the secret value out of Gitleaks' output, so OpenVScan never sees or stores it. Every leak is reported as high severity with CWE-798, and the remediation tells you to revoke and rotate the credential, remove it from the code, and load it from a secret manager or environment variable. The AI can't dismiss a secret Gitleaks matched by its format. It can dismiss a generic-api-key match, which Gitleaks guesses from keywords and randomness, after reading the code; the check is then neutral rather than passing, the match is listed in the summary and gets no inline comment.
Trivy checks infrastructure-as-code: Dockerfiles, Kubernetes manifests, Helm charts, Terraform, CloudFormation and Azure ARM templates.
trivy fs --scanners misconfig --format json --output /workspace/out/trivy.json \
--skip-check-update --config "" --ignorefile "" \
--no-progress --quiet --exit-code 0 /workspace/repoIt uses the checks bundled in the pinned binary, needs no database and no network, and reports only failed checks, with the line range Trivy points to. Trivy's own severity is used as is.
zizmor audits GitHub Actions workflows and composite actions, offline, with its regular persona (the one tuned for few false positives).
zizmor --offline --no-config --no-ignores --collect=all --persona regular \
--format json-v1 --no-exit-codes .It finds template injection (${{ github.event.pull_request.title }} in a run: script), dangerous triggers such as pull_request_target with a checkout of the pull request, credentials persisted by actions/checkout, excessive GITHUB_TOKEN permissions, actions not pinned to a commit, and more. zizmor's severity is used as is, except that a low-confidence finding is capped at low. --collect=all audits workflows even when .gitignore lists them.
poutine, from BoostSecurity, checks build pipelines: GitLab CI, Azure Pipelines, Tekton and GitHub Actions. It runs offline, from outside the checkout, with an empty config:
poutine analyze_local /workspace/repo --format json --quiet \
--config /opt/openvscan/poutine.ymlIt finds expressions an outside contributor controls (a merge request title, a branch name) injected into a script, jobs that check out and run a fork's code with the pipeline's secrets, and scripts piped from curl into a shell. Its error level maps to high, warning to medium and note to low.
On GitHub workflows, zizmor already covers injection, permissions and pinning, so poutine reports only the checks zizmor has no equivalent for: auto-merge confused deputies, self-hosted runners on pull requests, conditions that are always true, and untrusted checkouts followed by a build. Its list of every third-party action used is dropped as inventory, not a vulnerability.
Spectral, from Stoplight, lints OpenAPI 2 and 3 specs with the OWASP API Security Top 10 (2023) ruleset. The scan finds files with an openapi: or swagger: key (at most 200) and lints those:
spectral lint <specs> --ruleset /opt/spectral/ruleset.mjs \
--ignore-unknown-format --format json --output /workspace/out/spectral.json --quietThe ruleset is loaded from the image, so nothing is fetched at run time, and external $refs don't resolve. Many of its rules are API design advice (rate-limit headers, string lengths, error schemas), so only the security ones are kept, with OpenVScan's own severity:
| Rule | Severity |
|---|---|
| Credentials in the URL (API2) | high |
| Unauthenticated write operation, HTTP Basic, API key in the URL, insecure auth scheme (API2) | medium |
| Admin endpoint with the same security scheme as others (API5) | medium |
Plain http scheme (API8) | medium |
| Unauthenticated read operation, JWT and OAuth token guidance (API2) | low |
Numeric ids (API1), additional properties allowed (API3), URL parameters that may cause SSRF (API7), http:// server URLs (API8) | low |
A finding's fingerprint uses its JSON path in the spec (paths./users/{id}.get), so it survives edits elsewhere in the file.
Each scanner's JSON output is parsed into the same shape:
| Field | Meaning |
|---|---|
| Source | opengrep, osv, gitleaks, trivy, zizmor, poutine, spectral, or ai for findings from the AI review |
| Rule id | The scanner's rule or advisory id, such as GHSA-35jh-r3h4-6jhm |
| Title and description | What was found |
| Severity | critical, high, medium, low or info |
| File and lines | Path relative to the repository root, with start and end lines when known |
| CWE | Normalized to the form CWE-79 when the scanner provides one |
| Remediation | How to fix it, when known |
The raw JSON from each scanner is kept as an artifact of the review.
Each finding also gets a fingerprint built from the scanner, the rule or CWE, and the file path, without line numbers. The fingerprint stays the same when code moves, so a later review of the same pull request can tell which findings it has already commented on.
Each scanner can record at most 500 findings per review. If a scanner reports more, OpenVScan keeps the 500 most severe.
For pull request reviews, each finding is marked as in the diff or not. This decides whether it can fail the check and whether it gets an inline comment.
Findings outside the diff are still reported in the summary comment as pre-existing, but they never fail the check.
Branch reviews have no diff. Every finding counts toward the conclusion.
Each scanner is one file in engine/src/scanners/ with its command line, the exit codes that mean success, whether it needs network, and a parser for its JSON. To add one, also add its id to SCANNERS and its description and triggers to SCANNER_INFO in packages/core/src/enums.ts, install it in engine/container/Dockerfile with a checksum, and, if it needs the network, add a narrow rule to scanAllowed in engine/src/egress-rules.ts.