Skip to content

fix(security): resolve new Trivy Repository Scan CVEs blocking CI - #528

Merged
ajitpratap0 merged 1 commit into
mainfrom
fix/trivy-repo-scan-new-cves
Jul 30, 2026
Merged

fix(security): resolve new Trivy Repository Scan CVEs blocking CI#528
ajitpratap0 merged 1 commit into
mainfrom
fix/trivy-repo-scan-new-cves

Conversation

@ajitpratap0

Copy link
Copy Markdown
Owner

Problem

The Trivy vulnerability DB picked up new CVE IDs since these workflows were last green, which broke Trivy Repository Scan / Security Scan Summary CI on all currently open PRs (#525, #526, #527) even though none of them touch these dependencies. This is a pre-existing, repo-wide gate issue, not something fixable from within those PR branches.

Root cause (verified with the exact trivy-action invocation CI uses: scan-type=fs, skip-dirs=website/node_modules,website, severity=CRITICAL,HIGH,MEDIUM, trivyignores=.trivyignore)

Package New CVEs Fix available?
golang.org/x/crypto v0.48.0 CVE-2026-39827..39835, CVE-2026-42508, CVE-2026-46595/46597/46598 ✅ v0.54.0
github.com/docker/docker v28.5.2+incompatible CVE-2026-41567, CVE-2026-42306, CVE-2026-41568 ❌ v28.5.2 is still latest
brace-expansion (vscode-extension npm tree, versions 1.1.12/2.0.2/5.0.4) CVE-2026-13149, CVE-2026-14257 ✅ v5.0.8 (v1.1.16/v2.1.2/v5.0.8 all fix it)

Changes

  1. go.mod/go.sum: bump golang.org/x/crypto (indirect) to v0.54.0 via go get -u golang.org/x/crypto@latest && go mod tidy. Not used directly by GoSQLX code. go build ./... and go test ./... pass (full suite, all green).
  2. vscode-extension/package.json: add an "overrides" entry pinning brace-expansion to ^5.0.8, which dedupes the 3 vulnerable versions pulled in transitively by eslint/glob/@vscode/vsce/mocha. npm run compile succeeds. The 12 pre-existing lint errors in test files are unrelated to this change (present on main too, confirmed against a clean checkout).
  3. .trivyignore: extend the existing documented docker/docker ignore entry with the 3 new CVE IDs for the same already-accepted "no fixed version available, test-only dependency via testcontainers-go" issue — consistent with the existing pattern in this file, not a blanket suppression.

Verification

before: 18 SARIF findings (error/warning level) → CI fails
after:  0 SARIF findings → CI passes

Ran trivy fs locally with the identical flags from .github/workflows/security.yml before/after this change to confirm.

Also ran:

  • go build ./...
  • go test ./... ✅ (full suite green)
  • npm run compile (vscode-extension) ✅
  • npm run build (website, unaffected — excluded from this scan job via skip-dirs, no changes made there)

Note

website/ is excluded from the Trivy Repository Scan job via skip-dirs, so its own separate brace-expansion transitive dependency is out of scope for this fix.

The Trivy vulnerability DB picked up new CVE IDs since the last scan,
breaking CI (Security Scan Summary / Trivy Repository Scan) across
unrelated open PRs (numbers 525, 526, 527) with no code changes needed
on their part.

- golang.org/x/crypto v0.48.0 -> v0.54.0: fixes CVE-2026-39827..39835,
  CVE-2026-42508, CVE-2026-46595/46597/46598 (indirect dep, no direct
  usage; go build/go test ./... verified green after bump).
- vscode-extension: add "overrides" pin for brace-expansion@^5.0.8,
  fixing CVE-2026-13149 and CVE-2026-14257 (DoS via exponential-time
  brace expansion) across the multiple brace-expansion versions
  (1.1.12/2.0.2/5.0.4) pulled in transitively by eslint/glob/vsce/mocha.
  Verified npm run compile succeeds; pre-existing lint errors in test
  files are unrelated (present on main too).
- .trivyignore: extend the existing docker/docker entry with 3 new CVE
  IDs for the same already-documented unfixed issue (v28.5.2 is still
  latest; testcontainers-go test-only dependency, not production code).

Verified locally with the same trivy invocation CI uses
(scan-type=fs, skip-dirs=website/node_modules,website,
severity=CRITICAL,HIGH,MEDIUM, trivyignores=.trivyignore):
before = 18 findings, after = 0 findings.

Note: website/ is excluded from this Trivy job via skip-dirs, so its
own brace-expansion transitive dependency is out of scope here.
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
gosqlx-website Ready Ready Preview, Comment Jul 29, 2026 9:39am

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@ajitpratap0
ajitpratap0 merged commit 31b5b1c into main Jul 30, 2026
22 of 23 checks passed
@ajitpratap0
ajitpratap0 deleted the fix/trivy-repo-scan-new-cves branch July 30, 2026 06:38
ajitpratap0 added a commit that referenced this pull request Jul 31, 2026
ajitpratap0 added a commit that referenced this pull request Jul 31, 2026
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