fix(deps): update build-tools and fix npm vulnerabilities#2366
fix(deps): update build-tools and fix npm vulnerabilities#2366platex-rehor-bot wants to merge 2 commits into
Conversation
RHCLOUD-48037 Update build-tools submodule to latest (6bdef6f) which bumps the Node.js builder image from 9.7 to 9.8 and removes the deprecated valpop binary. This triggers a rebuild with latest UBI9 base images, fixing RPM-level CVEs. Fix all critical and high npm audit vulnerabilities: - Add axios ^1.17.0 as direct dependency (20 source imports) - Update vitest/coverage-v8/ui to ^4.1.8 - Update happy-dom to ^20.10.2 - Add overrides for transitive deps: serialize-javascript, shell-quote, tmp Reduces npm audit from 51 vulnerabilities (5 critical, 13 high) to 16 moderate-only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 51 minutes and 53 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBuild tools submodule reference is updated to a new commit, and ChangesDependencies and Build Tools Update
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Around line 48-52: The package.json uses the "overrides" field which only
takes effect on npm >=8.3.0; update the package.json "engines" entry (or add one
if missing) to require npm ">=8.3.0" so the overrides will be applied (i.e., set
or change the "npm" value under "engines" to ">=8.3.0"); if an existing
engines.npm range is present, replace it with the new minimum; ensure CI/docs
that enforce Node/npm versions are aligned with this change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 84502aa8-0f38-4d1c-ac96-543212858d88
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
build-toolspackage.json
RHCLOUD-48037 The overrides field in package.json only takes effect with npm 8.3.0+. Bumping the engines.npm minimum from 7.0.0 to 8.3.0 ensures the vulnerability overrides are always applied.
Chromatic Build
|
|
We will leave the overrides because the current situation with overrides:
Can we solve without overrides? Short answer: No, not easily. Here's why:
The overrides are the correct solution because:
|
|
@platex-rehor-bot this branch is out of date, please update. |
What and why
RHCLOUD-48037
Vulnerability mitigation for the insights-rbac-ui container image. The June 2026 scan identified 58 vulnerabilities (2 Critical, 19 High) in the built image, primarily from outdated base images and npm dependencies.
Container image fixes (Phase 1):
build-toolssubmodule to latest (6bdef6f) — bumps Node.js builder image from9.7-1773053268to9.8-1780375952, removes deprecated valpop binary. A rebuild will pull the latestcaddy-ubi:latestruntime image, picking up RPM patches for gnutls, krb5-libs, libcap, libnghttp2, and other system packages.npm dependency fixes:
axios^1.17.0 as direct dependency (used in 20 source files, was only transitive)vitest/@vitest/coverage-v8/@vitest/uito ^4.1.8 (fixes critical vitest RCE)happy-domto ^20.10.2 (fixes high severity issues)overridesfor transitive deps:serialize-javascript^7.0.5,shell-quote^1.8.4,tmp^0.2.7Result: npm audit reduced from 51 vulnerabilities (5 critical, 13 high) to 16 moderate-only. All critical and high severity npm vulnerabilities are resolved.
Note: Go module vulnerabilities (CVE-2026-27143 in Go stdlib, OpenTelemetry, Caddy, golang.org/x/crypto, pgx) reside in the
caddy-ubiruntime image and require an upstream image update — tracked separately as Phase 2.Screenshots
N/A — no UI changes.
Anything non-obvious reviewers should know?
axiosaddition to direct dependencies is intentional — it was previously resolved only as a transitive dependency despite being imported in 20 source files.overridessection forces patched versions ofserialize-javascript,shell-quote, andtmpwhich are transitive dependencies not directly imported in this project.72c2bef) by going to the latest commit (6bdef6f).Attention needed
🤖 Generated with Claude Code
Summary by CodeRabbit