Skip to content

fix(security): Update dependencies to fix security vulnerabilities. - #6085

Merged
jbocce merged 1 commit into
OHIF:masterfrom
jbocce:fix/OHIF-2644-security-patches
Jun 17, 2026
Merged

fix(security): Update dependencies to fix security vulnerabilities.#6085
jbocce merged 1 commit into
OHIF:masterfrom
jbocce:fix/OHIF-2644-security-patches

Conversation

@jbocce

@jbocce jbocce commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Context

See...

GHSA-7c78-jf6q-g5cm

GHSA-96hv-2xvq-fx4p

GHSA-hmw2-7cc7-3qxx

GHSA-wcpc-wj8m-hjx6

Changes & Results

Updated various dependencies via resolutions.

Testing

All automated tests and checks should pass.

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Summary by CodeRabbit

  • Chores
    • Updated workspace dependency configuration with revised version constraints
    • Bumped protobufjs to 7.6.1 and tmp to 0.2.7
    • Adjusted version pinning for tslib and selective overrides for ws, form-data, and minimatch/picomatch packages
    • Cleared security advisory ignore list

Greptile Summary

This PR updates pnpm-workspace.yaml (and regenerates the lock file) to address five security advisories by upgrading protobufjs (7.5.7→7.6.1) and tmp (0.2.6→0.2.7), and adding targeted overrides entries that force vulnerable transitive copies of ws, form-data, minimatch, and picomatch to patched versions.

  • The four GHSAs previously accepted via ignoreGhsas (three minimatch ReDoS + one picomatch prototype-injection) are now properly remediated through the new override ranges and removed from the ignore list.
  • The lock file confirms all overrides resolve to patched releases: ws@7.5.11/8.21.0, form-data@4.0.6, minimatch@3.1.5/5.1.9/9.0.9/10.2.5, picomatch@2.3.2/4.0.4 — all at or above the advisory-patched thresholds.
  • The tslib override was tightened from the range ^2.8.1 to the exact pin 2.8.1; this achieves the stated goal of a single shared tslib but reduces flexibility for future patch-level security updates to tslib itself.

Confidence Score: 4/5

Safe to merge — all dependency pins are at or above the advisory-patched thresholds and the lock file matches.

The dependency upgrades and override ranges are correct and fully reflected in the lock file. The only non-trivial change worth a second look is the tslib exact pin, which is intentional but slightly reduces the project's ability to absorb future tslib patch releases without a manual edit.

pnpm-workspace.yaml — specifically the tslib: 2.8.1 exact pin and the completeness of ignoreGhsas: [] if any previously-ignored advisories are not fully covered by the new overrides.

Important Files Changed

Filename Overview
pnpm-workspace.yaml Adds targeted version overrides for ws (7.5.11/8.21.0), form-data (4.0.6), minimatch (<3.1.4→3.1.5, >=10.0.0<10.2.3→10.2.5), picomatch (<2.3.2→2.3.2, >=4.0.0<4.0.4→4.0.4); upgrades protobufjs (7.5.7→7.6.1) and tmp (0.2.6→0.2.7); clears ignoreGhsas; changes tslib from range ^2.8.1 to exact pin 2.8.1.
pnpm-lock.yaml Lock file updated to reflect all new overrides: ws@7.5.11/8.21.0, form-data@4.0.6, minimatch@3.1.5/5.1.9/9.0.9/10.2.5, picomatch@2.3.2/4.0.4, protobufjs@7.6.1, tmp@0.2.7 — all at or above the patched versions for the addressed advisories.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
pnpm-workspace.yaml:83
The `tslib` override changed from the range `^2.8.1` (any 2.x.x ≥ 2.8.1) to the exact pin `2.8.1`. The intent — a single shared tslib across the workspace — is preserved either way, but an exact pin means a future `pnpm audit` finding against tslib 2.8.1 would require a manual edit here before it can be resolved. Consider keeping the caret form so a `pnpm update tslib` can pick up patch releases without touching this file.

```suggestion
  tslib: ^2.8.1
```

Reviews (1): Last reviewed commit: "fix(security): Update dependencies to fi..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit 9d6cbf7
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/6a3242d2938e32000853c00d
😎 Deploy Preview https://deploy-preview-6085--ohif-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

pnpm-workspace.yaml is updated to empty the auditConfig.ignoreGhsas list, bump protobufjs to 7.6.1 and tmp to 0.2.7 in overrides, pin tslib to exact 2.8.1, and add semver-range override entries for ws, form-data, minimatch, and picomatch.

Changes

Workspace Dependency and Audit Config Updates

