Library Usage
The CLI is a thin wrapper around github.com/gatecheckdev/gatecheck/pkg/gatecheck.
import "github.com/gatecheckdev/gatecheck/pkg/gatecheck"
NewDefaultConfigreturns the same defaults asgatecheck config init: rules disabled, coverage thresholds0.NewConfigDecoderreads.yaml,.yml,.json, or.toml. The extension selects the format.NewConfigEncoderwrites a config. Pass.yaml,.yml,.json, or.toml, including the dot.Validatetakes the config, a reader, and the filename. The bytes select the report type. The filename is the fallback, with the same words as the CLI.Listwrites a table. A Grype, CycloneDX, SARIF, Semgrep, Gitleaks, Trivy, or osv-scanner report with no findings writes one sentence instead, such asNo gitleaks findings,No trivy vulnerabilities, orNo osv-scanner vulnerabilities.WithDisplayFormat("markdown")matches--markdownand writes that same sentence when the report is empty.WithEPSSmatches--epssand takes an open CSV file or a URL.CreateBundle,AppendToBundle, andRemoveFromBundlearebundle create,bundle add, andbundle remove.DownloadEPSSandDownloadKEVwrite the API payloads.WithEPSSURL,WithKEVURL,WithEPSSFile, andWithKEVFileoverride the defaults.
Report types are described in Supported Reports. Config fields are described in Configuration.