Skip to content

ci(go): add a govulncheck vulnerability check job - #30

Merged
ngoyal16 merged 1 commit into
mainfrom
ci/govulncheck
Nov 30, 2026
Merged

ngoyal16 merged 1 commit into
mainfrom
ci/govulncheck

Conversation

@ngoyal16

Copy link
Copy Markdown
Contributor

Closes #29.

What

go-ci.yml gains a Vulnerability check job that runs govulncheck on the caller's module. govulncheck reports only vulnerabilities in code the program actually calls, in its modules or the Go standard library.

  • New input govulncheck:
    • fail (default): a finding fails the job.
    • warn: a finding gives a warning plus the full report in the job summary, and the job passes. For use while a fix is on its way.
    • off: the job is skipped.
    • Any other value fails with a clear error.
  • New input govulncheck-version: pinned at v1.10.0, with a # renovate: comment and a matching renovate.json rule, so it's bumped by Renovate PRs like golangci-lint-version.
  • Same build as the tests: the caller's go-version, node-version and pre-build-command.
  • Built with the job's Go (go run …@version), because govulncheck can't read a newer standard library than the Go it was built with.
  • Exit codes: exit 3 is a finding; any other failure (the code didn't load) fails the job in both modes, so a broken check never passes silently.
  • Docs: AGENTS.md documents the job, its inputs, how Go version affects standard-library findings, and how to fix a finding.

Tested

  • actionlint passes.

  • The run step was simulated for every mode and exit code:

    Mode govulncheck exit Step Summary
    fail 0 passes —
    fail 3 fails with ::error:: report
    warn 3 passes with ::warning:: report
    fail / warn 1 fails —
  • Real CI: a throwaway draft PR on code-review-bot (test: govulncheck job from divmora/.github (do not merge) code-review-bot#58, now closed and its branch deleted) called go-ci.yml@ci/govulncheck. Both jobs passed, and the log shows govulncheck v1.10.0 built with Go 1.27 reporting "No vulnerabilities found."

Rollout

The job is on by default for every repository that calls go-ci.yml. A trial run found a few repositories that will fail on day one. They need dependency bumps (handled separately), or govulncheck: warn until those land.

🤖 Generated with Claude Code

go-ci.yml gains a "Vulnerability check" job that runs govulncheck with
the caller's Go version, Node and pre-build command. Input govulncheck:
fail (default), warn or off; govulncheck-version is pinned and bumped
by Renovate like golangci-lint.

Closes #29

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ngoyal16
ngoyal16 merged commit e1018d2 into main Nov 30, 2026
2 checks passed
@ngoyal16
ngoyal16 deleted the ci/govulncheck branch November 30, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

go-ci: add a govulncheck job

1 participant