Skip to content

ci(security): add govulncheck supply-chain scanning to validate-go-project#266

Merged
botantler[bot] merged 3 commits into
mainfrom
claude/ci-govulncheck
Jun 1, 2026
Merged

ci(security): add govulncheck supply-chain scanning to validate-go-project#266
botantler[bot] merged 3 commits into
mainfrom
claude/ci-govulncheck

Conversation

@devantler
Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Assistant

Fixes #265.

What

Adds a govulncheck job to the shared validate-go-project.yaml reusable workflow, so every devantler-tech Go consumer (go-template, ksail, …) inherits supply-chain / known-vulnerability scanning on each PR. Until now the workflow ran lint, dead-code, build, test, and coverage — but nothing checked dependencies against vuln.go.dev.

This closes the last gap flagged in the go-template roadmap #75, which concluded govulncheck "belongs on reusable-workflows … so every Go consumer inherits it."

How

  • New govulncheck job mirrors the existing read-only deadcode job: changes-gated, pull_request-only, permissions: { contents: read }, sets up Go from go.mod.
  • Installs golang.org/x/vuln/cmd/govulncheck@v1.3.0 (pinned by version, same convention as deadcode@v0.43.0) and runs govulncheck ./....
  • README Features list + AGENTS.md inventory updated to name the step (docs in sync).

Why it's safe to roll out

govulncheck uses call-graph reachability — it fails (exit 3) only on vulnerabilities the code actually calls; imported-but-unreachable advisories return exit 0 and don't block. Near-zero false positives.

Validated locally (govulncheck v1.3.0 / Go 1.26.3):

Scenario Result
Clean module No vulnerabilities found.exit 0 (pass)
Reachable vuln (jwt-go MapClaims.VerifyAudience, GO-2020-0017) Your code is affected by 1 vulnerabilityexit 3 (block)
Imported-but-unreachable vuln your code doesn't appear to call theseexit 0 (no false-block)

actionlint + yamllint clean on the changed workflow (the only actionlint finding is the pre-existing code-quality-scope false positive on the unrelated coverage job, already ignored via mega-linter's -ignore code-quality). The workflow is unchanged on the reusable-workflows repo itself (all jobs skip here via the existing repo guard; the [Test] Validate Go Project job confirms it stays callable).

Blast radius — flagged for the promotion decision

Additive but impactful: this is a new required check on every Go consumer's PRs. A consumer whose code reaches a known vulnerability will see this job fail until the affected module is bumped (or the call removed) — the intended supply-chain-security behavior. No consumer-side wiring change is needed (the called workflow fails as a unit). Shipping as a draft; promoting it is the deliberate decision to enable the gate across all Go repos.

…oject

Add a govulncheck job to the shared validate-go-project reusable workflow so
every Go consumer (go-template, ksail, ...) inherits known-vulnerability
scanning on each PR. Mirrors the read-only deadcode job (changes-gated,
pull_request-only, contents: read; tool pinned by version).

govulncheck uses call-graph reachability — it blocks (exit 3) only on
vulnerabilities the code actually calls, so imported-but-unreachable advisories
don't fail the gate, keeping false positives near zero.

README + AGENTS.md updated to list the step.

Fixes #265

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds supply-chain vulnerability scanning to the shared Go validation reusable workflow so Go consumer repositories inherit govulncheck on PRs, and updates docs to reflect the new capability.

Changes:

  • Added a govulncheck job to .github/workflows/validate-go-project.yaml (changes-gated, PR-only, read-only permissions).
  • Updated README feature list to include supply-chain scanning via govulncheck.
  • Updated AGENTS.md workflow inventory description to mention vuln scanning.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
README.md Documents govulncheck as a Validate Go Project feature.
AGENTS.md Updates workflow inventory description to include vuln scanning.
.github/workflows/validate-go-project.yaml Introduces the govulncheck job to scan ./... for reachable known vulnerabilities.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/validate-go-project.yaml
Per AGENTS.md every reusable-workflow job leads with step-security/harden-runner
(egress-policy: audit). Aligns the new job with the documented convention.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@devantler devantler marked this pull request as ready for review June 1, 2026 06:22
Copilot AI review requested due to automatic review settings June 1, 2026 06:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread AGENTS.md Outdated
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@botantler botantler Bot enabled auto-merge (squash) June 1, 2026 07:12
@botantler botantler Bot merged commit aead873 into main Jun 1, 2026
40 checks passed
@botantler botantler Bot deleted the claude/ci-govulncheck branch June 1, 2026 07:16
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Jun 1, 2026
@botantler
Copy link
Copy Markdown
Contributor

botantler Bot commented Jun 1, 2026

🎉 This PR is included in version 5.3.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released an issue that has been solved in a release

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

ci(security): add govulncheck supply-chain scanning to validate-go-project

2 participants