Skip to content

Bump axios to 1.18.1 - #1771

Merged
asteriscos merged 1 commit into
5.0.0from
change/1770-bump-axios-to-1-18-1
Nov 18, 2026
Merged

asteriscos merged 1 commit into
5.0.0from
change/1770-bump-axios-to-1-18-1

Conversation

@yenienserrano

Copy link
Copy Markdown
Member

Description

The 5.0.0 platform still resolves axios to 1.13.5, inherited from its OpenSearch Dashboards 3.6.0 base. Upstream OpenSearch Dashboards 3.8.0/3.9.0 and our 4.14.13 line already ship axios 1.18.1. This PR aligns 5.0.0 with them, following the same dependency-only path upstream took (opensearch-project#11721, opensearch-project#11863, opensearch-project#12159, opensearch-project#12432).

The Wazuh plugins that use axios on the server without declaring it (wazuh-core, wazuh-check-updates) resolve it from the platform's node_modules, so they pick up the new version too.

Closes #1770

Proposed Changes

  • Bump axios from ^1.13.3 to ^1.18.1 in packages/osd-dev-utils and packages/osd-ui-shared-deps.
  • Remove the unused wait-on root dependency (also removed upstream in chore(deps): upgrade axios from 1.15.2 to 1.17.0 opensearch-project/OpenSearch-Dashboards#12159). It pulled its own axios copy plus joi, @sideway/address, and rxjs@7 into the lockfile.
  • Raise the **/follow-redirects and **/form-data resolutions to ^1.16.0 and ^4.0.6. The previous resolutions (^1.15.4 and ^4.0.4) kept them at 1.15.11 and 4.0.4, which are below the versions axios 1.18.1 requires (^1.16.0 and ^4.0.5). The new versions match OSD 3.9.0 and 4.14.13.
  • Pin the lockfile to axios 1.18.1, follow-redirects 1.16.0, and form-data 4.0.6, the same versions upstream ships, rather than the newest releases (axios 1.21.1 and follow-redirects 1.16.3 are less than two weeks old).
  • Deduplicate chromedriver's axios@^1.6.5 range into the same entry, so the lockfile resolves a single axios copy.
  • No source code changes are needed. The only server-side usage in the platform (src/core/server/rendering/rendering_service.tsx, branding URL validation) uses the stable axios.get API with httpsAgent, adapter: 'http', and maxRedirects: 0.

Results and Evidence

Resolved lockfile entries:

axios@^1.18.1, axios@^1.6.5:
  version "1.18.1"
follow-redirects@^1.0.0, follow-redirects@^1.15.6, follow-redirects@^1.16.0:
  version "1.16.0"
form-data@^3.0.0, form-data@^4.0.0, form-data@^4.0.4, form-data@^4.0.5, form-data@^4.0.6, form-data@~4.0.4:
  version "4.0.6"

Lockfile is consistent and a single axios copy is installed:

$ yarn install --frozen-lockfile --ignore-scripts
Done in 8.71s.

$ find . -path '*/node_modules/axios/package.json' -not -path './plugins/*' | xargs grep -h '"version": "1'
  "version": "1.18.1",

Runtime smoke test of the Node HTTP adapter (the platform's branding URL validation uses maxRedirects: 0):

axios 1.18.1
direct GET: 200
maxRedirects 0 on 302: 302 (not followed)
default redirect follow: 200

Unit tests of the areas that use axios (src/core/server/rendering, packages/osd-dev-utils osd_client / ci_stats_reporter / axios, src/dev/build/lib):

Test Suites: 11 passed, 11 total
Tests:       83 passed, 83 total

yarn typecheck: SUCCESS: No TypeScript errors detected!

Artifacts Affected

  • Wazuh dashboard packages (DEB and RPM): node_modules/axios, node_modules/follow-redirects, and node_modules/form-data are updated.

Configuration Changes

None.

Documentation Updates

None.

Tests Introduced

None. This is a dependency bump with no source changes; the existing tests that cover axios usage pass.

Review Checklist

  • Code changes reviewed
  • Relevant evidence provided
  • Tests cover the new functionality
  • Configuration changes documented
  • Developer documentation reflects the changes
  • Meets requirements and/or definition of done
  • No unresolved dependencies with other issues
  • PR is linked to the relevant issue(s)
  • Correct labels applied (e.g., no-changelog)
  • Verify the custom logo/mark branding URLs still validate in a built package
  • Verify the wazuh-core Server API client and the wazuh-check-updates CTI registration against a built package

🤖 Generated with Claude Code

Align the platform with OpenSearch Dashboards 3.8.0+ and the 4.14.x line.
Remove the unused wait-on dependency and raise the follow-redirects and
form-data resolutions to the versions axios 1.18.1 requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
@rodrigofez

Copy link
Copy Markdown
Member

Approve: axios resolves to a single 1.18.1 copy, and the branding check, the Server API client and CTI registration still work.

Tested b46befd on the 5.0.0 dev stack (with wazuh/wazuh-dashboard-plugins#9666), as admin. CTI Console mocked with a local HTTP server (wazuh_check_updates.ctiApiUrl).

Requirements

  • 🟢 axios ^1.18.1 in osd-dev-utils and osd-ui-shared-deps.
  • 🟢 wait-on removed (no node_modules/wait-on; the remaining wait-on: lines in .github/workflows are a Cypress action input).
  • 🟢 One axios@1.18.1 installed (follow-redirects 1.16.0, form-data 4.0.6).
  • 🟢 Branding URL check: a remote mark.defaultUrl shows in the header; a logo.defaultUrl that answers 302 is rejected (maxRedirects: 0) and logs logo default URL was not found or invalid. Using default branding.
  • 🟢 wazuh-core Server API client: Server management > Dev Tools GET /agents 200 and GET /agents/999 404 render as before; Agents management > Summary loads.
  • 🟢 wazuh-check-updates CTI registration: POST /api/wazuh-check-updates/cti-registration/token returns the device code from the mock; with the mock down, 503 connect ECONNREFUSED.
  • 🟢 CHANGELOG entry under Changed.

Follow-up (not blocking)

Before / after

Screen Before After
Agents management > Summary, branding.mark.defaultUrl set to a remote SVG: header shows it Remote mark in header · after
Checks
  • yarn install --frozen-lockfile --ignore-scripts: clean; one axios copy, 1.18.1.
  • node scripts/jest --runInBand src/core/server/rendering packages/osd-dev-utils/src/{osd_client,ci_stats_reporter}: 2 suites, 30 passed.
  • CI: lint, build, unit, integration and functional tests pass. Cypress groups 1, 3, 4, 5 fail with Socket closed before the connection was established, the same as on an unrelated PR (fix/7596-hide-healthcheck-task-data). dependency-review fails (see follow-up).

@rodrigofez rodrigofez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve: axios resolves to a single 1.18.1 copy, and the branding check, the Server API client and CTI registration still work. Details: #1771 (comment)

@Ripdiegozz

Copy link
Copy Markdown

Checks run

Tested b46befd on the 5.0.0 dev stack (--base, local manager and indexer from the 2026-11-17
nightly), as admin. The terminal captures are real sessions, unedited. Before is the base of the
PR (bf834ef). The branding check points branding.mark.defaultUrl and branding.logo.defaultUrl
at a mock that answers 200 for /mark.svg and 302 -> /followed.svg for /redirect.svg; the
CTI check points wazuh_check_updates.ctiApiUrl at the same mock, with ctiRegistrationUiEnabled: true.

Check Before After
🟢 One axios copy, 1.18.1, with follow-redirects 1.16.0 and form-data 4.0.6; wait-on is gone deps before deps after
🟢 Unit tests of the axios callers (rendering, osd-dev-utils, osd-test, src/dev/build/lib): 16 suites, 102 tests Same unit tests
🟢 Branding URL check: the remote mark (200) shows in the header Same branding header
🟢 Branding URL check: the 302 logo is rejected and the redirect is not followed (maxRedirects: 0); there's no UI for it, so the evidence is the mock and server logs Same branding
🟢 wazuh-core Server API client, from Server management > Dev Tools: GET /agents?select=id,name,status 200 Same dev tools 200
🟢 wazuh-core Server API client, from Server management > Dev Tools: GET /agents/999 shows the 404 status and body Same dev tools 404
🟢 wazuh-check-updates CTI registration (CTI feed > Register): the user code from the mock Same cti registered
🟢 wazuh-check-updates CTI registration with the mock down: Registration Error (503) Same cti mock down
🟢 Agents management > Summary loads the agents through the Server API client Same agents summary

@Ripdiegozz Ripdiegozz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve: one axios 1.18.1 copy, and the branding check, the Server API client and the CTI registration work from the UI. Details: #1771 (comment)

@asteriscos
asteriscos merged commit a8e497c into 5.0.0 Nov 18, 2026
37 of 42 checks passed
@asteriscos
asteriscos deleted the change/1770-bump-axios-to-1-18-1 branch November 18, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump axios to 1.18.1 in 5.0.0

4 participants