Skip to content

fix(deps): update hono, @hono/node-server, fast-xml-parser, npm and Debian packages in the runtime image - #9107

Merged
patmmccann merged 1 commit into
adcontextprotocol:mainfrom
patmmccann:agent/update-vulnerable-image-deps
Nov 19, 2026
Merged

patmmccann merged 1 commit into
adcontextprotocol:mainfrom
patmmccann:agent/update-vulnerable-image-deps

Conversation

@patmmccann

Copy link
Copy Markdown
Collaborator

🤖 This PR was written by an AI agent (Claude Code) on behalf of @patmmccann.

Closes #9106

Summary

Updates what is still vulnerable in the runtime image on main: three npm dependencies, the npm that ships with the base image, and two Debian packages. Everything else that prebid/salesagent#2570 patches into its copy of this image is already fixed on main.

npm dependencies (package.json override plus package-lock.json):

Package Before After Advisories fixed
@hono/node-server (root overrides entry) 2.0.12 2.1.9 GHSA-rmxm-3fg6-px4f, GHSA-qv5m-9pm6-hqp3, GHSA-jpvv-r467-5p4w
hono 4.13.13 4.13.19 GHSA-4m76-xfj5-7975, GHSA-h7mg-cq63-vhpq, GHSA-46wx-v44x-9hh2, GHSA-4h7h-rv7c-7m2v, GHSA-3gg2-335m-rxc6
fast-xml-parser (via @google-cloud/storage) 5.7.3 5.12.1 GHSA-474x-hrwr-fgx4
  • @hono/node-server was already pinned by an override, because @modelcontextprotocol/node still declares ^1.19.9 while @modelcontextprotocol/sdk uses 2.x. This raises that override within 2.x. No other override is added or changed.
  • hono and fast-xml-parser are lockfile-only updates within their dependents' ranges. The Mintlify scraper (dev only) pins fast-xml-parser to exactly 5.7.3, so npm now nests that copy under @mintlify/* and the production copy moves to 5.12.1. That brings in is-unsafe and newer @nodable/entities, fast-xml-builder and strnum.
  • Lockfile regenerated with npm 11.21.3. No package moves to a lower version.

Dockerfile, runtime stage:

  • apt-get upgrade in the existing apt-get step. The pinned node:24.22.1-bookworm-slim digest has apt/libapt-pkg6.0 2.6.1 (CVE-2026-109518, fixed in 2.6.2) and tzdata 2026c (DLA-4854-1, DLA-4867-1, fixed in 2026f). Dependabot does not watch the Docker digest, so the upgrade keeps the image current between digest bumps.
  • npm install -g npm@11.21.3 before npm ci. Node 24.22.1 bundles npm 11.19.1, whose own dependencies include undici 6.28.0, ip-address 10.5.0, brace-expansion 5.0.9 and postcss-selector-parser 7.1.4, all with published fixes. npm 11.21.3 bundles undici 6.29.1, ip-address 10.7.5, brace-expansion 5.0.12 and postcss-selector-parser 7.1.6. The builder stage is unchanged because it is not shipped.

Out of scope: npm's bundled glob 13.0.6 and minimatch 10.2.5 (no npm release bundles the fixed majors yet), and the dev-only entries in the full npm audit (Mintlify CLI, c8), which the runtime stage does not install.

How this was checked

  • npm audit --omit=dev: 5 entries on main (1 low, 4 moderate), 0 on this branch.
  • Full npm audit: 36 on main, 31 on this branch. All 31 left are dev-only.
  • Compared every lockfile entry against main: only the packages listed above change, and none moves to a lower version.
  • npm ci with npm 11.21.3, then npm run typecheck and npm run build. Both pass.
  • The pre-commit hook was skipped for this commit (--no-verify, approved by the maintainer). On the Windows machine used, test:unit fails on 5 tests that also fail on unmodified main there: runtime-artifact-deduplication (2 tests: symlink EPERM and file-permission checks), fixed-trace-rollout-typecheck-wiring (1, child process exit status is null) and ipr-check-and-record (2 git-race tests time out). The hook stops at that step. test:test-dynamic-imports, test:format-identity-boundaries and test:callapi-state-change were run separately and pass. The Linux CI on this PR is the real gate for the unit and server suites.
  • Bundled versions: read from the published npm 11.19.1 and 11.21.3 tarballs.
  • Debian versions: read from the dpkg status in the pinned base digest's amd64 layers, and compared with the bookworm-security index.
  • Docker is not available on the machine this was written on, so the image build is left to CI. A Dockerfile change triggers the migration smoke test, which builds it.

🤖 Generated with Claude Code

…ebian packages in the runtime image

The runtime image on main still ships packages with published fixes:

- hono 4.13.13 -> 4.13.19 and fast-xml-parser 5.7.3 -> 5.12.1, lockfile
  updates within their dependents' ranges (the dev-only Mintlify scraper
  keeps its exact 5.7.3 pin as a nested copy)
