Skip to content

Bump the axios resolution of the wazuh plugin to 1.18.1 and Node.js to 22.23.4 - #9666

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

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

Conversation

@yenienserrano

@yenienserrano yenienserrano commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Description

Companion to wazuh/wazuh-dashboard#1771, which bumps axios to 1.18.1 in the Wazuh dashboard 5.0.0 platform. The wazuh plugin (plugins/main) pins axios to 1.15.2 through resolutions, which forces the version used by its own dependency tree (swagger-client → @swagger-api/apidom-reference, which already requests axios@^1.16.0) and by the browser bundle that compiles the public/ imports. This PR aligns that pin with the platform.

Related to wazuh/wazuh-dashboard#1770

Proposed Changes

  • Bump the axios resolution in plugins/main/package.json from 1.15.2 to 1.18.1, the version shipped by the platform, OpenSearch Dashboards 3.8.0+ and the 4.14.x line.
  • Regenerate plugins/main/yarn.lock: axios 1.18.1, with its new follow-redirects@^1.16.0 (pinned to 1.16.0, matching the platform, instead of the newest 1.16.3 released this month) and https-proxy-agent@^5.0.1 (already present at 5.0.1) requirements.
  • No source code changes. The axios APIs used by the plugin (axios(config), axios.CancelToken.source(), axios.isAxiosError(), AxiosError/AxiosResponse types) are unchanged in 1.18.1.
  • wazuh-core and wazuh-check-updates don't declare axios; they resolve it from the platform, so they're covered by Bump axios to 1.18.1 wazuh-dashboard#1771.
  • Bump the pinned Node.js version from 22.22.0 to 22.23.4 in .nvmrc, matching the Wazuh dashboard 5.0.0 platform (Upgrade Node.js to 22.23.4 wazuh-dashboard#1755). The linter workflows read it through node-version-file, and the docs that mention it (CLAUDE.md, plugins/wazuh-ai-assistant/README.md) are updated. The docker/osd-dev environment already derives NODE_VERSION from the platform base's .nvmrc.
  • No CHANGELOG entry: the pinned axios only feeds the build-time dependency tree (swagger-client is a dev dependency) and is not installed in the production plugin package, and the bundled Node.js runtime change is already recorded in the platform changelog.

Results and Evidence

Resolved lockfile entries in plugins/main/yarn.lock:

axios@1.18.1, axios@^1.16.0:
  version "1.18.1"
follow-redirects@^1.16.0:
  version "1.16.0"
https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
  version "5.0.1"

Lockfile is consistent:

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

axios APIs used by the plugin are available in the installed version:

$ node -e "const a=require('axios');console.log(a.VERSION, typeof a.CancelToken.source, typeof a.isAxiosError, typeof a.AxiosError)"
1.18.1 function function function

Before this change the compiled browser bundle (target/public/wazuh.plugin.js) embeds VERSION = "1.15.2", taken from this pinned copy.

Artifacts Affected

  • wazuh plugin browser bundle (the axios copy compiled from the public/ imports).

Configuration Changes

None.

Documentation Updates

None.

Tests Introduced

None. Dependency bump with no source changes; the existing unit tests mock axios.

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)
  • Rebuild the plugin and verify the API requests (request-handler.js) and error handling work in the dev environment

🤖 Generated with Claude Code

Align the pinned axios version with the Wazuh dashboard platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
@yenienserrano yenienserrano linked an issue Nov 17, 2026 that may be closed by this pull request
7 tasks
@yenienserrano
yenienserrano marked this pull request as ready for review November 17, 2026 19:12
Match the Node.js version of the Wazuh dashboard 5.0.0 platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
@yenienserrano yenienserrano changed the title Bump the axios resolution of the wazuh plugin to 1.18.1 Bump the axios resolution of the wazuh plugin to 1.18.1 and Node.js to 22.23.4 Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor
Wazuh Core plugin code coverage (Jest) test % values
Statements 55.62% ( 613 / 1102 )
Branches 49.75% ( 302 / 607 )
Functions 45.86% ( 122 / 266 )
Lines 55.54% ( 606 / 1091 )

@github-actions

Copy link
Copy Markdown
Contributor
Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 86.68% ( 1243 / 1434 )
Branches 72.81% ( 742 / 1019 )
Functions 88.95% ( 306 / 344 )
Lines 86.49% ( 1217 / 1407 )

@github-actions

