-
Notifications
You must be signed in to change notification settings - Fork 475
fix(gh-aw-node): patch bundled tar/brace-expansion CVEs, bump npm to 11.19.0 #49314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,13 +7,16 @@ ARG NODE_IMAGE | |
| ARG NODE_IMAGE_DIGEST="" | ||
| ARG NODE_IMAGE_UPDATED_AT="" | ||
| ARG DOCKERFILE_HASH="" | ||
| ARG NPM_VERSION=11.18.0 | ||
| ARG NPM_VERSION=11.19.0 | ||
|
|
||
| # Intentional: upgrade all packages to pick up security fixes; downstream digest pins the result. | ||
| # After upgrading npm, patch its bundled dependencies to meet minimum safe versions | ||
| # (tar >= 7.5.21 for CVE-2025-tar, brace-expansion >= 5.0.8 for CVE-2025-brace-expansion). | ||
|
Comment on lines
+13
to
+14
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment cites fabricated CVE identifiers that don't exist. 💡 Fabricated CVE IDs in code comment
Fix: Either drop the fake CVE references entirely or replace them with the actual grype/GHSA advisory IDs for the Leaving fabricated CVE IDs in source is actively misleading for anyone auditing security fixes later. |
||
| RUN apk upgrade --no-cache \ | ||
| && apk add --no-cache git \ | ||
| && apk info -v | sort \ | ||
| && npm install --global "npm@${NPM_VERSION}" \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The inline comment says @copilot please address this. |
||
| && npm install --prefix "$(npm root -g)/npm" --no-save "tar@^7.5.22" "brace-expansion@^5.0.8" \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No verification step confirms the override actually replaced the vulnerable nested versions, so a future silent regression wouldn't be caught by CI. 💡 Missing post-install verificationThe Suggested fix: add a verification line after the install, e.g.: && npm install --prefix "$(npm root -g)/npm" --no-save "tar@^7.5.22" "brace-expansion@^5.0.8" \
&& node -e "console.log(require('$(npm root -g)/npm/node_modules/tar/package.json').version)" \or use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Caret ranges let future rebuilds silently pull unvetted versions instead of the specific patched release that was actually verified. 💡 Unpinned caret ranges undermine the point of a security patch
Fix: Pin to the exact verified-safe versions instead of caret ranges, e.g. |
||
| && npm cache clean --force | ||
|
|
||
| LABEL org.opencontainers.image.source="https://github.com/github/gh-aw" \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/diagnosing-bugs] The CVE identifiers in this comment (
CVE-2025-tar,CVE-2025-brace-expansion) appear to be placeholder names rather than real CVE IDs — they will not be useful for auditors tracing this fix back to a published advisory.💡 Suggestion
If the npm-bundled
tar/brace-expansionvulnerabilities do not yet have assigned CVE numbers, say so explicitly, or link to the grype finding / npm advisory instead. For example:# (no CVE assigned yet for tar < 7.5.22 or brace-expansion < 5.0.8; tracked via grype finding in issue #49295)Using invented CVE IDs can cause confusion for security scanners and compliance audits that expect the format
CVE-YYYY-NNNNN.@copilot please address this.