Skip to content

πŸ”§ chore(security): drop Snyk, consolidate dep/CVE scanning on Grype#441

Merged
scttbnsn merged 2 commits into
mainfrom
chore/drop-snyk-grype
Jun 16, 2026
Merged

πŸ”§ chore(security): drop Snyk, consolidate dep/CVE scanning on Grype#441
scttbnsn merged 2 commits into
mainfrom
chore/drop-snyk-grype

Conversation

@scttbnsn

Copy link
Copy Markdown
Contributor

Decommissions Snyk and consolidates dependency/CVE scanning on Grype.

Why

Snyk's GitHub SCM integration scans the full dependency requirement graph across every package.json/package-lock.json rather than the resolved, shipped dependency set, so it over-reports advisories in transitive packages the lockfile never resolves to β€” noise on top of a redundant paid integration that, in practice, was never even wired up (SNYK_TOKEN was never set, so the weekly jobs always took the skip path). Grype matches lockfile-resolved versions and scans the built image's package catalog, so no requirement-graph false positives.

What

Removed

  • .snyk policy file
  • .github/workflows/security-snyk-weekly.yml (6-job paid-scan workflow)
  • .github/actions/setup-snyk/ composite action
  • scripts/snyk-* gate + quota scripts (+ its test)
  • README / website (apps/web) Snyk badges; reworked the CONTRIBUTING scanning section; updated docs/ci-flow.html; dropped the stale Snyk cards from docs/audit-findings.html

Added β€” security-grype.yml (no govulncheck; drydock is TypeScript/Node, not Go)

  • grype-deps β€” anchore/scan-action path: . over all six npm lockfiles (root, app, ui, e2e, apps/demo, apps/web); runs on PRs (path-filtered to deps/Dockerfile/workflow) + weekly cron + dispatch
  • grype-image β€” builds + scans the container; if: github.event_name != 'pull_request' so PRs don't pay for a Docker build
  • SHA-pinned, harden-runner, persist-credentials: false, distinct SARIF categories, upload gated on public-repo visibility, fail-build on HIGH/CRITICAL

CodeQL (SAST), dependency-review, OpenSSF Scorecard, and zizmor remain as the free gates. Trivy intentionally not added.

Verification

  • actionlint + zizmor clean; 27 workflow-invariant test files (93 tests) pass
  • git archive HEAD | grype dir:… --fail-on high β†’ No vulnerabilities found
  • Full pre-push gate green (lint, qlty, coverage 100%, build)
  • Code-scanning dashboard had zero Snyk analyses/alerts in any state (token was never configured)

The Snyk org-dashboard + GitHub-app teardown is the only remaining step, done by the owner in the Snyk UI β€” the repo side is clean. The unused ci-security environment was already deleted.

scttbnsn added 2 commits June 16, 2026 15:19
Snyk's GitHub SCM integration scans the full dependency requirement graph
across every package.json/package-lock.json instead of the resolved,
shipped dependency set, so it over-reports advisories in transitive
packages the lockfile never resolves to β€” noise on top of a redundant
paid integration. Grype matches lockfile-resolved versions and scans the
built image's package catalog, so no requirement-graph false positives.

- πŸ—‘οΈ Removed Snyk wiring: .snyk policy, security-snyk-weekly.yml,
  the setup-snyk composite action, and the scripts/snyk-* gate/quota scripts
- ✨ Added security-grype.yml: grype-deps (all six npm lockfiles; on PRs
  path-filtered to deps/Dockerfile/workflow + weekly cron + dispatch) and
  grype-image (built container, scheduled/manual only). SHA-pinned,
  harden-runner, persist-credentials:false, distinct SARIF categories,
  upload gated on public-repo visibility, fail-build on HIGH/CRITICAL
- πŸ“ Reworded the lefthook comment, dropped the README + apps/web Snyk
  badges, reworked the CONTRIBUTING scanning section, updated docs/ci-flow.html
