Skip to content

fix(deps): bump ws to ~8.20.1 (CVE-2026-45736)#23

Merged
ashiramin merged 1 commit into
axonfrom
aa/bump-ws-8.20
May 19, 2026
Merged

fix(deps): bump ws to ~8.20.1 (CVE-2026-45736)#23
ashiramin merged 1 commit into
axonfrom
aa/bump-ws-8.20

Conversation

@ashiramin

Copy link
Copy Markdown
Contributor

Why

Trivy on the cortex-axon-agent image flagged usr/local/snyk-broker/node_modules/ws@8.18.3 for CVE-2026-45736, fixable in ws@8.20.1. Surfaced during work on cortexapps/axon#104 — the underlying CVE was always present in this fork's published artifact; axon's :main Trivy scan was missing it because it filters to CRITICAL/HIGH only, while the PR-side scan in docker.yml flags any severity.

What

Replace the existing scoped engine.io-client.ws override with a top-level ws override. npm ls ws before this change:

├─┬ engine.io-client@6.6.4
│ └── ws@8.20.1 overridden     ← scoped override worked
└─┬ engine.io@6.6.6
  └── ws@8.18.3                ← but engine.io was not covered

After:

├─┬ engine.io-client@6.6.4
│ └── ws@8.20.1 overridden
└─┬ engine.io@6.6.6
  └── ws@8.20.1 deduped

Top-level vs scoped: chose top-level so any future package that pulls ws transitively also lands on the patched version without another override edit.

Verification

  • npm ls ws → both resolutions are 8.20.1
  • trivy fs --severity CRITICAL,HIGH,MEDIUM --ignore-unfixed against the post-install tree → CVE-2026-45736 no longer reported

Follow-up

After this merges and a new v1.0.14-axon tag (or whatever the next axon-tag cadence dictates) is cut, cortexapps/axon#104 will bump SNYK_BROKER_VERSION to consume it.

🤖 Generated with Claude Code

Trivy on the cortex-axon-agent image flagged usr/local/snyk-broker/node_modules/ws
at 8.18.3 — CVE-2026-45736, fixable in 8.20.1.

Switching the existing scoped `engine.io-client.ws` override to a top-level
`ws` override so both transitive instances (engine.io-client and engine.io)
resolve to the patched version. `npm ls ws` confirms both resolutions are now
8.20.1; local `trivy fs` against this tree no longer reports CVE-2026-45736.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ashiramin ashiramin requested a review from shawnburke May 19, 2026 18:29
@ashiramin ashiramin merged commit 7e0ed6b into axon May 19, 2026
2 checks passed
@ashiramin ashiramin deleted the aa/bump-ws-8.20 branch May 19, 2026 22:55
ashiramin added a commit to cortexapps/axon that referenced this pull request May 19, 2026
cortexapps/snyk-broker#23 promoted the `engine.io-client.ws` scoped override
to a top-level `ws` override so both engine.io and engine.io-client resolve
to the patched 8.20.1. The tag v1.0.14-axon carries that change.

Verified pre-merge by building a minimal node:20-slim image with the local
package files: ws resolves to 8.20.1 in node_modules; trivy image scan no
longer reports CVE-2026-45736.

Combined with the APT_CACHE_BUST in the prior commit, this clears every
finding from today's failing :main Trivy scan (11 OS packages + ws).
ashiramin added a commit to cortexapps/axon that referenced this pull request May 21, 2026
…ns (#104)

* Add APT_CACHE_BUST ARG so the apt layer can be refreshed without pinning

When the scheduled Trivy scan flags OS-package CVEs on :main, the underlying
cause is that buildx's layer cache for the apt RUN hashes only on the
Dockerfile text — same text → same cached layer → `apt-get update` never
re-fetches from the archive even though the RUN explicitly calls it.

PRs #99 and #102 worked around this by pinning specific transitive packages
(libngtcp2, libnghttp2). The pin invalidated the cache as a side effect of
changing Dockerfile text, but locks the build to a single archive version
that ages out. PR #99 deferred a cleaner fix; this is that fix.

ARG APT_CACHE_BUST is declared right before the apt RUN and referenced
inside it. Buildx folds the ARG value into the layer's cache key, so bumping
the value (a one-line PR) invalidates only this layer — other layers (Go
build, npm install, snyk-broker clone) keep hitting cache as before.

Today's value (2026-05-19) also fixes today's failing :main scan: merging
this PR is itself an ARG bump, so the apt layer rebuilds, fresh packages
land, the next Trivy scan passes.

* Bump SNYK_BROKER_VERSION to v1.0.14-axon for ws CVE-2026-45736

cortexapps/snyk-broker#23 promoted the `engine.io-client.ws` scoped override
to a top-level `ws` override so both engine.io and engine.io-client resolve
to the patched 8.20.1. The tag v1.0.14-axon carries that change.

Verified pre-merge by building a minimal node:20-slim image with the local
package files: ws resolves to 8.20.1 in node_modules; trivy image scan no
longer reports CVE-2026-45736.

Combined with the APT_CACHE_BUST in the prior commit, this clears every
finding from today's failing :main Trivy scan (11 OS packages + ws).

* Remove libngtcp2/libnghttp2 hard pins now that APT_CACHE_BUST is in place

The pins were added in #99/#102 because the buildx cache was serving stale
apt layers — explicit versions invalidated the cache as a side effect and
guaranteed the patched packages landed. With APT_CACHE_BUST now driving cache
invalidation explicitly, `apt-get upgrade -y` pulls the current patched
versions transitively via wget → libcurl3-gnutls, no pin required.

Keeping the pins past this point has a cost: they prevent apt from picking up
future Debian point releases (e.g. a hypothetical libnghttp2 deb13u2 patch),
and they break the build if the pinned version ages out of the archive. Now
that the cache mechanism is the actual fix, the pins are redundant belt-on-belt.

Validated by the trivy-pr scan on this PR — if removal regresses
CVE-2026-40170 or CVE-2026-27135, trivy-pr will flag it before merge.
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