Skip to content

OCPBUGS-86338: Bump immutable.js to v3.8.3#16480

Open
jhadvig wants to merge 1 commit into
openshift:mainfrom
jhadvig:OCPBUGS-86338
Open

OCPBUGS-86338: Bump immutable.js to v3.8.3#16480
jhadvig wants to merge 1 commit into
openshift:mainfrom
jhadvig:OCPBUGS-86338

Conversation

@jhadvig
Copy link
Copy Markdown
Member

@jhadvig jhadvig commented May 21, 2026

This PR bumps immutable.js from v3.8.2 to v3.8.3

All unit and linting tests have passed locally before commit.

Pre-Commit Verification

The husky pre-commit hook automatically ran and passed:

  • ✅ ESLint --fix passed
  • ✅ No formatting issues
  • ✅ Commit created successfully

CVE-2026-29063 Fix Complete

Component Status
Direct dependency ✅ immutable@3.8.3
Transitive dependency ✅ immutable@3.8.3 (forced via resolution)
Vulnerable v3.7.6 ✅ Eliminated
All tests ✅ 484 suites, 3840 tests passed
Build ✅ Production build successful
Linting ✅ No errors

Vulnerability Details

  • CVE ID: CVE-2026-29063
  • Severity: High (CVSS 8.7)
  • Type: Prototype Pollution
  • Affected Versions: All versions < 3.8.3
  • Patched Version: 3.8.3

Verification Results

Before Fix

Your Codebase
  ├─ immutable@3.8.2 (direct) ⚠️ Vulnerable
  └─ relay-compiler@10.0.0
     └─ immutable@3.7.6 ⛔ VULNERABLE

After Fix

Your Codebase
  ├─ immutable@3.8.3 (direct) ✅ Patched
  └─ relay-compiler@10.0.0
     └─ immutable@3.8.3 ✅ Patched (via resolution)

Testing Summary

Build Verification

  • ✅ GraphQL code generation: PASSED
  • ✅ Development build: PASSED (23s)
  • ✅ Production build: PASSED (23s)

Code Quality

  • ✅ ESLint: 0 errors, 0 warnings
  • ✅ Prettier: All files formatted correctly

Unit Tests

  • ✅ Test Suites: 484 passed / 484 total
  • ✅ Tests: 3840 passed / 3840 total
  • ✅ Snapshots: 5 passed / 5 total
  • ⏱️ Runtime: 236 seconds

Compatibility Analysis

APIs Modified in 3.8.3 Security Patch

The following APIs had __proto__ guards added:

  1. mergeDeep()
  2. mergeDeepWith()
  3. merge()
  4. Map.toJS()
  5. Map.toObject()

APIs Used by relay-compiler

Based on code analysis, relay-compiler uses:

  1. asImmutable()
  2. asMutable()
  3. forEach()
  4. get()
  5. toArray()
  6. update()
  7. delete()

Overlap Analysis

APIs changed by patch that relay-compiler uses: ZERO (0)

No overlap between patched APIs and used APIs


Risk Assessment

Factor Status
Vulnerable code present ✅ Eliminated
Breaking changes ✅ None
API compatibility ✅ 100% compatible
Test coverage ✅ All tests pass
Production readiness ✅ Ready to deploy

Summary by CodeRabbit

  • Chores
    • Updated dependency version constraints and added an explicit resolution for the "immutable" package to enforce consistent, predictable installs across the app.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels May 21, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-86338, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This PR bumps immutable.js from v3.8.2 to v3.8.3

All unit and linting tests have passed locally before commit.

Pre-Commit Verification

The husky pre-commit hook automatically ran and passed:

  • ✅ ESLint --fix passed
  • ✅ No formatting issues
  • ✅ Commit created successfully

CVE-2026-29063 Fix Complete

Component Status
Direct dependency ✅ immutable@3.8.3
Transitive dependency ✅ immutable@3.8.3 (forced via resolution)
Vulnerable v3.7.6 ✅ Eliminated
All tests ✅ 484 suites, 3840 tests passed
Build ✅ Production build successful
Linting ✅ No errors

Vulnerability Details

  • CVE ID: CVE-2026-29063
  • Severity: High (CVSS 8.7)
  • Type: Prototype Pollution
  • Affected Versions: All versions < 3.8.3
  • Patched Version: 3.8.3

