Skip to content

fix(release): harden v0.9 image bases#341

Merged
jeremi merged 1 commit into
mainfrom
agent/harden-v0.9.0-release-images
Jul 10, 2026
Merged

fix(release): harden v0.9 image bases#341
jeremi merged 1 commit into
mainfrom
agent/harden-v0.9.0-release-images

Conversation

@jeremi

@jeremi jeremi commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Refresh the pinned Node 22 and distroless Debian 12 runtime bases used by the v0.9 release images.

Remove npm and npx from the source-adapter sidecar image. The runtime invokes Node.js directly for the bundled mock registry server and never installs packages, so retaining npm only expands the release image and its advisory surface.

Why

The beta-11 release-candidate Grype pass found high-severity advisories with available fixes in the old Relay base and in npm packages bundled into the sidecar base. Release policy requires fixing patched same-major dependencies before the prepare release PR merges.

Verification

  • release helper unit suite: 42 passed
  • all three release Dockerfile secret-copy checks passed
  • rebuilt the sidecar and Relay images as Linux/amd64 from the exact beta-11 candidate binaries
  • confirmed Node.js v22.23.1 remains available in the sidecar
  • confirmed npm and npx are absent
  • rescanned immutable local-registry digests with the release workflow versions of Syft and Grype
  • zero high or critical findings with an available fix remain across the Notary, sidecar, and Relay candidate images
  • git diff --check passed

This PR must merge before #340 is refreshed and merged.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi

jeremi commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Maintainer security review record:

  • Scope is limited to the two release runtime Dockerfiles.
  • The refreshed base references are immutable sha256 digests.
  • The sidecar still provides Node.js for the bundled mock registry server, while unused npm/npx tooling is absent.
  • Linux/amd64 images were rebuilt from the exact beta-11 candidate binaries and scanned by immutable local-registry digest with the release workflow versions of Syft and Grype.
  • Across Notary, sidecar, and Relay, zero high or critical matches with an available fix remain after this change.
  • Remaining base-image findings have no packaged fix and remain review evidence. This is not a zero-CVE claim.
  • The release Dockerfile secret-copy assurance check and release helper suite pass.
  • No authentication, authorization, audit, disclosure, replay, approval, config-trust, or signing invariant is changed.

Security review result: approve this prerequisite after required CI completes.

@jeremi jeremi marked this pull request as ready for review July 10, 2026 16:23
@jeremi jeremi merged commit 705ed0b into main Jul 10, 2026
11 checks passed
@jeremi jeremi deleted the agent/harden-v0.9.0-release-images branch July 10, 2026 16:23

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cfa7a2c40

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +17 to +18
RUN rm -rf /usr/local/lib/node_modules/npm \
&& rm -f /usr/local/bin/npm /usr/local/bin/npx

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude npm from final image layers

For the release image pushed from this Dockerfile, deleting /usr/local/lib/node_modules/npm in a later RUN step only adds whiteouts over files that already came from the node:22-bookworm-slim base layer. The npm package tree is still present in the distributed image blobs and can be recovered or reported by scanners that inspect all layers, so this does not actually keep npm out of the image as the hardening comment requires. Build the final stage from a base/layer that never contains npm, or copy only the needed Node runtime files into a fresh final stage.

Useful? React with 👍 / 👎.

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