Repository navigation
fix: raise webpack floor and update vulnerable dev deps in lock file - #64
amit-kanswal-cs wants to merge 3 commits into
Conversation
Lock file updated in place for the npm-audit-flagged packages, within their ranges (a fresh regen hits a pre-existing eslint-config-airbnb/eslint 9 peer conflict); this fixed 41 of 46 findings on its own. Direct upgrades: webpack ^5.70.0 -> ^5.112.2 (devDependency, floor raised) Overrides: none Vuln count: snyk n/a (CLI unavailable), npm audit 46 -> 5 (remaining 5 moderate need nyc 18 / webpack-dev-server 6 majors). Build verified passing. Refs DX-29607 Co-Authored-By: Claude Opus 5.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
✅ BUILD PASSED - All security checks passed |
The security-license check requires the current year in LICENSE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
- package.json / package-lock.json: 2.2.4 -> 2.2.5 (patch). SDK_VERSION (read from package.json at build time and sent to the host on init) becomes 2.2.5. - README.md + blueprint.json: regenerated via the repo's generate:sri + readme flow. JS SRI computed from a Node 16 build (same Node as npm-publish.yml), verified deterministic across two builds; CSS SRI unchanged (byte-identical CSS). Note: npm's latest is 2.2.3 (2.2.4 was never published), so the README CDN URL points at 2.2.5 and resolves once this version is released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Problem
DX-29607: the committed
package-lock.jsononmasterhad 46 npm audit findings (4 critical, 25 high, 15 moderate, 2 low). All of them come from devDependencies: the build, test and docs toolchain.Repo kind: LIBRARY
@contentstack/ui-extensions-sdkis published on npm (main+files: ["dist"], not private). Consumers never see this repo's lock file oroverrides; they resolve ourpackage.jsonranges. The two runtime dependencies (post-robot8.0.29 andwolfy87-eventemitter5.2.4, both pinned) had no findings. What consumers actually get is the webpack bundle indist/, so the build toolchain does matter for the shipped artefact.Fix
mastertoday.eslint-config-airbnb@19wants peereslint ^7 || ^8, and the repo is oneslint ^9. CI works around this withnpm ci --legacy-peer-deps. So instead of regenerating the lock, I kept the committed lock and updated only the 46 flagged packages within their existing ranges (npm update <pkgs> --package-lock-only --force). This keeps peer deps in the lock, so Snyk's lock parser still reads it.webpack^5.70.0→^5.112.2(devDependency). The old range allowed the vulnerable 5.49.0–5.104.0. Note: webpack 5.112 swaps its default minimizer (terser-webpack-plugin→minimizer-webpack-plugin), sodist/ui-extension-sdk.jscomes out 372 bytes larger. The build output is otherwise equivalent.npm-publish.yml; there are no changesets and no CHANGELOG, so the maintainer bumps at release time.npm audit, before → after
The Snyk CLI could not be used for this run (the account gets 403 "user does not have required permission on org"), so these numbers come from npm audit only. The org's
security-scacheck on this PR will give the Snyk view.What remains, and why
All 5 are moderate, all in devDependencies, and all need a major bump:
uuid8.3.2 (<11.1.1, missing buffer bounds check), reached via:nyc17.1.0 →istanbul-lib-processinfo2.0.3. Fixed innyc@18(major).webpack-dev-server5.2.7 →sockjs0.3.24. Fixed inwebpack-dev-server@6(major).Neither
nycnorwebpack-dev-serveris used by any script in this repo. Tests usekarma-coverage, and thedevServerblock inwebpack.config.jsuses v3-only options (contentBase,watchContentBase). The simplest follow-up is to remove both devDependencies, or bump them to their next major.Also pre-existing and not changed here: the
eslint-config-airbnb@19/eslint@9peer conflict, which is why CI needs--legacy-peer-deps.Verification
npm run buildpasses (webpack 5.112.2, 0 errors, the same lint warnings as master).npm test(karma, ChromeHeadless): 128/133 pass on both master and this branch. The same 5 postMessage-ack specs fail on master too, so these failures are pre-existing.npm ci --legacy-peer-deps, installs the new lock cleanly.🤖 Generated with Claude Code
Release prep: version 2.2.5 and compatibility check
Version bump
package.json/package-lock.json: 2.2.4 → 2.2.5 (patch).SDK_VERSION, which is read frompackage.jsonat build time and sent to the host oninit(), becomes2.2.5.latestis 2.2.3. 2.2.4 was never published, so the next release goes from 2.2.3 to 2.2.5.README.mdandblueprint.jsonwere regenerated with the repo's owngenerate:sri+ readme flow. The CDN snippet now points to@2.2.5, with the integrity hash of the 2.2.5 bundle. The URL resolves once 2.2.5 is published.Is anything breaking for consumers? No.
The steps of
npm-publish.ymlwere reproduced on Node 16 (npm ci --legacy-peer-deps→prepare→ webpack build →npm test→npm pack), for bothmasterand this PR:npm ci --legacy-peer-deps+ build on Node 16ContentstackUIExtensionwithinit,SDK_VERSIONdist/ui-extension-sdk.cssdist/ui-extension-sdk.jsnpm packinit,init failure,getField Invalid Uid,Extension initialize,setReady), so they predate this PR.curl -s https://unpkg.com/@contentstack/ui-extensions-sdk@2.2.5/dist/ui-extension-sdk.js | openssl dgst -sha512 -binary | base64should printin0mMjQmxKUrHCmC1+9I7IzBQMTA3FVUI+/txGpGSFdgy65iYuQR9eGFSJ4H/qgR1Qd40NOLsaE/bTGDLAQP7A==.