Skip to content

Upgrade npm to patch bundled tar vulnerability - #74

Merged
fqjony merged 4 commits into
latestfrom
security/npm-tar-cve-2026-59873
Jul 22, 2026
Merged

Upgrade npm to patch bundled tar vulnerability#74
fqjony merged 4 commits into
latestfrom
security/npm-tar-cve-2026-59873

Conversation

@fqjony

@fqjony fqjony commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Upgraded the image’s npm installation to 12.0.1, which bundles tar 7.5.19.
  • Added an image test that rejects npm installations with tar older than 7.5.19.
  • Made the Docker dependency updater run daily and manage the npm pin alongside the Worker base image, Node.js, and apt packages.

Why

The Node 24.18.0 distribution bundles npm with tar 7.5.15, which is affected by CVE-2026-59873. Updating npm removes that vulnerable package from the runtime image.

Validation

  • Built the image locally.
  • Verified the image contains Node 24.18.0, npm 12.0.1, and tar 7.5.19.
  • Ran the environment and task-execution container tests.

Copilot AI review requested due to automatic review settings July 22, 2026 11:57

Copilot AI 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.

Pull request overview

This PR upgrades the runtime image’s npm to a patched release (bringing in a non-vulnerable bundled tar) and extends both image validation and the automated Docker dependency updater to track the npm pin moving forward.

Changes:

  • Pin and install npm@12.0.1 during the Docker image build.
  • Add an environment test asserting npm’s bundled tar is at least 7.5.19.
  • Run the Docker dependency updater daily and include NPM_VERSION in its probe/report/pinning logic.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/tests/10_validate_environment.sh Adds a runtime check that npm’s bundled tar meets the minimum patched version.
Dockerfile Introduces ARG NPM_VERSION and installs that npm version during build.
ci/prompts/docker-dependency-nonapt.md Documents a rule for selecting npm versions based on Node engine compatibility.
.github/workflows/docker-dependency-updater.yml Runs daily and extends probing/pinning/reporting to include NPM_VERSION.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tests/10_validate_environment.sh Outdated
Comment thread Dockerfile
Comment thread .github/workflows/docker-dependency-updater.yml Outdated
Copilot AI review requested due to automatic review settings July 22, 2026 12:10

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread src/tests/10_validate_environment.sh
Copilot AI review requested due to automatic review settings July 22, 2026 12:14

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/docker-dependency-updater.yml
Copilot AI review requested due to automatic review settings July 22, 2026 12:24
@fqjony fqjony self-assigned this Jul 22, 2026
@fqjony
fqjony requested a review from a team July 22, 2026 12:25
@fqjony fqjony added enhancement New feature or request dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code docker Pull requests that update Docker code labels Jul 22, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@fqjony
fqjony enabled auto-merge July 22, 2026 12:29
@fqjony
fqjony merged commit 768f038 into latest Jul 22, 2026
19 checks passed
@fqjony
fqjony deleted the security/npm-tar-cve-2026-59873 branch July 22, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docker Pull requests that update Docker code enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants