Skip to content

fix(deps): resolve transitive vulnerabilities and clean Dockerfile - #288

Closed
platex-rehor-bot wants to merge 3 commits into
RedHatInsights:masterfrom
platex-rehor-bot:bot/RHCLOUD-46715
Closed

fix(deps): resolve transitive vulnerabilities and clean Dockerfile#288
platex-rehor-bot wants to merge 3 commits into
RedHatInsights:masterfrom
platex-rehor-bot:bot/RHCLOUD-46715

Conversation

@platex-rehor-bot

@platex-rehor-bot platex-rehor-bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Update axios lockfile resolution from 1.14.0 to 1.17.0 to remediate CVE-2025-62718 (SSRF and proxy bypass due to improper hostname normalization in axios <1.15.0). The package.json semver range (^1.8.3) already covered the fix version, so only package-lock.json changes.

Additionally resolves pre-existing grype scan failures by:

  • Running npm audit fix to update transitive dependencies (braces, minimatch, picomatch, immutable, flatted, fast-uri) to their fixed versions in the lockfile.
  • Cleaning up build-time Node.js artifacts (node_modules, system npm) from the Docker image after the build step. The runtime only needs nginx to serve static files — the leftover system npm packages were the source of transitive dependency vulnerabilities flagged by the grype container scan.
  • Removing redundant npm i --only=dev (npm ci already installs all deps) and unused npm install yarn (no build scripts use yarn) from the Dockerfile.

RHCLOUD-46715


Anything reviewers should know?

  • Lockfile-only change for axios — no package.json modification needed since ^1.8.3 already accepts 1.17.0.
  • Dockerfile cleanup is safe: the image only uses nginx at runtime, so Node.js and npm packages are only needed during the build step.
  • npm audit confirms no remaining axios vulnerabilities.
  • Lint passes (0 errors, pre-existing warnings only).

Checklist

  • Accessibility: color contrast, keyboard nav, screen reader tested (or N/A)
  • All PR checks pass locally (build, lint, test)
  • No unrelated changes included

AI disclosure

Assisted by: Claude Code

@platex-rehor-bot
platex-rehor-bot requested a review from a team as a code owner June 9, 2026 20:25
platex-rehor-bot and others added 2 commits June 12, 2026 14:47
RHCLOUD-46715
Run npm audit fix to upgrade transitive deps flagged by grype scan:
braces, immutable, launch-editor, flatted, fast-uri, picomatch,
minimatch, serialize-javascript, shell-quote, @babel/plugin-transform-
modules-systemjs. Add brace-expansion override for v1 range.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RHCLOUD-46715
Strip node_modules and system npm packages after build since the
runtime only needs nginx to serve static files. This eliminates
transitive npm dependency vulnerabilities flagged by grype that
originate from the system-installed npm, not the project.

Also remove redundant `npm i --only=dev` (npm ci already installs
all deps) and unused `npm install yarn` (no build scripts use yarn).
@platex-rehor-bot platex-rehor-bot changed the title fix(deps): update axios to 1.17.0 for CVE-2025-62718 fix(deps): resolve transitive vulnerabilities and clean Dockerfile Jun 12, 2026
@jjaquish

Copy link
Copy Markdown
Contributor

@platex-rehor-bot Can you explain why you're overriding brace-expansion to 1.1.13 specifically?

RHCLOUD-46715
brace-expansion 1.1.15 is already patched for GHSA-f886-m6hf-6m8v
(vulnerable range < 1.1.13). The override was unnecessarily
downgrading from 1.1.15 to 1.1.13.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@platex-rehor-bot

Copy link
Copy Markdown
Contributor Author

Good catch — the override was targeting GHSA-f886-m6hf-6m8v (brace-expansion zero-step sequence DoS, vulnerable range < 1.1.13), but the lockfile already had 1.1.15 which is well above the fix threshold. The override was actually downgrading from 1.1.15 to 1.1.13 for no security benefit.

I've removed the override in c8a42bb — brace-expansion now resolves to 1.1.15 (matching upstream master).

@jjaquish

Copy link
Copy Markdown
Contributor

@platex-rehor-bot Is this still a valid PR then? As far as I can tell it currently just removes a comment and updates package-lock with no changes to package. Can you take another look through it and see if it's still valid and worth merging, or if it can just be closed?

@platex-rehor-bot

Copy link
Copy Markdown
Contributor Author

You're right — after removing the brace-expansion override in c8a42bb, the only remaining changes are a Dockerfile comment and lockfile churn from dev dependency version bumps (electron-to-chromium, ajv, schema-utils). None of these address the original axios SSRF vulnerability (CVE-2025-62718).

The transitive dependency overrides that were originally in package.json have all been resolved or were unnecessary, so this PR no longer carries any meaningful security fix. Closing it.

@platex-rehor-bot
platex-rehor-bot deleted the bot/RHCLOUD-46715 branch June 22, 2026 18:42
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.

2 participants