Skip to content

🔧 chore(security): consolidate dep/CVE scanning on Grype + govulncheck#21

Merged
scttbnsn merged 3 commits into
mainfrom
quality/security-grype-consolidation
Jun 16, 2026
Merged

🔧 chore(security): consolidate dep/CVE scanning on Grype + govulncheck#21
scttbnsn merged 3 commits into
mainfrom
quality/security-grype-consolidation

Conversation

@scttbnsn

Copy link
Copy Markdown
Contributor

Brings Portwing's existing Grype + govulncheck scan up to the sockguard security-grype.yml pattern. Portwing never carried Snyk on the repo side, so nothing was removed here — Snyk's SCM integration is being decommissioned org-wide (it scans the Go module requirement graph, not the compiled build graph, and over-reports advisories the binary never links in).

  • Rename security-vuln-weekly.ymlsecurity-grype.yml; source job → grype-deps (Go go.mod/go.sum + npm lockfiles in one pass).
  • Add a path-filtered pull_request trigger; keep weekly cron + workflow_dispatch.
  • Guard the heavy container build off PRs (grype-image stays on schedule/manual).
  • Distinct code-scanning category: per scanner so same-tool Grype SARIF uploads stop clobbering each other.
  • Pin govulncheck's Go toolchain to go.mod (was floating "1.26").
  • CHANGELOG: Unreleased → Changed entry with the module-graph-vs-build-graph rationale.

Verified locally: actionlint + zizmor clean; grype over the git-archived tracked tree reports no vulnerabilities.

Portwing never carried Snyk on the repo side (no .snyk policy, no workflow
step, no badge), so there's nothing to remove here. Snyk's SCM integration
is being decommissioned org-wide because it scans the Go module requirement
graph (go mod graph) rather than the compiled build graph and over-reports
advisories in modules the binary never links in. This brings the existing
Grype + govulncheck scan up to the sockguard pattern:

- 🔄 Rename security-vuln-weekly.yml -> security-grype.yml; rename the source
  job to grype-deps (Go go.mod/go.sum + npm lockfiles in one pass).
- ✨ Add a path-filtered pull_request trigger (source/deps/Dockerfile/the
  workflow itself); keep the weekly cron + workflow_dispatch.
- 🔧 Guard the heavy container build off PRs (govulncheck + grype-deps carry
  fast PR coverage); grype-image stays on schedule/manual.
- 🐛 Give each upload-sarif a distinct category (grype-image/grype-deps/gosec)
  so same-tool Grype SARIF uploads no longer clobber each other in code scanning.
- 🔧 Pin govulncheck's Go toolchain to go.mod instead of a floating "1.26".
- 📝 CHANGELOG: document the consolidation and the module-graph-vs-build-graph
  rationale under Unreleased -> Changed.

Verified: actionlint + zizmor clean on the new workflow; grype scan of the
git-archived tracked tree reports no vulnerabilities.
@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM — Grype + govulncheck consolidation, PR-guarded image scan, distinct SARIF categories.

ALARGECOMPANY
ALARGECOMPANY previously approved these changes Jun 16, 2026

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved. Workflow change is clean, scan posture is sound.

…ort-only

Surfaced by running security-grype.yml on PRs:

- 🐛 govulncheck: go-version-file resolved to go.mod's `go 1.26.0` (no
  toolchain directive), which reports stdlib advisories already fixed in
  1.26.1+ (GO-2026-4599/4600/4601). Revert to go-version "1.26" to track the
  latest patch, matching the gating ci.yml scan and how the binary is built.
- 🔧 gosec: add -no-fail so its heuristic findings (e.g. G115 int->uint in the
  mockdocker benchmark helper) feed the Security tab via SARIF without failing
  the run; CodeQL/Grype/govulncheck handle build gating.
- 📝 CHANGELOG: correct the entry to drop the reverted go-version-file claim.
@scttbnsn scttbnsn dismissed stale reviews from biggest-littlest and ALARGECOMPANY via e504651 June 16, 2026 19:33

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Re-approve: govulncheck back on latest 1.26.x, gosec report-only. Workflow's own jobs green now.

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Re-approve at e504651 — workflow jobs green.

@scttbnsn scttbnsn merged commit 6b43cbe into main Jun 16, 2026
22 checks passed
@scttbnsn scttbnsn deleted the quality/security-grype-consolidation branch June 16, 2026 19:36
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.

4 participants