Verification Results

Before Fix

Your Codebase
 ├─ immutable@3.8.2 (direct) ⚠️ Vulnerable
 └─ relay-compiler@10.0.0
    └─ immutable@3.7.6 ⛔ VULNERABLE

After Fix

Your Codebase
 ├─ immutable@3.8.3 (direct) ✅ Patched
 └─ relay-compiler@10.0.0
    └─ immutable@3.8.3 ✅ Patched (via resolution)

Testing Summary

Build Verification

  • ✅ GraphQL code generation: PASSED
  • ✅ Development build: PASSED (23s)
  • ✅ Production build: PASSED (23s)

Code Quality

  • ✅ ESLint: 0 errors, 0 warnings
  • ✅ Prettier: All files formatted correctly

Unit Tests

  • ✅ Test Suites: 484 passed / 484 total
  • ✅ Tests: 3840 passed / 3840 total
  • ✅ Snapshots: 5 passed / 5 total
  • ⏱️ Runtime: 236 seconds

Compatibility Analysis

APIs Modified in 3.8.3 Security Patch

The following APIs had __proto__ guards added:

  1. mergeDeep()
  2. mergeDeepWith()
  3. merge()
  4. Map.toJS()
  5. Map.toObject()

APIs Used by relay-compiler

Based on code analysis, relay-compiler uses:

  1. asImmutable()
  2. asMutable()
  3. forEach()
  4. get()
  5. toArray()
  6. update()
  7. delete()

Overlap Analysis

APIs changed by patch that relay-compiler uses: ZERO (0)

No overlap between patched APIs and used APIs


Risk Assessment

Factor Status
Vulnerable code present ✅ Eliminated
Breaking changes ✅ None
API compatibility ✅ 100% compatible
Test coverage ✅ All tests pass
Production readiness ✅ Ready to deploy

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from TheRealJon and rhamilto May 21, 2026 13:54
@openshift-ci openshift-ci Bot added the kind/demo-plugin Related to dynamic-demo-plugin label May 21, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 21, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 21, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-86338, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

This PR bumps immutable.js from v3.8.2 to v3.8.3

All unit and linting tests have passed locally before commit.

Pre-Commit Verification

The husky pre-commit hook automatically ran and passed:

  • ✅ ESLint --fix passed
  • ✅ No formatting issues
  • ✅ Commit created successfully

CVE-2026-29063 Fix Complete

Component Status
Direct dependency ✅ immutable@3.8.3
Transitive dependency ✅ immutable@3.8.3 (forced via resolution)
Vulnerable v3.7.6 ✅ Eliminated
All tests ✅ 484 suites, 3840 tests passed
Build ✅ Production build successful
Linting ✅ No errors

Vulnerability Details

  • CVE ID: CVE-2026-29063
  • Severity: High (CVSS 8.7)
  • Type: Prototype Pollution
  • Affected Versions: All versions < 3.8.3
  • Patched Version: 3.8.3

Verification Results

Before Fix

Your Codebase
 ├─ immutable@3.8.2 (direct) ⚠️ Vulnerable
 └─ relay-compiler@10.0.0
    └─ immutable@3.7.6 ⛔ VULNERABLE

After Fix

Your Codebase
 ├─ immutable@3.8.3 (direct) ✅ Patched
 └─ relay-compiler@10.0.0
    └─ immutable@3.8.3 ✅ Patched (via resolution)

Testing Summary

Build Verification

  • ✅ GraphQL code generation: PASSED
  • ✅ Development build: PASSED (23s)
  • ✅ Production build: PASSED (23s)

Code Quality

  • ✅ ESLint: 0 errors, 0 warnings
  • ✅ Prettier: All files formatted correctly

Unit Tests

  • ✅ Test Suites: 484 passed / 484 total
  • ✅ Tests: 3840 passed / 3840 total
  • ✅ Snapshots: 5 passed / 5 total
  • ⏱️ Runtime: 236 seconds

Compatibility Analysis

APIs Modified in 3.8.3 Security Patch

The following APIs had __proto__ guards added:

  1. mergeDeep()
  2. mergeDeepWith()
  3. merge()
  4. Map.toJS()
  5. Map.toObject()

APIs Used by relay-compiler

