forge.yaml with a reason and an expiry date, and the gate fails again on that date.
reliant forge ci vuln-scan runs govulncheck over every Go module in the project and npm audit in every frontend, then makes the pass or fail decision itself, so it can honor reviewed exemptions that neither scanner supports on its own.
Before you begin
- A Forge project, such as the one from Add a database table with a CRUD API and pages. The gate it runs in is set up in Gate pull requests on lint, tests and generated-code drift.
- Forge v1.6.1 or later (
reliant forge --versioninside the project). - Network access: both scanners download advisory data on every run.
1
Run the scan the way CI does
The gate runs the scan as two rows, These rows are never served from the gate’s verdict cache, because advisories change daily. To run the command on its own, put govulncheck on your
vuln-go and vuln-npm, and builds govulncheck at forge’s pinned version on first use:terminal
PATH first. Without it the command refuses rather than report a pass it did not check:terminal
reliant forge tools pins prints the govulncheck version the gate uses.2
Fix a Go finding
govulncheck fails only on advisories your code calls, not on every vulnerable module in Upgrade the module and scan again:Every Go module is scanned, including nested ones such as
go.sum. A package that parses YAML with an old gopkg.in/yaml.v2:terminal
gen/. --root-module limits it to the root.3
Read an npm finding
npm audit fails on high and critical advisories and prints lower ones without failing. The scaffolded frontend of a forge v1.6.1 project reports a real one:overrides entry when only a transitive dependency has the fix. Here the fix is zod 4, a new major that changes the generated forms. Frontends scaffolded by forge v1.8.0 or later already use zod 4, and its upgrade notes cover porting existing forms.4
Accept one advisory with an expiry date
Until you can upgrade, accept the advisory by its ID. Each entry needs a reason and an Use the ID the scanner printed:
expires date:forge.yaml
GO-YYYY-NNNN for govulncheck, GHSA-… for npm audit. One list serves both scanners. An entry accepts that one advisory only, so a new advisory in the same package still fails.5
Verify the exemption and its expiry
terminal
expires date. The day after, the same run fails:expires, or an ID neither scanner uses, is not honored either and fails the gate.6
Scan the container image
Image scanning is not part of No findings, but note the warning: the scaffolded Dockerfile’s runtime stage is
reliant forge ci vuln-scan. The generated workflows run Trivy: ci.yml’s docker-build job scans the images it builds on a pull request, and build-images.yml scans the pushed image on main, both failing on HIGH,CRITICAL. To run the same scan locally:terminal
alpine:3.21, which no longer gets security data. The Dockerfile is yours, so move its FROM alpine:3.21 lines to a supported release.Choose the scanners
ci.vuln_scan in forge.yaml takes go, npm and docker (Trivy). Leave all three unset to run every scanner that applies. Setting one to true selects only the ones you set. Listing exemptions never turns a scanner off. The workflows are written once, so docker changes the Trivy steps only when a workflow is scaffolded; edit the workflow directly afterwards.
What this does not do
- Exemptions cover govulncheck and npm audit only. Trivy findings in the workflows are not read from
forge.yaml. Trivy’s own ignore file is the place for those. - npm advisories below high do not fail the scan. They are printed.
- No scanning of your own code. These scanners check dependencies against advisory databases. Secret scanning is the gitleaks pre-commit hook described in the security model.
- No automatic fixes. Dependabot’s weekly grouped bumps, configured in
.github/dependabot.yml, open pull requests; the scan does not change files. - The image scan needs a build. It runs in GitHub Actions or wherever you run Docker, not in
task ci.
Next steps
Gate pull requests
Run the whole gate, lint and tests included, locally and on every pull request.
Security model
Image signing, SBOMs, fail-closed auth and secret handling.
vuln-scan reference
Every flag of
reliant forge ci vuln-scan.What forge lint checks
The other half of the gate’s static checks.