Layer / File(s) Summary
Clear GHSA ignore list and bump protobufjs/tmp
pnpm-workspace.yaml
auditConfig.ignoreGhsas is set to an empty array, removing all previously suppressed advisories. protobufjs is bumped from 7.5.7 to 7.6.1 and tmp from 0.2.6 to 0.2.7 in the overrides block.
Tighten tslib pin and expand ws/form-data/minimatch/picomatch overrides
pnpm-workspace.yaml
tslib override is changed from ^2.8.1 to exact 2.8.1. New or updated semver-range override mappings are added for ws, form-data, minimatch, and picomatch.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 A workspace swept clean, no advisories to hide,
Old ghosts of GHSA brushed firmly aside.
Protobufjs hops up, tmp gets a nudge,
tslib pinned exact — not a version shall budge!
With ws and friends neatly ranged in a row,
The dependency garden's all tidy, you know.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'fix(security): Update dependencies to fix security vulnerabilities' follows the semantic-release format and clearly describes the main change of addressing security issues through dependency updates.
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.
Description check ✅ Passed The pull request description includes all required sections: Context with security advisory links, Changes & Results summarizing dependency updates, and Testing guidance.

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

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

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pnpm-workspace.yaml (1)

22-27: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Stale comment describing ignored GHSAs.

The comment on lines 22-25 describes the rationale for accepting minimatch/picomatch advisories as risk, but ignoreGhsas is now empty since these vulnerabilities are being fixed via the new overrides on lines 87-90. Consider updating or removing the comment to reflect the new approach.

-# Equivalent of the bun `audit --ignore=...` flags. These GHSAs are accepted
-# risk: minimatch/picomatch advisories reached only via build/CI tooling, never
-# fed user-supplied expressions. Kept in sync with the .circleci SECURITY_AUDIT
-# job and the root `audit` script.
+# Audit configuration. GHSAs are addressed via overrides rather than being
+# suppressed here; keep the ignore list empty unless accepting a specific risk.
 auditConfig:
   ignoreGhsas: []
🤖 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 `@pnpm-workspace.yaml` around lines 22 - 27, The comment block preceding the
auditConfig section references minimatch/picomatch advisories being accepted as
risk and kept in sync with security configurations, but the ignoreGhsas array is
now empty and these vulnerabilities are being handled via overrides on lines
87-90 instead. Update the comment to accurately describe the current approach
using overrides for vulnerability management, or remove the comment entirely if
it is no longer applicable to the auditConfig configuration.
🤖 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 `@pnpm-workspace.yaml`:
- Around line 83-90: The pnpm-workspace.yaml overrides section is missing an
entry for the Vite package to address GHSA-fx2h-pf6j-xcff vulnerability. Add a
vite override entry in the overrides section (located after the existing entries
like picomatch and other packages) with an appropriate version that resolves the
GHSA-fx2h-pf6j-xcff vulnerability. The override should follow the same pattern
as the other entries in the file, specifying the package name and the fixed
version number.

---

Outside diff comments:
In `@pnpm-workspace.yaml`:
- Around line 22-27: The comment block preceding the auditConfig section
references minimatch/picomatch advisories being accepted as risk and kept in
sync with security configurations, but the ignoreGhsas array is now empty and
these vulnerabilities are being handled via overrides on lines 87-90 instead.
Update the comment to accurately describe the current approach using overrides
for vulnerability management, or remove the comment entirely if it is no longer
applicable to the auditConfig configuration.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0fb01be8-bc8c-46ec-94a2-e963f5447762

📥 Commits

Reviewing files that changed from the base of the PR and between 780d172 and 9d6cbf7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • pnpm-workspace.yaml

Comment thread pnpm-workspace.yaml
Comment thread pnpm-workspace.yaml
# tslib@2 that modern packages (e.g. react-remove-scroll) need for
# __spreadArray.
tslib: ^2.8.1
tslib: 2.8.1

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.

P2 The tslib override changed from the range ^2.8.1 (any 2.x.x ≥ 2.8.1) to the exact pin 2.8.1. The intent — a single shared tslib across the workspace — is preserved either way, but an exact pin means a future pnpm audit finding against tslib 2.8.1 would require a manual edit here before it can be resolved. Consider keeping the caret form so a pnpm update tslib can pick up patch releases without touching this file.

Suggested change
tslib: 2.8.1
tslib: ^2.8.1
Prompt To Fix With AI
This is a comment left during a code review.
Path: pnpm-workspace.yaml
Line: 83

Comment:
The `tslib` override changed from the range `^2.8.1` (any 2.x.x ≥ 2.8.1) to the exact pin `2.8.1`. The intent — a single shared tslib across the workspace — is preserved either way, but an exact pin means a future `pnpm audit` finding against tslib 2.8.1 would require a manual edit here before it can be resolved. Consider keeping the caret form so a `pnpm update tslib` can pick up patch releases without touching this file.

```suggestion
  tslib: ^2.8.1
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The team prefers to use exact versioning to better protect against supply chain attacks.

@jbocce
jbocce requested a review from sedghi June 17, 2026 07:15
@jbocce
jbocce merged commit 6acbbc0 into OHIF:master Jun 17, 2026
9 checks passed
@jbocce
jbocce deleted the fix/OHIF-2644-security-patches branch June 17, 2026 14:51
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