- @hono/node-server 2.0.12 -> 2.1.9 by raising the existing override
- the runtime stage now runs apt-get upgrade (apt 2.6.2, tzdata 2026f
  are newer than the pinned base digest) and replaces the npm bundled
  with Node 24.22.1 (11.19.1) with 11.21.3, which bundles fixed undici,
  ip-address, brace-expansion and postcss-selector-parser

npm audit --omit=dev goes from 5 entries to 0. Lockfile regenerated with
npm 11.21.3.

Closes adcontextprotocol#9106

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Nov 19, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 094ba42.

Approve preview

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T15:33:25.491807Z 094ba42 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

patmmccann added a commit to patmmccann/salesagent that referenced this pull request Nov 19, 2026
…ndency patch

adcontextprotocol/adcp#9106 asks adcp to update the dependencies this patch
still covers on its main (hono, @hono/node-server, fast-xml-parser, the
bundled npm and the Debian packages), and adcontextprotocol/adcp#9107 does
it. Name both in the patch's comment, the way the other two patches cite
theirs. The comment is outside the function body, so the _PATCHES checksum
and IMAGE_TAG (8d1d3244b2ef-p3516611596) are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@aao-secretariat aao-secretariat Bot 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.

Ladon verdict: Approve

Approve — operational/dependency hardening PR, no protocol surface touched.

This PR modifies only Dockerfile, package.json, and package-lock.json: the runtime stage adds apt-get upgrade for Debian security fixes and pins npm@11.21.3 before npm ci, with lockfile bumps for hono/@hono/node-server/fast-xml-parser.

Checks performed:

  • No published protocol surface touched (static/schemas/source, docs/reference, task defs, dist artifacts, release scripts) — no changeset owed.
  • npm-replacement ordering is correct: patched npm installs before the app build.
  • @hono/node-server override is consistent across package.json and the lockfile; no dependency regresses to a lower version.
  • No hand-edited version in package.json.
  • apt-get upgrade reproducibility tradeoff is deliberate and documented in the PR body.

No Critical/High/Medium findings. Decision-table trace: rows 1–8 do not fire (no blocking/medium findings; gated_paths false; high_risk false; no team gate; no prior decision), so the outcome falls through to row 9 → approve. Note: review_decision is REVIEW_REQUIRED, but with gated_paths false and no prose hard gate implicated, that does not block approval.

@patmmccann
patmmccann merged commit ba92372 into adcontextprotocol:main Nov 19, 2026
60 checks passed
patmmccann added a commit to prebid/salesagent that referenced this pull request Nov 20, 2026
…2570)

* fix(ci): update vulnerable dependencies in the creative-agent image

Add a third source patch to scripts/creative-agent-stack.sh,
_dockerfile_with_dependency_updates, that rewrites the reference agent's
Dockerfile without moving ADCP_PIN:

- a salesagent-deps stage merges exact fixed versions into package.json
  (overrides, or the direct dependency for undici 8, sdk, multer, sharp)
  and regenerates package-lock.json; builder and runtime copy both from it
- the runtime stage upgrades its Debian packages and installs npm 11.21.3
  over the base image's bundled npm

The patch is in the IMAGE_TAG checksum, so the image gets a new tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ci): refuse stale creative-agent dependency pins; declare the patch set once

The dependency-update merge wrote each listed version without reading the
pin's package-lock.json, so a later pin that locks a package at a newer
version would be set back with exit 0. The merge now fails, naming the
entry, when every locked copy is already at the listed version or newer,
or when any copy (or a direct dependency's declared range) is above it.
On the current pin it writes the same package.json as before.

The patch functions are declared once in _PATCH_FUNCTIONS, which the
_PATCHES checksum reads for both its regex and its count, and both build
paths share one _docker_build. IMAGE_TAG becomes 8d1d3244b2ef-p3516611596.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(ci): cite the upstream adcp request for the creative-agent dependency patch

adcontextprotocol/adcp#9106 asks adcp to update the dependencies this patch
still covers on its main (hono, @hono/node-server, fast-xml-parser, the
bundled npm and the Debian packages), and adcontextprotocol/adcp#9107 does
it. Name both in the patch's comment, the way the other two patches cite
theirs. The comment is outside the function body, so the _PATCHES checksum
and IMAGE_TAG (8d1d3244b2ef-p3516611596) are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(creative-agent): note adcp #9107 has merged on main

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ci): refuse a creative-agent npm_version the runtime base image already meets

The runtime stage installed npm_version over the base image's bundled npm
without comparing the two, so a later pin whose node digest bundles a newer
npm would be set back with exit 0. Before the install, the stage now copies
the merge script from salesagent-deps and runs it with an "npm" entry whose
locked version is the bundled `npm --version`, so atLeast refuses it with
the same message as the table entries. Two tests cover a bundled npm below
npm_version and at or above it.

IMAGE_TAG becomes 8d1d3244b2ef-p1914525350.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ci): resolve the creative-agent lockfile as of a fixed date so one tag names one tree

Packages that a bumped version newly requires resolved from their ranges on the build day,
so one IMAGE_TAG could name different trees. npm now resolves --before a date inside the
checksummed patch, so moving the date changes the tag.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Constantine.mirin <konstantin.mirin@gmail.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.

Update vulnerable dependencies in the published image

1 participant