Supported Reports
list and validate pick a report type from the file contents. The filename is used only when the contents do not identify a type.
Content rules, in this order:
- A gzipped tar that contains
gatecheck-manifest.jsonis a Gatecheck bundle. bomFormatofCycloneDXis CycloneDX JSON. This wins when the name containsgrype,syft,trivy, orosv, and it wins when the tool that wrote the BOM was Grype, Syft, Trivy, or another tool.- SARIF 2.1.0. The top-level
versionis the string2.1.0andrunsis an array. A$schemathat mentions SARIF is enough whenrunsis missing or null. - Grype JSON.
descriptor.nameisgrype, ormatchesis a non-empty array of objects withvulnerabilityandartifact. - Syft JSON.
descriptor.nameissyft, orschema.urlpoints at the Syft schema.listandvalidatethen return an error. Syft JSON is not implemented. A Syft CycloneDX BOM is CycloneDX, not Syft. - Semgrep JSON.
resultsis an array of objects withcheck_id, orresultsanderrorsare both arrays. Semgrep’s SARIF output is SARIF, not this type. - Gitleaks JSON. A non-empty array of objects with
RuleIDand one ofFile,Commit, orFingerprint. - Trivy JSON (
--format json).SchemaVersionis a number, andArtifactTypeis set orResultsis an array. Vulnerability entries are listed and validated. Misconfigurations, secrets, and licenses in the same file are ignored. - osv-scanner JSON (
osv-scanner scan source --format json).resultsis a non-empty array of objects with apackagesarray. One finding per vulnerability group. Aliases of that group are not counted again. License-only packages are skipped. Semgrep is checked first, so acheck_idstays Semgrep. - LCOV text. A line starts with
SF:and the file also hasDA:,LF:, orend_of_record. - Clover XML. An XML document with
clover=or a<cloverelement. - Cobertura XML. An XML document with
line-rate=.
CycloneDX XML is not read. The CycloneDX support is JSON.
When none of those match, the filename is checked. The match is a lowercase substring, and the first match wins:
grypecyclonedx. This is beforetrivy, so an ambiguous file namedcyclonedx-trivy-sbom.jsonis CycloneDX.semgrepgitleakstrivyosv.osv-scanner-report.jsonmatches.OSV-scanner.jsondoes not.syftsarifbundle.listalso accepts a name containinggatecheck.validaterequires the wordbundlefor this fallback. A real bundle is still detected from its contents when the name isproject.gcb.- Coverage, when the name contains
lcov,clover,cobertura, orcoverage, or when it ends in.info.
The filename match is case sensitive. Grype-report.json and OSV-scanner.json are not filename matches. A Grype report is still recognized from its contents when descriptor.name is grype. A Trivy or osv-scanner report is still recognized from the rules above.
An empty Grype document such as {"matches":[]} does not identify itself. The filename is what selects it. The same is true of {"results":[]} and [].
Coverage format when the name is the only signal, checked in this order:
- The name contains
lcov, or ends in.info: LCOV. - The name contains
clover: Clover XML. - The name ends in
.xml: Cobertura XML.
A name that only contains coverage, such as coverage.json, is selected as coverage and then fails, because the format is not one of those three and the contents did not identify one.
From standard input, list still requires --input-type, so the command does not wait on a terminal. The value is matched as if it were a filename called stdin:<value>, and only when the contents are ambiguous. Clear contents win over --input-type.
grype bkimminich/juice-shop:latest -o json | gatecheck list --input-type grype
list-all lists a file when the contents or the name identify Grype, Semgrep, Gitleaks, Syft, CycloneDX, SARIF, Trivy, osv-scanner, or a bundle. Coverage files are skipped with a warning. There is no --input-type flag on list-all.
Inside a bundle, validate uses the same content rules on each stored file, and falls back to the label. The label is the base name of the file you added. Labels that still do not match are skipped. Syft JSON inside a bundle is skipped.
What each command can do:
| Report | list | validate | bundle |
|---|---|---|---|
| Grype | yes | yes | yes |
| CycloneDX JSON | yes | yes | yes |
| SARIF 2.1.0 | yes | yes | yes |
| Semgrep JSON | yes | yes | yes |
| Gitleaks | yes | yes | yes |
| Trivy | yes | yes | yes |
| osv-scanner | yes | yes | yes |
| LCOV, Clover, Cobertura | yes | yes | yes |
| Syft JSON | error | error | the file is stored, and validation skips that label |
| Bundle | when the contents are a bundle, or the name contains bundle or gatecheck | when the contents are a bundle, or the name contains bundle | yes, as an ordinary file |