Skip to content

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

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#248
Isaac-kps wants to merge 1 commit into
masterfrom
fix/axios-vulnerability-override

Conversation

@Isaac-kps

Copy link
Copy Markdown

Summary

axios was present only transitively at vulnerable versions — the hoisted axios@0.27.2 (via @govtechsg/tradetrust-ui-components@govtechsg/address-identity-resolver / axios-extensions), plus 1.x copies < 1.16.0 (via @tradetrust-tt/tt-verify and dnsprove). 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; 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, blocked by axios 1.x's exports field. v4 drops the deep import and exposes the identical API.
  • util^0.12.5 (devDependency). axios-extensions@3 transitively provided the util polyfill that @tradetrust-tt/tt-verify's ESM build relies on under webpack; v4 dropped that dependency, so it is declared explicitly to keep the Docusaurus build resolving. (tradetrust-website already declares util for the same reason.)

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

Verification

  • npm run build (Docusaurus production build) — ✅ [SUCCESS] Generated static files
  • npm audit — axios no longer listed
  • Confirmed against a clean master build to isolate the util regression introduced by the axios-extensions major bump (the lone rdf-canonize-native warning is pre-existing and benign).

🤖 Generated with Claude Code

axios was pulled in transitively at vulnerable versions (the hoisted
axios@0.27.2 via @govtechsg/address-identity-resolver, plus 1.x copies
< 1.16.0 via tt-verify/dnsprove), triggering a large set of
high-severity GHSA advisories. npm audit reported fixAvailable:false
because every copy is transitive, so the remediation is an override.

- Override axios to ^1.18.1 (clears all axios advisories).
- Override axios-extensions to ^4.0.0: v3.1.6 deep-imports
  axios/lib/helpers/buildURL, blocked by axios 1.x's exports field. v4
  drops the deep import and exposes the identical API.
- Add util ^0.12.5 to devDependencies: axios-extensions@3 transitively
  provided the `util` polyfill that @tradetrust-tt/tt-verify's ESM build
  relies on; v4 dropped that dependency, so declare it explicitly to
  keep the Docusaurus webpack build resolving (tradetrust-website
  already declares util for the same reason).

Verified: docusaurus production build succeeds; npm audit no longer
flags axios.

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

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Isaac-kps, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 49 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 469e2daa-ee13-41db-8e19-18913f080843

📥 Commits

Reviewing files that changed from the base of the PR and between f04f6e8 and 0005513.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json
✨ 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.

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