Repository navigation
fix(deps): patch transitive vulnerabilities (NR-634009) - #2325
Merged
Merged
Conversation
- add scoped resolutions for single-major transitive packages (axios 0.34, lodash, qs, fast-uri, nanoid, postcss, immutable, js-yaml, and others) - bump direct deps within their major: gatsby ^4.25.9, gatsby-plugin-sharp, gatsby-plugin-mdx, snyk, prismjs - re-resolve multi-major packages (semver, ws, ajv, yaml, minimatch, ...) to patched versions within their dependents' ranges Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…urce-map-js, compression (NR-634009) - sanitize-html ^2.18.1: its only consumer is gatsby-transformer-remark's timeToRead (strips HTML before counting words), which the site never queries. 2.x needs Node >= 22.12, now possible since develop is on Node 24. This also drops postcss 7, which only sanitize-html 1.x pulled in. - proxy-addr 2.0.8, source-map-js 1.2.2, compression 1.8.2: patched versions within their dependents' existing ranges (newly published advisories). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
akashreddy-nr
force-pushed
the
akash/fix-vulnerable-deps
branch
from
October 23, 2026 10:02
9c50198 to
8d449c7
Compare
…009) Remove unused dependencies: - eslint-plugin-graphql: listed in .eslintrc plugins but no graphql/* rule is enabled; deprecated. Clears the last critical (form-data 4.0.0). - gatsby-plugin-offline: not in gatsby-config. - fal: never imported. - gatsby-transformer-remark: no .md content and no Markdown queries (all MDX). - sharp (direct): never imported; gatsby-plugin-sharp brings its own. Bump gatsby-transformer-sharp 4.6.0 -> 4.25.0 (same major, Gatsby 4). Path-scoped resolutions for copies pinned by a single parent: - ws (engine.io-client), js-cookie (@segment/analytics-next), semver (typescript-estree, core-js-compat), gatsby-plugin-sharp (theme): same-major patches. - tmp ^0.2.6, xml2js ^0.5.0, cookie ^0.7.0 (gatsby), uuid ^11.1.1 (gatsby, node-notifier), serialize-javascript ^7.0.5: same exported API and still CommonJS; serialize-javascript 7 needs Node >= 20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Nice cleanup! I pulled this down and checked it locally (Node 24.15):
Also checked the removals. Nothing references One non-blocking thing for a follow-up: LGTM 👍 |
Nandu-pns
approved these changes
Oct 26, 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.
Summary
Resolves open Dependabot alerts for
developer-website. Jira: NR-634009. Same approach as docs-website #26125. Rebased ontodevelop(Node 24.22.1, #2324).resolutionsfor packages that exist in a single major:axios(0.34, only Gatsby pulls it in),lodash,qs,fast-uri,nanoid,immutable,js-yaml,svgo,browserslist,follow-redirects,path-to-regexp,shell-quote, and others (seepackage.json).sanitize-htmlresolved to^2.18.1. Its only consumer isgatsby-transformer-remark'stimeToRead, which strips HTML before counting words; the site never queriestimeToRead. 2.x needs Node >= 22.12, whichdevelopnow has. This also dropspostcss7, which onlysanitize-html1.x pulled in.gatsby^4.25.9 (last v4),gatsby-plugin-sharp,gatsby-plugin-mdx,snyk,prismjs.semver,ws,ajv,yaml,minimatch,postcss,form-data,terser,cross-spawn, ...) and in-range fixes (proxy-addr,source-map-js,compression): yarn 1 can't scope a resolution to one major, so the vulnerableyarn.lockentries were removed and re-resolved to patched versions within their dependents' ranges.eslint-plugin-graphql(in.eslintrcpluginsbut nographql/*rule enabled; deprecated),gatsby-plugin-offline(not ingatsby-config),fal(never imported),gatsby-transformer-remark(no.mdcontent and no Markdown queries; content is MDX), and the directsharpdependency (never imported). The only config changes are dropping'graphql'from.eslintrc.jsplugins and'gatsby-transformer-remark'fromgatsby-config.js.gatsby-transformer-sharp4.6.0 → 4.25.0 (same major, Gatsby 4).**/parent/child) for copies pinned by one parent:ws(engine.io-client),js-cookie(@segment/analytics-next),semver(typescript-estree,core-js-compat),gatsby-plugin-sharp(theme) are same-major patches;tmp^0.2.6,xml2js^0.5.0,cookie^0.7.0,uuid^11.1.1 andserialize-javascript^7.0.5 keep the same exported API and are still CommonJS (checked against how each consumer calls them).Impact
Verification (Node 24.22.1, same as CI)
rm -rf node_modules && yarn install --frozen-lockfile(no--ignore-engines),yarn test(75 passed),yarn lint(clean), and a clean fullyarn build(gatsby cleanfirst) succeeds:sharp0.30.7 loads, ~2,800 images are processed,_redirectshas the same 46 rules.node_modules, run a fresh install:sharpmoves to the top level, and yarn 1 doesn't re-run its binary download on an in-place install.gatsby-source-newrelic-sdkdownloads 5 SDK bundles from the CDN with nores.okcheck or retry, so a stalled or error response fails the build withUnexpected token '<'. This happened intermittently during testing on both this branch and unrelated runs; a rebuild passes. It's pre-existing and not changed here.Not in this PR (remaining 24)
sharp0.30.7 (4): needs 0.35, a native-module jump from what Gatsby 4'sgatsby-plugin-sharpsupports.require:decode-uri-component(2),file-type(2).webpack-dev-middleware(2,gatsby developonly),got,postcss-selector-parser,@graphql-tools/utils,phin,nth-check,js-cookie2 (3.x API differs; used by the theme,gatsby-plugin-gdpr-tracking,react-use).micromatch,@tootallnate/once. A jest 29 upgrade would clear them.braces(2),http-cache-semantics(2),sprintf-js,lodash.pick. Candidates for dismissal with a reason.NR_SITESasundefined, which breaksMainLayout.js. Fix is in fix: export NR_SITES from constants so it is no longer undefined gatsby-theme-newrelic#1185.🤖 Generated with Claude Code