chore: [sc-13928] CVE-2025-62718: internal-tools-v3, react-addsearch-ui, ready-made-recommendation-widget, admin-panel-react#98
Conversation
WalkthroughPackage version is incremented from 1.2.2 to 1.2.3, and dependencies are updated: axios upgraded from ^1.12.0 to ^1.15.0, serialize-javascript override bumped from ^7.0.4 to ^7.0.5, and new overrides added for brace-expansion and picomatch. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
There was a problem hiding this comment.
🧹 Nitpick comments (2)
package.json (2)
49-49: Address AxiosHeaders typing change in request interceptors.The upgrade to axios ^1.15.0 includes a breaking TypeScript change introduced in v1.12.0:
InternalAxiosRequestConfig.headersis now anAxiosHeadersclass instance instead of a plain object. The current code insrc/api.ts(line 27) uses a type assertion workaround (headers: config.headers as Record<string, string>), which should be replaced with properAxiosHeadershandling (e.g.,new AxiosHeaders(config.headers)or using.set()methods).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` at line 49, The request interceptor in src/api.ts currently uses a type assertion (headers: config.headers as Record<string, string>) which breaks with axios v1.15 where InternalAxiosRequestConfig.headers is an AxiosHeaders instance; replace the assertion with proper AxiosHeaders handling by importing AxiosHeaders from 'axios' and either constructing a new instance (e.g., new AxiosHeaders(config.headers)) or treating config.headers as AxiosHeaders and using its .set()/.toJSON() methods before assigning to outgoing requests; update the interceptor code where axios.interceptors.request.use (or the function handling config) mutates headers to use AxiosHeaders APIs instead of plain-object casts.
89-91: Pin overrides to exact versions for deterministic CVE remediation.Lines 89-91 use ranged overrides (
^). For security fixes, exact versions eliminate semver resolution variability and ensure reproducible builds across fresh installs. Note thatbraceson line 88 is already pinned exactly.Suggested change
- "serialize-javascript": "^7.0.5", - "brace-expansion": "^2.0.3", - "picomatch": "^4.0.2" + "serialize-javascript": "7.0.5", + "brace-expansion": "2.0.3", + "picomatch": "4.0.2"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 89 - 91, The overrides list uses caret ranges for "serialize-javascript", "brace-expansion", and "picomatch", which allows semver variation; update the package.json overrides to pin these three packages to exact versions (remove the leading ^ and set the specific resolved version numbers) so installs are deterministic and match the CVE remediation; ensure format matches the existing "braces" entry and run a fresh lockfile update afterwards to lock transitive deps.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@package.json`:
- Line 49: The request interceptor in src/api.ts currently uses a type assertion
(headers: config.headers as Record<string, string>) which breaks with axios
v1.15 where InternalAxiosRequestConfig.headers is an AxiosHeaders instance;
replace the assertion with proper AxiosHeaders handling by importing
AxiosHeaders from 'axios' and either constructing a new instance (e.g., new
AxiosHeaders(config.headers)) or treating config.headers as AxiosHeaders and
using its .set()/.toJSON() methods before assigning to outgoing requests; update
the interceptor code where axios.interceptors.request.use (or the function
handling config) mutates headers to use AxiosHeaders APIs instead of
plain-object casts.
- Around line 89-91: The overrides list uses caret ranges for
"serialize-javascript", "brace-expansion", and "picomatch", which allows semver
variation; update the package.json overrides to pin these three packages to
exact versions (remove the leading ^ and set the specific resolved version
numbers) so installs are deterministic and match the CVE remediation; ensure
format matches the existing "braces" entry and run a fresh lockfile update
afterwards to lock transitive deps.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 60c2bb25-c4f6-4704-b527-c49e7794f9b7
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json



Story details: https://app.shortcut.com/addsearch/story/13928
Summary by CodeRabbit