Add vulnerability-check reusable workflow - #220
Closed
QuentinBisson wants to merge 2 commits into
Closed
Conversation
Runs nancy sleuth against the Go module graph so the scan can gate the merge queue (on: pull_request + merge_group) instead of every CircleCI build. Authenticates via NANCY_USER/NANCY_TOKEN with an optional OSSI_OSSINDEXURL, and exits 0 on scanner outage.
The scan must hit the same OSS Index/Sonatype endpoint as the CircleCI scan, so make the URL a required secret rather than defaulting to the public OSS Index.
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.
What
Adds a
vulnerability-check.yamlreusable workflow that runsnancy sleuthagainst the Go module graph (go list -json -m all), honouring.nancy-ignoreand.nancy-ignore.generated.Why
Nancy currently runs in CircleCI (architect-orb
go-test) on every build (push, rebase, draft, Renovate bump). Because the scan is authenticated against OSS Index, that volume drove the Sonatype credit overrun that broke CI onmain. Calling this workflow onpull_request+merge_grouplets the blocking scan run once per merge via the merge queue, scanning the exact commit that lands while cutting the redundant per-build scans.This is the first, additive piece (no caller yet, so no behaviour change for any repo). The pilot caller (
giantswarm/microerror), the architect-orb opt-out, and the merge-queue ruleset follow.Prerequisite
OSSI_OSSINDEXURLmust be added as a GitHub Actions org secret (same value as the CircleCI env var) before any caller runs. The scan requires it so it hits the same OSS Index/Sonatype endpoint as the CircleCI scan;NANCY_USER/NANCY_TOKENalready exist as org secrets.Notes
fix-vulnerabilities.yamlpattern:NANCY_USER/NANCY_TOKEN→OSSI_USERNAME/OSSI_TOKEN, plusOSSI_OSSINDEXURLfor the endpoint.checkoutusespersist-credentials: false; least-privilegecontents: read.