Skip to content

Add vulnerability-check reusable workflow - #220

Closed
QuentinBisson wants to merge 2 commits into
mainfrom
add-vulnerability-check-reusable-workflow
Closed

Add vulnerability-check reusable workflow#220
QuentinBisson wants to merge 2 commits into
mainfrom
add-vulnerability-check-reusable-workflow

Conversation

@QuentinBisson

@QuentinBisson QuentinBisson commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

What

Adds a vulnerability-check.yaml reusable workflow that runs nancy sleuth against the Go module graph (go list -json -m all), honouring .nancy-ignore and .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 on main. Calling this workflow on pull_request + merge_group lets 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_OSSINDEXURL must 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_TOKEN already exist as org secrets.

Notes

  • Auth mirrors the existing fix-vulnerabilities.yaml pattern: NANCY_USER/NANCY_TOKENOSSI_USERNAME/OSSI_TOKEN, plus OSSI_OSSINDEXURL for the endpoint.
  • Ports the scanner-outage guard from the orb (exit 0 when nancy fails and the output shows an upstream error) so a Sonatype outage cannot wedge the merge queue.
  • Actions are SHA-pinned; checkout uses persist-credentials: false; least-privilege contents: read.

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.
@QuentinBisson
QuentinBisson deleted the add-vulnerability-check-reusable-workflow branch June 21, 2026 06:58
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.

1 participant