Remove unused @sentry/browser#322
Conversation
@sentry/browser 5.12.1 carried GHSA-3wmh-h74j-q3p6 (medium-severity
prototype-pollution gadget). On investigation, the package is not
actually used in osprey:
- `Sentry.init({ dsn })` is the only API called anywhere
- It's guarded by `if (process.env.REACT_APP_SENTRY_DSN)`
- The DSN is empty in `.env.production` and unset elsewhere
- So `init` never runs and no client-side errors are captured
The Python-side `sentry-sdk` is heavily used in the worker and is left
in place — only the JS browser SDK is being removed here.
Removes the package, the dead `ErrorReporting.tsx` module that wrapped
it, the import in `index.tsx`, and the empty DSN entry in
`.env.production`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
💤 Files with no reviewable changes (4)
📝 WalkthroughWalkthroughThe PR removes Sentry error reporting from osprey_ui by eliminating the ChangesSentry integration removal
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Summary
@sentry/browser@5.12.1is affected by GHSA-3wmh-h74j-q3p6 (medium-severity prototype-pollution gadget). On investigation, the package is not actually used:Sentry.init({ dsn })is the only API called anywhere inosprey_ui/.if (process.env.REACT_APP_SENTRY_DSN).REACT_APP_SENTRY_DSN=is empty in.env.productionand unset everywhere else, soinitnever runs.captureException, no error boundaries, no Sentry wiring anywhere else in the source.This appears to be leftover from Osprey's pre-OSS Discord-internal use, where a DSN was injected at deploy time. ROOST hasn't used it.
Removes:
@sentry/browserfromosprey_ui/package.json+package-lock.json(~12 packages drop from the lockfile)osprey_ui/src/utils/ErrorReporting.tsx— the 4-line wrapper that was the only call siteosprey_ui/src/index.tsxREACT_APP_SENTRY_DSN=entry in.env.productionThe Python-side
sentry-sdkis heavily used in the worker (10+ call sites) and is not affected by this change — only the JS browser SDK is being removed.Closes #320. Part of the Dependabot triage tracked in #219.
Test plan
npm install— package-lock regenerates cleanly, 12 packages removednpm run build— production bundle builds successfullygrep -rn "sentry\|Sentry" src— zero remaining referencesFollow-up
There are several other packages pinned but never imported in Osprey (likely also Discord vestiges —
erlpack,nostril, severalgoogle-cloud-*). Tracking issue to follow.🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes