Skip to content

fix: bump 2 deps to resolve Snyk vulnerabilities - #191

Open
pradyumna-garg-contentstack wants to merge 1 commit into
mainfrom
fix/snyk-patch-deps-20261029
Open

pradyumna-garg-contentstack wants to merge 1 commit into
mainfrom
fix/snyk-patch-deps-20261029

Conversation

@pradyumna-garg-contentstack

Copy link
Copy Markdown
Contributor

Problem

Snyk reports 25 vulnerabilities (8 high, 17 medium) in the committed package-lock.json on main: 22 in axios 1.16.0, 2 in follow-redirects 1.16.0 and 1 in form-data 4.0.5. npm audit reports 31 (3 critical, 14 high, 7 moderate, 7 low).

Fix

This repo is a LIBRARY (@contentstack/app-sdk on npm). Consumers never see our lock file; they resolve our package.json ranges themselves, so the floors had to go up in package.json:

  • axios ^1.7.9 → ^1.21.0 in dependencies. The axios floor is raised so consumers can't resolve a vulnerable axios; this clears all 22 axios findings. axios 1.21.0 also requires form-data ^4.0.6, the fixed version.
  • @babel/core ^7.2.2 → ^7.29.7 (devDependency; clears an npm audit low).
  • @types/node ^25.6.0 added as a devDependency, so TypeScript 4.7 can build. A fresh lock otherwise resolves @types/node 26 through jest's * range, TypeScript 4.7 can't parse it, and the prepare build fails. It is dev-only and doesn't affect consumers.
  • package-lock.json regenerated: follow-redirects 1.16.2 and form-data 4.0.6. No overrides, no version bump.

Verification

Snyk 25 → 0, npm audit 31 → 9. npm run build (webpack) passes, and npm test passes 249/249. ggshield was run by hand on the staged diff (no secrets found), because the repo's local husky core.hooksPath bypasses the global ggshield hook.

What remains

  • npm audit 9 (3 moderate, 6 low), all devDependencies, none shipped to consumers, each fixable only by a major bump: jest / ts-jest 27 (@jest/core, jest-cli, jest-config, deepmerge have open-ended vulnerable ranges) and webpack-dev-server 5 (sockjs has an open-ended range; uuid 8.3.2 → 11 is cross-major).
  • axios declares follow-redirects ^1.16.0. A consumer's fresh install gets 1.16.2, but a consumer lock pinned to 1.16.0/1.16.1 needs a refresh.
  • Snyk Code's 3 low findings (hardcoded test strings in __test__/stackUtils.test.ts) are source-level and out of scope.

Jira: DX-20981, DX-20982, DX-20983, DX-20984, DX-20985, DX-20986, DX-20987, DX-20988, DX-20989, DX-20990, DX-20991, DX-27758, DX-27759, DX-27760, DX-27761, DX-27762, DX-27763, DX-27764, DX-27765, DX-27766, DX-27767, DX-27768, DX-30482, DX-30483

🤖 Generated with Claude Code

Lock file regenerated (fixed 25 on its own).
Direct upgrades: axios ^1.7.9 -> ^1.21.0 (dependencies), @babel/core ^7.2.2 -> ^7.29.7 (devDependencies)
Added devDependency: @types/node ^25.6.0 (keeps the TypeScript 4.7 build working; dev-only)
Overrides: none
Vuln count: snyk 25 -> 0, npm audit 31 -> 9. Build verified passing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pradyumna-garg-contentstack
pradyumna-garg-contentstack requested a review from a team as a code owner October 30, 2026 06:21
@snyk-io

snyk-io Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

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