- πŸ“ CHANGELOG: Unreleased β†’ Changed entry with the requirement-graph
  vs shipped-deps rationale
- No govulncheck job and no Trivy: drydock is TypeScript/Node (not Go),
  and Grype already covers the SCA + container surface. CodeQL, dependency
  review, OpenSSF Scorecard, and zizmor remain as the free gates
The six closed/won't-fix cards tracked findings in security-snyk-weekly.yml
and the scripts/snyk-* gate scripts, all now removed. Dropped the cards,
deleted the now-empty hardening + decisions sections (and their dead CSS),
and corrected the summary chips (26->21 closed, removed the 0 won't-fix chip).
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drydock-website Ready Ready Preview, Comment Jun 16, 2026 7:46pm
drydockdemo-website Ready Ready Preview, Comment Jun 16, 2026 7:46pm

@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.

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.

πŸ“’ Thoughts on this report? Let us know!

@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. Snyk wiring fully removed, Grype workflow is SHA-pinned with the container scan correctly gated off PRs. Grype dep scan + all required checks green.

@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.

Approving β€” clean cutover to Grype, rationale documented in the CHANGELOG. No required-check or branch-protection changes.

@scttbnsn scttbnsn merged commit c487d99 into main Jun 16, 2026
27 checks passed
@scttbnsn scttbnsn deleted the chore/drop-snyk-grype branch June 16, 2026 20:03
scttbnsn added a commit that referenced this pull request Jun 16, 2026
… gate (#442)

## What

Clears the HIGH/CRITICAL container-image CVEs that the new `grype-image`
scan
(added in #441) surfaced, and scopes the Grype image gate so it stays
accurate
going forward.

Before this change the built release image reported **11 critical + 22
high**.
After it: **0 HIGH/CRITICAL outside the two bundled third-party tool
binaries**
(`cosign`, `trivy`), which are triaged with a documented,
location-scoped
`.grype.yaml`.

## Changes

- **`Dockerfile`** β€” bump the base + pins that carried the fixable CVEs:
- `node:24-alpine` β†’ Alpine 3.24.1 digest (clears the Node-runtime CVE,
musl, curl Γ—2, git)
  - `bash 5.3.3-r1 β†’ 5.3.9-r1`, `git 2.52.0-r0 β†’ 2.54.0-r0`
- `cosign 2.6.3-r1 β†’ 3.0.6-r1` (clears the bulk of the vendored-Go
cosign CVEs; CLI `verify` flags drydock uses are unchanged)
- **`.grype.yaml`** (new) β€” location-scoped `ignore` for
`/usr/bin/cosign` and
`/usr/bin/trivy` only. These are vendored Go-module CVEs compiled into
the
upstream tool binaries; we can't patch them independently β€” they clear
when
Alpine rebuilds those packages, which we pick up on the next base bump.
The
Node runtime, every OS package, and the entire app dependency graph stay
  fully gated. Gating on a module graph we don't ship is the same
  manifest-vs-shipped mismatch we dropped Snyk over.
- **`security-grype.yml`** β€” wire `GRYPE_CONFIG` to the repo-root
`.grype.yaml`
so the gate is deterministic across action versions (grype also
auto-discovers
  it, but pinning the path is explicit).
- **`CHANGELOG.md`** β€” `Security` entry under Unreleased.

## Verification

- Full release image scan: `grype --fail-on high` with the config exits
**0**
(was exit 2 / 33 findings). HIGH+ findings outside the two triaged
binaries: **0**.
- cosign 3.0.6 CLI confirmed compatible with `app/security/scan.ts`'s
`verify --output json --key --certificate-identity
--certificate-oidc-issuer`.
- qlty / hadolint / yamllint clean on changed files.

The red `grype-image` alerts currently in the Security tab will
auto-close on the
next scan once this lands (the new SARIF no longer reports them).
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