Copy link
Copy Markdown
Contributor
Wazuh AI Assistant plugin code coverage (Jest) test % values
Statements 90.97% ( 7381 / 8113 )
Branches 85.73% ( 5054 / 5895 )
Functions 92.09% ( 1457 / 1582 )
Lines 91.06% ( 7255 / 7967 )

@github-actions

Copy link
Copy Markdown
Contributor
Main plugin code coverage (Jest) test % values
Statements 37.55% ( 11557 / 30775 )
Branches 31.55% ( 6192 / 19621 )
Functions 38.05% ( 2835 / 7450 )
Lines 37.98% ( 11258 / 29638 )

@rodrigofez
rodrigofez self-requested a review November 17, 2026 19:59
@rodrigofez

Copy link
Copy Markdown
Member

Approve: the wazuh plugin's axios pin matches the platform's 1.18.1, and requests and errors still work.

Tested f75c5e2 on the 5.0.0 dev stack (OSD 3.6.0), as admin. Bundle rebuilt and checked: wazuh.plugin.js embeds axios 1.18.1.

Requirements

  • 🟢 Pin plugins/main axios to 1.18.1 (package.json, yarn.lock with one entry, --frozen-lockfile clean).
  • 🟢 Requests and error handling still work (Server management > Dev Tools: 200 and 404 render as before; Agents management > Summary loads).
  • 🟢 Node pinned to 22.23.4, same as the wazuh-dashboard 5.0.0 .nvmrc.

Follow-up (not blocking)

  • dependency-review fails: axios@1.18.1 has 12 advisories (7 high, 5 moderate) fixed in 1.20.0. Reach is low here (the browser uses the XHR adapter; Node only at build time). Consider 1.21.1 (npm audit clean, same APIs) here and in Bump axios to 1.18.1 wazuh-dashboard#1771.

Before / after

Screen Before After
Server management > Dev Tools, GET /agents?limit=1&select=id,name: 200 Dev Tools 200 · after
Server management > Dev Tools, GET /agents/999: 404 body and status Dev Tools 404 · after
Checks
  • yarn install --frozen-lockfile --ignore-scripts (plugins/main): clean, axios 1.18.1, follow-redirects 1.16.0.
  • yarn test:jest --runInBand on the axios callers (request-handler, wz-request, generic-request, wz-api-check, error-handler, error-factory, wazuh-api): 8 suites, 73 passed, 27 skipped.
  • CI: Prettier pass, unit tests pass, dependency-review fail (see follow-up).
  • Not tested: wazuh-core and wazuh-check-updates on the bumped platform (needs Bump axios to 1.18.1 wazuh-dashboard#1771).

@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: the wazuh plugin's axios pin matches the platform's 1.18.1, and requests and errors still work. Details: #9666 (comment)

@rodrigofez rodrigofez mentioned this pull request Nov 17, 2026
6 of 11 tasks
@Ripdiegozz

Copy link
Copy Markdown
Contributor

Checks run

Tested f75c5e2 together with wazuh/wazuh-dashboard#1771 (b46befd) on the 5.0.0 dev stack
(--base --all-forks), as admin. The terminal captures are real sessions, unedited. Before is
the base of the PR (d66678f).

Check Before After
🟢 plugins/main pins axios 1.18.1, with one lockfile entry; Node.js 22.23.4, same as the platform .nvmrc deps before deps head
🟢 One axios copy installed in plugins/main, 1.18.1; the container runs Node.js 22.23.4 1.15.2, pinned on the base deps installed
🟢 Unit tests of the axios callers (request handler, WzRequest, GenericRequest, API check, error management, Dev Tools response handler, server routes): 12 suites, 85 tests; the 3 skipped suites are describe.skip on the base too Same unit tests
🟢 The browser bundle, rebuilt without the optimizer cache, embeds axios 1.18.1 1.15.2, pinned on the base bundle
🟢 Server management > Dev Tools from the browser: GET /agents?select=id,name,status 200 Same dev tools 200
🟢 Server management > Dev Tools: GET /agents/999 shows the 404 status and body Same dev tools 404

@Ripdiegozz Ripdiegozz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve: the wazuh plugin pins axios 1.18.1, its browser bundle embeds it, and Dev Tools requests and errors work from the UI. Details: #9666 (comment)

@asteriscos
asteriscos merged commit 24e0ddc into 5.0.0 Nov 18, 2026
6 of 8 checks passed
@asteriscos
asteriscos deleted the change/1770-bump-axios-to-1-18-1 branch November 18, 2026 09:52
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