Skip to content

fix(deps): bump axios to 1.20.0 and patch vulnerable transitive deps - #308

Merged
aviadhahami merged 1 commit into
masterfrom
fix/security-scan-vulns
Oct 11, 2026
Merged

aviadhahami merged 1 commit into
masterfrom
fix/security-scan-vulns

Conversation

@aviadhahami

Copy link
Copy Markdown
Collaborator

Why

The Vulnerability Scan job fails on master. Grype reports 35 matches, all in runtime dependencies:

axios@1.20.0 is the only release that clears all 34 axios advisories. It is the highest first-patched version among them and the current npm latest.

What changes

package.json: the only change is axios ^1.13.6 → ^1.20.0. It adds no overrides, no resolutions and no new direct dependencies, and leaves engines alone. Raising the floor matters because consumers never see this lockfile; only the range reaches them.

Scope Package Before → after Why
runtime axios 1.13.6 → 1.20.0 34 advisories
runtime follow-redirects 1.15.11 → 1.16.1 GHSA-r4q5-vmmm-2653; required by axios ^1.16.0
runtime proxy-from-env 1.1.0 → 2.1.0 required by axios ^2.1.0 (transitive major)
runtime https-proxy-agent, agent-base new: 5.0.1, 6.0.2 new axios dependencies
dev @babel/core (+ @babel/*) 7.22.9 → 7.29.7 GHSA-4x5r-pxfx-6jf8
dev js-yaml 3.14.2 → 3.15.2, 4.1.1 → 4.3.2 4 advisories
dev brace-expansion 1.1.11 → 1.1.21, 2.0.1 → 2.1.7 several DoS advisories
dev picomatch, diff, ajv, underscore 2.3.2, 5.2.2, 6.15.0, 1.13.8 npm audit
dev browserslist, node-releases, jsesc, … 4.28.2, 2.0.44, 3.1.0, … pulled in by the @babel bump

Version compliance

Nothing moves outside the versions we already support:

  • No major bump of any direct dependency. The two transitive majors (proxy-from-env 2, jsesc 3) are required by the declared ranges of in-range parents.
  • All 470 dependency edges in the lockfile resolve inside their declared ranges.
  • No locked dependency declares engines that exclude a CI-matrix Node version (16, 18, 20, 22, 23, 24). The only exclusion in the lockfile is our own node-vault >= 18.0.0 against Node 16, and master has it too.
  • browserslist is held at 4.28.2 on purpose. Every patched release (≥ 4.28.7) needs node-releases ≥ 2.0.51, and node-releases 2.0.45+ declares node >=18.
  • npm ci and npm install leave the lockfile byte-identical under npm 8.6 through 11.19.

Verification (local; CI on this PR is the final word)

Check master this PR
Grype 0.110.0 (the version anchore/scan-action@v7 pins), and 0.120.1 35 matches, exit 2 0 matches, exit 0
npm audit --omit=dev 2 0
npm audit (incl. dev) 19 (2 low, 7 mod, 10 high) 12 (7 mod, 5 high, all dev)
Lint (Node 18) 0 errors, 8 warnings same
Tests in the repo Dockerfile vs Vault, Node 16 / 18 / 20 / 22 / 23 / 24 101 passing 101 passing on every version, identical coverage

Only the 2 integration tests exercise real axios; the unit tests stub requests. A separate probe compared master and this branch on Node 16, 18, 20, 22 and 24 across 52 scenarios: token and namespace headers, TLS (strictSSL, CA, mTLS), Vault HA 307 redirects, proxies and timeouts. Without a proxy the behaviour is identical. TypeScript consumers of index.d.ts still type-check against the axios 1.20 types.

What users may notice (axios 1.14 → 1.20)

A fresh npm install node-vault@0.12.0 already resolves axios 1.20.0 today, because ^1.13.6 allows it. None of the following is new for consumers on a fresh install; it is listed so it can go into the release notes.

  • HTTPS through HTTPS_PROXY is now a CONNECT tunnel with end-to-end TLS, so the proxy no longer sees X-Vault-Token.

    • The proxy must allow CONNECT to Vault's port. Squid's default SSL_ports blocks 8200, and the refusal surfaces as ApiResponseError: Status 403.
    • Vault's certificate must now be trusted via node-vault's ca / strictSSL options rather than by the proxy.
  • npm_config_*proxy variables are no longer honoured. NO_PROXY now matches loopback aliases and CIDR ranges.

  • Header values are sanitised. A token with a trailing newline used to throw ERR_INVALID_CHAR; it now works.

  • Known limitation (upstream: https-proxy-agent 5.0.1): if the HTTPS proxy closes the connection or never answers CONNECT, the request never settles, and timeout does not fire. Two workarounds:

    • put the Vault host in NO_PROXY;
    • set requestOptions.agentOptions.timeout, which bounds the CONNECT phase.

    A proper fix (passing signal: AbortSignal.timeout(timeout) in the request wrapper) is a follow-up code change, kept out of this dependency PR.

  • Redirect behaviour is unchanged. X-Vault-Token and X-Vault-Namespace still follow cross-host 307s, which Vault HA standby redirects rely on. GHSA-r4q5-vmmm-2653 clears because the version no longer matches. The underlying fix in follow-redirects is opt-in (sensitiveHeaders), and node-vault does not opt in yet, so that exposure remains until a follow-up.

Still open (all dev-only, not in the published package)

Package Advisory Why it is not fixed here
browserslist 4.28.2 GHSA-73wf-gq98-2v4g, GHSA-c83g-rgw3-j3cx the fix needs node-releases that declares node >=18; CI tests Node 16
serialize-javascript 6.0.2 GHSA-5c6j-r48x-rmvq, GHSA-qj8w-gfj5-8c6v the fix needs mocha@12 (Node ^20.19 || >=22.12) or an override to 7.x (node >=20)
uuid 8.3.2 GHSA-w5hq-g745-h8pq the fix needs nyc@18 (Node 20 || >=22)
braces 3.0.3 GHSA-vfj7-8cjw-p6xm no patched release exists
sprintf-js 1.0.3 GHSA-hp3w-g68c-fv3c no patched release exists; nyc@18 still pulls it in

Dependabot alerts go from 54 to 5 open, all development. The 8 CodeQL alerts (logging, the certificate-validation option, workflow permissions) need source changes and belong in a separate PR.

Supersedes

After merge

  • Merging publishes nothing: the lockfile is not published, and publish.yaml only releases when package.json's version changes. To ship the ^1.20.0 floor, run Update Version (patch → 0.12.1).
  • The 35 Grype code-scanning alerts close on the post-merge scan of master.
  • Suggested follow-ups:
    • drop Node 16 from the matrix (it is already below our >= 18 floor), which unblocks browserslist;
    • then drop Node 18, which unblocks mocha@12 / nyc@18;
    • the proxy-timeout signal and the sensitiveHeaders opt-in;
    • the CodeQL findings;
    • .github/dependabot.yml, whose package-ecosystem is empty.

🤖 Generated with Claude Code

Resolves all 35 findings of the failing Grype "Vulnerability Scan" on
master: 34 axios advisories against 1.13.6 and GHSA-r4q5-vmmm-2653
against follow-redirects 1.15.11. Also takes every dev-only fix that
stays within the existing semver ranges and Node support.

package.json: axios ^1.13.6 -> ^1.20.0 (the only change).

Runtime lockfile:
- axios 1.13.6 -> 1.20.0
- follow-redirects 1.15.11 -> 1.16.1
- proxy-from-env 1.1.0 -> 2.1.0 (required by axios ^2.1.0)
- new: https-proxy-agent 5.0.1, agent-base 6.0.2 (required by axios)

Dev lockfile (all within the existing ranges):
- @babel/* 7.2x -> 7.29.x (@babel/core 7.22.9 -> 7.29.7)
- brace-expansion 1.1.11 -> 1.1.21, 2.0.1 -> 2.1.7
- js-yaml 3.14.2 -> 3.15.2, 4.1.1 -> 4.3.2
- picomatch 2.3.1 -> 2.3.2, diff 5.2.0 -> 5.2.2
- ajv 6.12.6 -> 6.15.0, underscore 1.13.6 -> 1.13.8
- browserslist 4.21.9 -> 4.28.2, node-releases 2.0.13 -> 2.0.44,
  jsesc 2.5.2 -> 3.1.0 (required by @babel/generator ^3.0.2), plus
  caniuse-lite, electron-to-chromium, update-browserslist-db and
  @jridgewell/* refreshes and the helper packages they add or remove

No overrides, no major bump of a direct dependency, and every locked
dependency's engines field admits every Node version in the CI matrix
(16, 18, 20, 22, 23, 24). browserslist is held at 4.28.2 because every
patched release needs node-releases >= 2.0.45, which declares node >=18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant