Visitar URL original
ci: add govulncheck workflow, SHA-pin GitHub Actions, and configure Renovate cooldown by alicul · Pull Request #9789 · concourse/concourse · GitHub
Skip to content

ci: add govulncheck workflow, SHA-pin GitHub Actions, and configure Renovate cooldown - #9789

Open
alicul wants to merge 4 commits into
concourse:masterfrom
alicul:ci-govulncheck
Open

alicul wants to merge 4 commits into
concourse:masterfrom
alicul:ci-govulncheck

Conversation

@alicul

@alicul alicul commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Changes proposed by this PR

Note

In an ideal world where GitHub supported stacked PRs from forks cleanly, this PR would be split into at least 3 separate PRs, each introducing one security measure:

  • Dependency cooldown
  • GitHub Action hash pinning
  • govulncheck reachability analysis

Instead, each concept is kept in its own atomic commit within this PR.

This PR is heavily inspired by the workflows put in place by @marco-m-pix4d in Pix4D workflows (e.g. Pix4D/cogito .github/workflows/govulcheck.yml).

Note also: the PR #9788 shows the real value of running govulncheck reachability analysis regularly.

1. Dependency cooldown (.github/renovate.json)

2. GitHub Action hash pinning (.github/renovate.json, .github/workflows/codeql-analysis.yml)

  • Enabled "helpers:pinGitHubActionDigests" and added a weekly github-actions package rule in .github/renovate.json so Renovate pins GitHub Actions to full commit SHAs and keeps them updated cleanly.
  • Pinned all uses: references in .github/workflows/codeql-analysis.yml (actions/checkout v7.0.1, actions/setup-go v7.0.0, and github/codeql-action/{init,autobuild,analyze} v4.39.3) to full commit SHAs with version comments for Renovate, mitigating mutable tag hijacking such as the trivy-action compromise.

3. govulncheck reachability analysis (.github/workflows/govulncheck.yml)

  • Added .github/workflows/govulncheck.yml, running on every push and pull_request targeting master and release/*, as well as on a daily schedule (22 07 * * *).
  • govulncheck is Go’s official static analysis tool for vulnerability detection. Unlike traditional scanners that just read your dependency list, govulncheck performs symbol-level reachability analysis to determine if your code actually executes vulnerable functions.
  • Proof of value: Running govulncheck against Concourse directly motivated [security] fix(deps): address reachable govulncheck vulnerabilities and bump Go to 1.27.4 #9788, catching reachable Go standard library vulnerabilities (GO-2026-6865, GO-2026-6597, GO-2026-6859), including platform-specific paths such as worker/baggageclaim/volume/stream_in_out_nonlinux.go.
  • (shift to the left philosophy) Why a GitHub Action instead of the concourse/ci Trivy scan job in concourse/ci? The Trivy scan-rc-image job only runs on release/* branches (pipelines/release.yml) after building the Linux release-candidate image, is not wired as a blocking passed: gate on create-draft-release / shipit, and only inspects the Linux container image (missing windows and darwin targets). Running govulncheck as a GitHub Action alongside codeql-analysis.yml shifts vulnerability detection left so issues are caught on every PR (including Renovate PRs), on master / release/* pushes, and via daily checks before vulnerable dependencies or Go versions reach release candidates.
  • Exact Go version pinning & impact: The workflow pins Go via go-version-file: go.mod with check-latest: false and GOTOOLCHAIN: local. Evaluating with a newer Go toolchain hides standard library CVEs that affect the version declared in go.mod. Impact: when a Go stdlib vulnerability is reported in reachable code, resolve it by bumping the Go patch version in go.mod.
  • OS coverage: Runs GOOS=linux govulncheck ./... plus GOOS=windows and GOOS=darwin across ./cmd/concourse, ./fly/..., ./worker/baggageclaim/..., and ./go-archive/... (the cross-platform packages built and tested in Concourse CI, avoiding Linux-only packages such as atc/postgresrunner and worker/runtime that fail to load for non-Linux GOOS).

Notes to reviewer

Configure minimumReleaseAge to 14 days so Renovate waits 14 days after a release is published before proposing normal updates (while security advisory fixes via vulnerabilityAlerts remain immediate by default). Most supply-chain compromises are detected and yanked within hours or days of publication, so a cooldown window prevents automated updates from immediately pulling a newly compromised release.

References:
- From scanner to stealer: inside the Trivy Action supply chain compromise (CrowdStrike)
  https://www.crowdstrike.com/en-us/blog/from-scanner-to-stealer-inside-the-trivy-action-supply-chain-compromise
- We should all be using dependency cooldowns (William Woodruff, 21 Nov 2025)
  https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
- Dependency cooldowns, redux (William Woodruff, 13 Dec 2025)
  https://blog.yossarian.net/2025/12/13/cooldowns-redux
- Package managers need to cool down (Andrew Nesbitt, 4 Mar 2026)
  https://nesbitt.io/2026/03/04/package-managers-need-to-cool-down.html

Signed-off-by: Aleksandar Licul <licul.aleksandar@gmail.com>
Enable helpers:pinGitHubActionDigests and group github-actions updates into a dedicated weekly rule so GitHub Actions are pinned to full commit SHAs (mitigating mutable tag hijacking such as the trivy-action compromise).

Reference:
- From scanner to stealer: inside the Trivy Action supply chain compromise (CrowdStrike)
  https://www.crowdstrike.com/en-us/blog/from-scanner-to-stealer-inside-the-trivy-action-supply-chain-compromise

Signed-off-by: Aleksandar Licul <licul.aleksandar@gmail.com>
Pin actions/checkout, actions/setup-go, and github/codeql-action steps to full commit digests with semver comments for Renovate (mitigating mutable tag hijacking such as the trivy-action compromise).

Reference:
- From scanner to stealer: inside the Trivy Action supply chain compromise (CrowdStrike)
  https://www.crowdstrike.com/en-us/blog/from-scanner-to-stealer-inside-the-trivy-action-supply-chain-compromise

Signed-off-by: Aleksandar Licul <licul.aleksandar@gmail.com>
Run govulncheck on push, pull_request, and daily schedule using the exact Go version from go.mod across linux, windows, and darwin targets.

Signed-off-by: Aleksandar Licul <licul.aleksandar@gmail.com>
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

@alicul alicul Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just a clarification if unclear: Renoate will ensure that both hash and version in the comment are up-to-date...

@alicul alicul Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If I am not mistaken, if this workflow fails, the notification is sent to the person who last commited (on master/release branch).

@marco-m-pix4d can you please remind me if that is correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note to myself to investigate:

  • check if we can benefit of govulncheck SARIF reporting format and then upload the reportt into GitHub to surface as a Code Scanning alert

Refrence: Jamie Tanna (Renovate Project Lead Blog)
https://www.jvt.me/posts/2025/09/11/govulncheck-github-actions/

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

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant