Fix gh-aw-node brace-expansion patch: replace broken npm --prefix overlay with temp-dir copy (GHSA-mh99-v99m-4gvg) - #49853
Conversation
|
Thanks for tackling the container image vulnerabilities ( A few things to keep an eye on as you develop this:
The PR description is excellent and gives clear context on what needs to be done. Keep it updated as you make progress, and feel free to mark it as ready for review once the implementation is complete and tested.
|
…hing in Dockerfile The previous approach (npm install --prefix "$(npm root -g)/npm") was broken because it reads npm's own private package.json (referencing @npmcli/docs which is not public). Replace with a temp-directory overlay: install brace-expansion >=5.0.8 and tar >=7.5.22 into a fresh prefix with no package.json, then cp into npm's bundled node_modules. Also add a push trigger to publish-safe-outputs-node.yml on the Dockerfile path so the image rebuilds automatically when this change is merged to main. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes vulnerable bundled npm dependencies in the gh-aw-node image and ensures Dockerfile changes trigger publication.
Changes:
- Installs patched dependencies in a temporary prefix and overlays them into npm.
- Triggers image publication when the Dockerfile changes on
main. - Adds a patch changeset.
Show a summary per file
| File | Description |
|---|---|
actions/setup/js/Dockerfile.safe-outputs-mcp |
Replaces the broken npm dependency patching approach. |
.github/workflows/publish-safe-outputs-node.yml |
Adds Dockerfile-scoped push publication. |
.changeset/patch-refresh-gh-aw-node.md |
Documents the security fix and publication trigger. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'actions/setup/js/Dockerfile.safe-outputs-mcp' |
|
🎉 This pull request is included in a new release. Release: |
The published
ghcr.io/github/gh-aw-nodeimage containsbrace-expansion@5.0.7(GHSA-mh99-v99m-4gvg, High). The previous Dockerfile fix was silently a no-op.Root cause
npm install --prefix "$(npm root -g)/npm"reads npm's ownpackage.jsonat that prefix, which declares@npmcli/docs@^1.0.0— a private package not on the public registry. The install exitsE404before touchingbrace-expansion, so the bundled5.0.7was never replaced.Changes
Dockerfile.safe-outputs-mcp— replace the broken--prefix npm-dirapproach with a temp-directory overlay:With
brace-expansion@^5.0.8now resolving to 5.0.9 (published 2026-07-30), the rebuilt image will have the patched version in npm's bundlednode_modules.publish-safe-outputs-node.yml— addpushtrigger scoped toactions/setup/js/Dockerfile.safe-outputs-mcponmain, so the image rebuilds immediately on merge rather than waiting for the next Monday schedule.