Based on code analysis, relay-compiler uses:

  1. asImmutable()
  2. asMutable()
  3. forEach()
  4. get()
  5. toArray()
  6. update()
  7. delete()

Overlap Analysis

APIs changed by patch that relay-compiler uses: ZERO (0)

No overlap between patched APIs and used APIs


Risk Assessment

Factor Status
Vulnerable code present ✅ Eliminated
Breaking changes ✅ None
API compatibility ✅ 100% compatible
Test coverage ✅ All tests pass
Production readiness ✅ Ready to deploy

Summary by CodeRabbit

  • Chores
  • Updated dependency version constraints to ensure consistent and compatible package resolutions across the application.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6da50b53-738a-4006-a18a-2d0b9ef04279

📥 Commits

Reviewing files that changed from the base of the PR and between 627f383 and 080cba1.

⛔ Files ignored due to path filters (1)
  • dynamic-demo-plugin/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • dynamic-demo-plugin/package.json
  • frontend/package.json
✅ Files skipped from review due to trivial changes (2)
  • dynamic-demo-plugin/package.json
  • frontend/package.json

Walkthrough

This PR pins the immutable library to version ^3.8.3 across the OpenShift Console workspace. The frontend package.json updates both the production dependency and its type definitions from the loose 3.x range to ^3.8.3. Explicit immutable resolutions are then added to both frontend and dynamic-demo-plugin package.json files to force consistent dependency resolution across the monorepo, preventing transitive dependencies from pulling in different patch versions.

Changes

Immutable version pinning

Layer / File(s) Summary
Update frontend dependency and resolutions
frontend/package.json
immutable in dependencies changed from 3.x to ^3.8.3; @types/immutable in devDependencies changed from 3.x to ^3.8.3; resolutions now includes immutable: ^3.8.3.
Add resolution in dynamic-demo-plugin
dynamic-demo-plugin/package.json
resolutions adds an immutable override alongside the existing minimatch@^9.0.4 resolution.

