SYN-596: Bump dev dependencies to clear all critical CVEs (npm audit + Guardrails) - #539
Merged
Merged
Conversation
Raises @stoplight/prism-cli and @stoplight/spectral-cli, and adds overrides for two transitive-only packages reached via webpack-dev-server. Takes npm audit from 10 criticals to 0. @redocly/cli is deliberately left at 2.31.5: 2.48.0 adds an SRI integrity hash to the Redoc CDN script tag, which breaks the generated docs with "Redoc is not defined". Since deploy.yml ships that HTML to docs.lob.com, bumping it would publish a blank docs site. Co-Authored-By: Claude <noreply@anthropic.com>
Vulnerable Libraries (13)
More info on how to fix Vulnerable Libraries in JavaScript. 👉 Go to the dashboard for detailed results. 📥 Happy? Share your feedback with us. |
The Guardrails PR scan uses a different advisory database than npm audit and flagged two criticals npm audit does not report at all: @slack/web-api 6.12.0 and sass 1.77.2. Both were already at these versions on main, so they are pre-existing rather than introduced here, but both clear within the existing semver ranges. Built CSS (docs/chunks/styles.min.css) is byte-identical after the sass bump. sass 1.103.1 adds legacy-JS-API deprecation warnings via sass-loader, but the build reports 0 errors and output is unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
No 6.x release fixes this one -- Guardrails asks for "> 6.13.0" and 6.13.0 is the last 6.x -- so it needs the major. 7.19.0 requires Node >= 18, satisfied by this repo's Node 24. The only usage is actions/contract_tests/goalieruns.js, which calls new WebClient(token) and web.chat.postMessage. Both are unchanged in 7.x; verified the client constructs, chat.postMessage resolves, and the goalie runner executes its Prism validation path end to end. Also pulls axios to 1.20.0 and form-data to 4.0.6 transitively, taking npm audit highs from 28 to 26. Co-Authored-By: Claude <noreply@anthropic.com>
Bumps webpack, @actions/core, joi, mini-css-extract-plugin and yaml to
the newest versions their existing semver ranges already allowed, so
package.json ranges move but no major upgrade is involved.
Also declares terser-webpack-plugin explicitly. webpack.config.js has
always required it directly at line 4, but it was only ever resolved
as a transitive dependency of webpack. webpack 5.109.2 no longer pulls
it in, so `npm run build` died with MODULE_NOT_FOUND until it was
declared. This was a latent bug in the config, surfaced by the bump
rather than caused by it.
docs/chunks/bundle.js is intentionally left alone: a rebuild only
changes terser's minification style (17:()=>{} becomes shorthand
17(){}) and deploy.yml regenerates it without committing it.
Co-Authored-By: Claude <noreply@anthropic.com>
derekprovance-lob
approved these changes
Aug 26, 2026
derekprovance-lob
left a comment
There was a problem hiding this comment.
Summary
Deps-only PR that does what it says: independently verified 0 criticals on npm audit (59 total, matching the table), the ticket's three lob-openapi criticals (jsonpath-plus, shell-quote, websocket-driver) all resolve fixed in the lockfile, build/spectral/prism deep imports all pass on a clean install. The terser-webpack-plugin declaration is a real latent-bug fix, and the @redocly/cli pin rationale checks out. Good to go; Guardrails staying red is expected and will need the documented override.
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.
Summary
Clears every critical CVE from both scanners, then takes every remaining fix that exists without a major upgrade.
npm auditcriticalnpm audittotalThe two scanners use different advisory databases and disagreed — Guardrails flagged
@slack/web-apiandsassas critical whilenpm auditdoesn't report them at all, and vice versa for the Stoplight chain. Both lists are now free of criticals.Changes
@stoplight/prism-cli^4.10.0^5.16.0@stoplight/spectral-cli^6.4.1^6.16.3@slack/web-api^6.7.1^7.19.0sass^1.52.1^1.103.1webpack^5.89.0^5.109.2@actions/core^1.8.2^1.11.1joi^17.6.0^17.13.6mini-css-extract-plugin^2.6.0^2.10.2yaml^2.3.4^2.9.0terser-webpack-plugin^5.6.1overrides.shell-quote^1.10.0overrides.websocket-driver^0.7.5Context: SYN-596.
Two things worth a reviewer's attention
1.
terser-webpack-pluginwas a latent config bug.webpack.config.js:4has alwaysrequired it directly and uses it at line 36, but it was never declared — it only resolved as a transitive dep ofwebpack. webpack 5.109.2 no longer pulls it in, sonpm run buildfailed withMODULE_NOT_FOUNDuntil it was declared explicitly. The bump surfaced this rather than caused it; the config was always one dependency-tree change away from breaking.2.
@redocly/cliis deliberately NOT bumped.npm audit fixwants 2.31.5 → 2.48.0. That breaks the docs. 2.48.0 adds an SRIintegrityhash to the Redoc CDN<script>tag, and the docs then fail to hydrate withRedoc is not defined— Cypress catches it (links_test+style_testboth fail). Sincedeploy.ymlships that HTML todocs.lob.com, bumping it would publish a blank docs site. Left pinned;docsTeststays green.Why
guardrails/scanis still redAll 13 remaining are High, and none can be fixed without a major upgrade — 6 have no fix at any version:
@stoplight/prism-cli5.16.0ava4.3.3 → 8.0.1@stoplight/spectral-cli6.16.3css-loader6.11.0 → 7.1.4ajv8.20.0webpack-cli4.10.0 → 7.2.2mini-css-extract-plugin2.10.2openapi-to-postmanv23.2.1 → 6.3.3terser-webpack-plugin5.6.1css-minimizer-webpack-plugin4.2.2 → 8.0.0webpack5.109.2@actions/core1.11.1 → 3.0.1webpack-dev-server4.15.2 → 6.0.0For the left column Guardrails asks for
> <latest>, i.e. a version that does not exist. The right column is a coordinated webpack-toolchain/tooling upgrade that deserves its own ticket rather than riding along in a CVE fix.npm auditadditionally lists two Highs with no fix available at all (extract-zip,lodash.pick).This check cannot go green from this PR. Merging will need a reviewer override.
Test plan
Verified on Node 24.15.0 (per
.node-version), compared against unmodifiedmain:rm -rf node_modules && npm cithen build — clean-install path works, lockfile is self-sufficientnpm run pretty:check— passnpm run spectral(CI gate) — 0 errorsnpm run bundle— passnpm run build— exit 0, webpack 5.109.2 compilednpm run redoc— pass; output matchesmainapart from randomized email obfuscation (svss). Operations (274) and paths (252) unchangednpm run docsTest(Cypress) — 18/18 pass, same asmainnpx prism mock lob-api-public.yml— boots on 5.16.0, serves all routestests/setup.jsdeep imports (prism-cli/dist/operations,prism-http/dist/client) still resolve across the 4.x→5.x major; drove the client end-to-end and confirmed correct spec-driven negotiationnode actions/contract_tests/goalieruns.js av— exit 0; exercises@slack/web-api7.x (new WebClient+chat.postMessage, both unchanged in 7.x),@actions/core1.11.1 andjoi17.13.6yaml2.9.0 parses (used byscripts/yml-version-bump.js)Reviewer notes
prism-cli4→5,@slack/web-api6→7). Both verified at their actual call sites as above.docs/chunks/bundle.jsintentionally not committed. Rebuilding changes only terser's minification style (17:()=>{}→ shorthand17(){}, 52 bytes smaller, both valid JS).deploy.ymlrunsnpm run buildand force-adds onlydist/anddocs/index.html, so this artifact is regenerated on deploy and left out to keep the diff to dependencies.LOB_API_TEST_TOKEN,addresses_test.jsfails 5 — butmainfails 10 under identical conditions, so these are missing-secret artifacts, not regressions. Worth confirming on the first CI run with real tokens, sincemonitor.ymlalso runs these against production every 30 min.sass1.103.1 adds legacy-JS-API deprecation warnings viasass-loader(11 warnings, 0 errors). Compiled CSS is unchanged. Silencing them means upgradingsass-loader— out of scope.overridesrequires npm ≥8.3 whileenginessays ≥7.9. CI uses Node 24 / npm 11 so this is fine in practice, though the floor is now technically understated.🤖 Generated with Claude Code