feat(ci): add govulncheck workflow - #2643
Merged
Merged
Conversation
Quang Nguyen (nddq)
requested review from
Beegii Khurelsukh (BeegiiK) and
carlotaarvela
August 12, 2026 21:54
Quang Nguyen (nddq)
force-pushed
the
nddq/govulncheck
branch
2 times, most recently
from
August 12, 2026 22:05
f0d8a8c to
7f3fafe
Compare
Retina Code Coverage ReportTotal coverage no changeIncreased diff
|
Quang Nguyen (nddq)
force-pushed
the
nddq/govulncheck
branch
from
August 12, 2026 22:46
7f3fafe to
a182435
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds reachability-aware Go vulnerability scanning to complement Trivy and Dependabot.
Changes:
- Scans Linux and Windows builds with
govulncheck. - Publishes summaries and main-branch SARIF results.
- Creates deduplicated dependency issues on failures.
Suppressed comments (2)
.github/workflows/govulncheck.yaml:74
steps.scan.outcomeisfailurefor both vulnerability findings and operational failures (for example, package-loading or network errors), so this annotation can falsely claim that vulnerabilities were found. Either capture and distinguish govulncheck's finding exit status from other failures, or use a neutral failure message.
echo "::error::govulncheck found reachable vulnerabilities (GOOS=${GOOS}); see the job summary"
.github/workflows/govulncheck.yaml:92
- This files a reachable-vulnerability issue for any failure in either matrix leg, including checkout/setup/install errors, package-load failures, timeouts, SARIF generation errors, or upload outages. That creates a false dependency alert when the scan did not actually report a vulnerability. Propagate a dedicated “vulnerabilities found” signal from the text scan (the current tool uses exit status 3) through a matrix-safe aggregate, and gate this job on that signal while leaving operational failures as ordinary job failures.
if: failure() && github.ref == 'refs/heads/main'
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Quang Nguyen (nddq)
requested review from
Evan Baker (rbtr)
and removed request for
Beegii Khurelsukh (BeegiiK) and
carlotaarvela
August 12, 2026 23:31
Quang Nguyen (nddq)
force-pushed
the
nddq/govulncheck
branch
2 times, most recently
from
August 12, 2026 23:51
a182435 to
6245046
Compare
Quang Nguyen (nddq)
force-pushed
the
nddq/govulncheck
branch
2 times, most recently
from
August 13, 2026 14:47
6245046 to
a43a277
Compare
Evan Baker (rbtr)
previously approved these changes
Aug 13, 2026
Quang Nguyen (nddq)
force-pushed
the
nddq/govulncheck
branch
from
August 13, 2026 14:50
b69c7f4 to
a43a277
Compare
Trivy and Dependabot match Go module versions against advisory ranges with no reachability analysis. govulncheck resolves findings at symbol level through call-graph analysis, so a finding means a vulnerable function is reachable from retina code. The scanner is pinned through the go.mod tool block and built from the module graph, so go.sum verifies it and dependabot bumps it. The vulnerability database is fetched from vuln.go.dev at run time; a pinned scanner still sees new advisories immediately. The scan toolchain is parsed from the golang builder tag in controller/Dockerfile rather than the go.mod directive, so stdlib findings reflect the toolchain the shipped images build with and follow dependabot's golang-base bumps automatically. The go.mod directive stays the build minimum. The goos matrix scans linux and windows because reachability differs per OS: GO-2026-4970 is reachable on linux only. GOARCH stays at the runner default; arm64 analysis produced no additional findings. GOOS is set on the analysis step only, because the tool build must target the host platform. The scan step separates findings (govulncheck exit status 3) from operational failures, and the annotations report each case honestly. Every leg writes its output to the job summary. Runs on main also upload SARIF under a per-goos category, so findings surface as code-scanning alerts next to trivy's and close when they clear. PR and merge-queue runs skip the upload; the red job is their signal, and fork PR tokens lack security-events write. Signed-off-by: Quang Nguyen <28567936+nddq@users.noreply.github.com>
Quang Nguyen (nddq)
force-pushed
the
nddq/govulncheck
branch
from
August 13, 2026 16:03
a43a277 to
caa1578
Compare
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Quang Nguyen (nddq)
force-pushed
the
nddq/govulncheck
branch
from
August 13, 2026 16:07
691476a to
caa1578
Compare
Quang Nguyen (nddq)
enabled auto-merge
August 13, 2026 16:25
Evan Baker (rbtr)
approved these changes
Aug 13, 2026
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Trivy and Dependabot match Go module versions against advisory ranges; neither can tell whether the vulnerable code is reachable. This PR adds a
govulncheckworkflow: it builds the call graph and reports a vulnerability only when an affected function is reachable from retina code.How it runs:
linuxandwindowson PRs, merge groups, pushes tomain, and a daily cron. Not a required check.go.modtoolblock and built from the module graph, sogo.sumverifies it and dependabot bumps it. The vulnerability database is fetched fromvuln.go.devat run time, so a pinned scanner still sees new advisories immediately.controller/Dockerfile, so findings track the toolchain the shipped images build with and follow dependabot'sgolang-basebumps automatically.3) from operational failures; the job summary carries the full output and the error annotation states which case occurred.mainalso upload SARIF to code scanning under per-gooscategories (govulncheck-linux/govulncheck-windows), so findings surface as code-scanning alerts next to trivy's and close automatically when they clear. PR and merge-queue runs skip the upload — alerts trackmain, and fork PR tokens lacksecurity-events: write.The first runs are red with 5 findings per leg:
go-chi/chiv4:pkg/serverstill imports the v4middlewarepackage; migrating it tochi/v5(already ingo.mod) clears this. Follow-up PR.x/crypto/openpgp: unmaintained, no fix will exist; pulled in byhelm.sh/helm/v3provenance code.containerd/v2, which helm v3 does not use.Related Issue
N/A.
Checklist
git commit -S -s ...). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Both legs validated locally at
go1.26.5: 5 findings each, matching CI. arm64 matched amd64 finding-for-finding, so the matrix coversgoosonly.The SARIF path was validated end to end from a dispatch run with a temporarily widened gate (run 31718757480): both legs generated and uploaded SARIF, and the code-scanning API records both analyses (
govulncheck-linux/govulncheck-windows, toolgovulncheck, 5 results and 5 rules each). Locally, the SARIF output contains onlyerror-level results for reachable findings, so the upload needs no filtering.actionlintpasses on the workflow file.Additional Notes
Complements trivy rather than replacing it: image and compliance scanning stay with trivy; govulncheck adds the reachability signal for Go code.