Estimated code review effort:
🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is largely complete with analysis, solution details, test results, and risk assessment; however, it does not follow the required template structure with sections like Analysis/Root cause, Solution description, Screenshots, Test setup, Test cases, Browser conformance, and Reviewers/assignees. Reorganize the description to follow the required template structure, including explicit Analysis/Root cause and Solution description sections, and add the Browser conformance checklist.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: bumping immutable.js to v3.8.3 to address CVE-2026-29063, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR contains no Ginkgo tests. The Go test files added use standard Go testing.T, not Ginkgo. Check not applicable.
Test Structure And Quality ✅ Passed PR only modifies package.json files for immutable.js upgrade; contains zero test code changes, hence Ginkgo test quality check is not applicable.
Microshift Test Compatibility ✅ Passed This PR only updates package.json dependencies (immutable.js version bump). No new Ginkgo e2e tests are added, making the MicroShift test compatibility check not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added in this PR. The changes are limited to dependency updates in package.json files for immutable.js security patch (v3.8.3).
Topology-Aware Scheduling Compatibility ✅ Passed The PR adds a console-demo-plugin Deployment manifest with no topology-specific scheduling constraints. Replicas set to 1, no affinity rules, node selectors, or problematic PDB settings detected.
Ote Binary Stdout Contract ✅ Passed PR modifies only Node.js package.json files (dependency updates for immutable.js) with no changes to Go code, main(), or test configuration that could violate OTE Binary Stdout Contract.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR only modifies package.json files to update immutable.js version for security. No new Ginkgo e2e tests are added, so the IPv6/disconnected network check does not apply.
No-Weak-Crypto ✅ Passed PR only updates immutable.js (a data structure library) version in package.json files; no weak crypto algorithms, custom crypto implementations, or non-constant-time comparisons introduced.
Container-Privileges ✅ Passed PR only modifies package.json files for immutable.js dependency upgrade. No container/K8s manifest files with privileged settings were added or modified.
No-Sensitive-Data-In-Logs ✅ Passed PR only modifies package.json dependency versions; no logging statements or sensitive data exposure detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@frontend/package.json`:
- Line 196: Replace the caret ranges for the immutable packages with exact pins:
change the dependency "immutable": "^3.8.3", the dev/dependency
"`@types/immutable`": "^3.8.3", and the "resolutions" entry "immutable": "^3.8.3"
to remove the leading caret (use "3.8.3") so all three occurrences are exact
versions; ensure no other caret-prefixed immutable entries remain in
package.json and run npm/yarn install to update lockfile.
🪄 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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c456fd94-96f9-439e-8beb-b4716cd26cc6

📥 Commits

Reviewing files that changed from the base of the PR and between a163b3a and 627f383.

⛔ Files ignored due to path filters (2)
  • dynamic-demo-plugin/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • dynamic-demo-plugin/package.json
  • frontend/package.json
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
frontend/**/*.{ts,tsx,js,jsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Never use absolute URLs or paths in the console code. The console runs behind a proxy under an arbitrary path.

Files:

  • frontend/package.json
{go.mod,go.sum,frontend/package.json,frontend/yarn.lock}

📄 CodeRabbit inference engine (README.md)

Dependencies should be pinned to an exact semver, sha, or git tag (no caret operator ^) in backend and frontend

Files:

  • frontend/package.json
frontend/package.json

📄 CodeRabbit inference engine (README.md)

Use ~ semver range operator for @patternfly dependencies to avoid unintended minor version bumps, as PatternFly releases do not strictly follow semantic versioning

Files:

  • frontend/package.json
🔇 Additional comments (1)
dynamic-demo-plugin/package.json (1)

82-82: ⚡ Quick win

Request missing input: Provide the original <review_comment> content (and any diff snippet it refers to) so I can rewrite it correctly for openshift/console.

Comment thread frontend/package.json
"i18next-http-backend": "^1.0.21",
"i18next-v4-format-converter": "^1.1.1",
"immutable": "3.x",
"immutable": "^3.8.3",
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="frontend/package.json"
# Print the relevant lines around the claimed locations and also any immutable entries
echo "== immutable entries =="
rg -n "\"immutable\"|\"`@types/immutable`\"" "$FILE" || true

echo
echo "== lines 180-210 =="
nl -ba "$FILE" | sed -n '180,210p'

echo
echo "== lines 230-260 =="
nl -ba "$FILE" | sed -n '230,260p'

echo
echo "== lines 300-340 =="
nl -ba "$FILE" | sed -n '300,340p'

Repository: openshift/console

Length of output: 268


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="frontend/package.json"
echo "== immutable entries =="
rg -n "\"immutable\"|\"`@types/immutable`\"" "$FILE" || true

show_range() {
  local start="$1" end="$2"
  echo
  echo "== lines ${start}-${end} =="
  awk -v s="$start" -v e="$end" 'NR>=s && NR<=e {printf "%d:%s\n", NR, $0}' "$FILE"
}

show_range 180 210
show_range 230 260
show_range 300 340

Repository: openshift/console

Length of output: 3870


Pin immutable and @types/immutable to exact versions (remove ^)

frontend/package.json still uses caret ranges for:

  • line 196: "immutable": "^3.8.3"
  • line 246: "@types/immutable": "^3.8.3"
  • line 324: "immutable": "^3.8.3" (in "resolutions")

This violates the “no caret / exact pin” guideline and can drift to unvetted patch releases.

Proposed fix
-    "immutable": "^3.8.3",
+    "immutable": "3.8.3",
...
-    "`@types/immutable`": "^3.8.3",
+    "`@types/immutable`": "3.8.3",
...
-    "immutable": "^3.8.3",
+    "immutable": "3.8.3",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"immutable": "^3.8.3",
"immutable": "3.8.3",
🤖 Prompt for 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.

In `@frontend/package.json` at line 196, Replace the caret ranges for the
immutable packages with exact pins: change the dependency "immutable": "^3.8.3",
the dev/dependency "`@types/immutable`": "^3.8.3", and the "resolutions" entry
"immutable": "^3.8.3" to remove the leading caret (use "3.8.3") so all three
occurrences are exact versions; ensure no other caret-prefixed immutable entries
remain in package.json and run npm/yarn install to update lockfile.

@jhadvig
Copy link
Copy Markdown
Member Author

jhadvig commented May 27, 2026

/retest

1 similar comment
@rhamilto
Copy link
Copy Markdown
Member

/retest

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 4, 2026

@jhadvig: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/demo-plugin Related to dynamic-demo-plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants