Skip to content

fix(deps): remediate axios advisories via override to ^1.18.1 - #1142

Open
Isaac-kps wants to merge 1 commit into
masterfrom
fix/axios-vulnerability-override
Open

fix(deps): remediate axios advisories via override to ^1.18.1#1142
Isaac-kps wants to merge 1 commit into
masterfrom
fix/axios-vulnerability-override

Conversation

@Isaac-kps

@Isaac-kps Isaac-kps commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

axios was present only transitively at vulnerable versions — the hoisted axios@0.27.2 (via @govtechsg/address-identity-resolver / axios-extensions), plus several 1.x copies < 1.16.0 (via @tradetrust-tt/*, dnsprove, tt-verify, synpress). These trigger a large set of high-severity GHSA advisories: SSRF, prototype-pollution gadgets, proxy-auth credential leakage, ReDoS, and DoS.

Because every axios copy is transitive, npm audit reports fixAvailable: false — the only remediation is a package.json overrides entry.

Changes

  • axios^1.18.1 (override). Clears every axios advisory; the safe floor per the advisory ranges is >= 1.16.0.
  • axios-extensions^4.0.0 (override). v3.1.6 deep-imports axios/lib/helpers/buildURL, which axios 1.x blocks via its exports field — this breaks the webpack build. v4 drops the deep import, declares peerDependencies: { axios: '>=1.0.0' }, and exposes the identical API (Cache, cacheAdapterEnhancer, retryAdapterEnhancer, throttleAdapterEnhancer).

After the fix, every nested axios collapses to a single axios@1.18.1 and npm audit no longer flags axios.

Verification

  • npm run check-types (tsc) — ✅ pass
  • npm run lint — ✅ pass
  • npm run build (production webpack) — ✅ pass
  • npm test (jest) — ✅ 488/488 tests pass
  • npm audit — axios no longer listed

Scope note: the remaining (non-axios) advisories from the broader dependency triage are intentionally out of scope for this PR.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated dependency version pins for axios and axios-extensions to ensure more consistent builds and installs.

axios was pulled in transitively at vulnerable versions (notably the
hoisted axios@0.27.2, plus several 1.x copies < 1.16.0), triggering a
large set of high-severity GHSA advisories (SSRF, prototype-pollution
gadgets, proxy-auth leakage, ReDoS, DoS). npm audit reported
fixAvailable:false because every copy is transitive, so the remediation
is a package.json override.

- Override axios to ^1.18.1 (clears all axios advisories; safe floor is
  >=1.16.0 per the advisory ranges).
- Override axios-extensions to ^4.0.0: v3.1.6 deep-imports
  axios/lib/helpers/buildURL, which axios 1.x blocks via its exports
  field, breaking the webpack build. v4 drops the deep import, peers
  axios>=1.0.0, and exposes the identical API surface.

Verified: check-types, lint, production webpack build, and the full
jest suite (488/488) all pass; npm audit no longer flags axios.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for reference-implementation ready!

Name Link
🔨 Latest commit 1915a5d
🔍 Latest deploy log https://app.netlify.com/projects/reference-implementation/deploys/6a3bb438f15c990008f4363c
😎 Deploy Preview https://deploy-preview-1142--reference-implementation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3c4dacf9-cd44-44ac-a5a4-50456de8d6fa

📥 Commits

Reviewing files that changed from the base of the PR and between 9659277 and 1915a5d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Walkthrough

Two entries are added to the overrides section of package.json, pinning axios to ^1.18.1 and axios-extensions to ^4.0.0. No code, types, or exported entities are changed.

Changes

Dependency Version Overrides

Layer / File(s) Summary
Pin axios and axios-extensions versions
package.json
Adds axios: ^1.18.1 and axios-extensions: ^4.0.0 to the overrides section to force specific resolved versions of these packages.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 Two little packages, pinned just right,
axios and its friend locked tight.
No drifting versions, no surprise,
the overrides field keeps them wise.
Hippity-hop, the lockfile's bright! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: remediating axios advisories with package overrides.
Description check ✅ Passed The description follows the template with Summary and Changes, and adds useful Verification, but omits the Issues section.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/axios-vulnerability-override

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for tradetrust-dev ready!

Name Link
🔨 Latest commit 1915a5d
🔍 Latest deploy log https://app.netlify.com/projects/tradetrust-dev/deploys/6a3bb43a41bb050008157a62
😎 Deploy Preview https://deploy-preview-1142--tradetrust-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

2 participants