fix(deps): resolve 14 Snyk vulnerabilities via upgrades and overrides - #76
Merged
Conversation
Clears all 14 Snyk security findings (2 critical, 7 high, 5 moderate) and all 6 npm audit findings. Every vulnerability was transitive. Upgrades next, react and react-dom within their existing majors, and adds undici and js-yaml overrides. Raises the stale qs and sharp overrides, which were pinning versions that had themselves become vulnerable. No major version bumps. Snyk's suggested major (isomorphic-dompurify 4.0.0) and npm audit's suggested downgrade (delivery-sdk 5.1.1) were both rejected in favour of same-major overrides. The build failure on this branch is pre-existing and environmental: it reproduces identically on unmodified main with the same error digest, and is caused by build-time Contentstack fetches requiring real credentials. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
netrajpatel
approved these changes
Sep 10, 2026
aniket-shikhare-cstk
approved these changes
Sep 10, 2026
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.
Problem
Snyk reported 14 security vulnerabilities on
main(2 critical, 7 high, 5 moderate), andnpm auditreported 6 (3 high, 3 moderate). Every one was transitive.The dominant source was a single package:
undici@8.10.0, reached viaisomorphic-dompurify > jsdom, accounted for 11 of the 14 findings including both criticals (Improper Certificate Validation, Origin Validation Error).Two entries in the existing
overridesblock had also gone stale and were themselves pinning vulnerable versions:qspinned at6.15.3— inside the affected range>=6.14.2 <=6.15.3sharppinned at0.35.0— inside the affected range<0.35.4(libheif CVEs)Fix
Direct dependency upgrades (patch/minor only, no majors):
next^16.2.12→^16.3.4react^19.2.8→^19.3.0react-dom^19.2.8→^19.3.0Transitive fixes via
overrides:undici→8.10.2(new) — clears 11 findings incl. both criticalsjs-yaml→4.3.2(new) — clears 1 high (CPU DoS via@eslint/eslintrc)qs6.15.3→6.16.0— clears 2 moderatesharp0.35.0→0.35.4— clears 1 highVersion bumped
1.2.2→1.2.3.Deliberately not taken: Snyk's suggested remedy for the
undicicluster was a major bump ofisomorphic-dompurify3.23.0 → 4.0.0, andnpm audit fixproposed downgrading@contentstack/delivery-sdk5.6.0 → 5.1.1 (flaggedisSemVerMajor). Both rejected in favour of same-major overrides that fix the identical issues.Build verification — please read
npm run buildfails on this branch, and it fails identically on unmodifiedmain. This was verified A/B: a git worktree at pristineHEADwithnpm ciagainst the original lockfile produces the same error and the same digest as the modified tree —APIError 412, error_code 109: "We can't find that Stack.", digest3319440507.The cause is environmental, not a dependency regression:
app/page.tsxfetches live Contentstack content at build time, sonext buildrequires valid Stack credentials, which are not available in the environment this ran in. This repo has no build job in CI (onlypolicy-scan.ymlandsca-scan.yml), so this build has never been gated.Everything a dependency upgrade could plausibly break did pass on the upgraded tree: Turbopack compile, full TypeScript typecheck, and page-data collection, on
next@16.3.4/react@19.3.0.Please run
npm run buildwith valid Contentstack credentials before merging.Remaining findings (not addressable here)
@img/sharp-libvips-*platform binaries vianext > sharp. License metadata only; no non-LGPL alternative exists andsharp@0.35.4ships the same binaries. Note the SCA workflow uses--fail-on=all, so these will still trip it.isomorphic-dompurify@3.23.0emitsEBADENGINE(wants Node^22.22.2) and is deprecated upstream for raising its Node floor without a major bump. Pre-existing; the fix is a 4.x major, out of scope for this PR.snyk code test(SAST) returned findings for files that do not exist in this repo (src/main.ts, a knex service spec, a DB migration) under org11012d4f-…, whereassnyk testresolves tocontentstack-developer-ecosystem. Reproduced twice. This looks like a server-side project-mapping collision and was not actioned — worth raising with whoever owns the Snyk org config.🤖 Generated with Claude Code