🛡️ Sentinel: [MEDIUM] Add Global Error Boundary #59

Closed
ragusa-it wants to merge 1 commits from sentinel-error-boundary-16053538032478398505 into main
ragusa-it commented 2026-02-06 02:00:08 +00:00 (Migrated from github.com)

🛡️ Sentinel Security Enhancement: Global Error Boundary

Severity: MEDIUM (Defense in Depth / Error Handling)

Vulnerability:
The application lacked a global Error Boundary. If a component failed (runtime error, suspense failure), the entire React tree would unmount, leading to a "White Screen of Death". In some configurations, this might also risk exposing stack traces or error details to the user, which can leak implementation details.

Impact:

  • Availability: One broken component crashes the whole app.
  • Information Disclosure: Potential leak of stack traces (though mostly a concern in dev/misconfigured prod).
  • UX: Poor user experience during failures.

Fix:
Implemented a ErrorBoundary class component that:

  1. Catches errors in the component tree.
  2. Logs them securely (to console currently, extendable to monitoring services).
  3. Renders a generic, user-friendly fallback UI ("Something went wrong").
  4. Explicitly does not render error.message or error.stack to the DOM.

Verification:

  • Added src/components/layout/__tests__/ErrorBoundary.test.tsx verifying the fallback UI appears and the error text is NOT present.
  • Manually verified the application still starts up correctly (home page renders) via Playwright script.

PR created automatically by Jules for task 16053538032478398505 started by @ragusa-it

🛡️ Sentinel Security Enhancement: Global Error Boundary **Severity:** MEDIUM (Defense in Depth / Error Handling) **Vulnerability:** The application lacked a global Error Boundary. If a component failed (runtime error, suspense failure), the entire React tree would unmount, leading to a "White Screen of Death". In some configurations, this might also risk exposing stack traces or error details to the user, which can leak implementation details. **Impact:** - **Availability:** One broken component crashes the whole app. - **Information Disclosure:** Potential leak of stack traces (though mostly a concern in dev/misconfigured prod). - **UX:** Poor user experience during failures. **Fix:** Implemented a `ErrorBoundary` class component that: 1. Catches errors in the component tree. 2. Logs them securely (to console currently, extendable to monitoring services). 3. Renders a generic, user-friendly fallback UI ("Something went wrong"). 4. Explicitly **does not** render `error.message` or `error.stack` to the DOM. **Verification:** - Added `src/components/layout/__tests__/ErrorBoundary.test.tsx` verifying the fallback UI appears and the error text is NOT present. - Manually verified the application still starts up correctly (home page renders) via Playwright script. --- *PR created automatically by Jules for task [16053538032478398505](https://jules.google.com/task/16053538032478398505) started by @ragusa-it*
google-labs-jules[bot] commented 2026-02-06 02:00:09 +00:00 (Migrated from github.com)

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to **Reactive Mode**. When this mode is on, I will only act on comments where you specifically mention me with `@jules`. You can find this option in the **Pull Request** section of your [global Jules UI settings](https://jules.google.com/settings). You can always switch back! New to Jules? Learn more at [jules.google/docs](https://jules.google/docs). --- *_For security, I will only act on instructions from the user who triggered this task._*

Pull request closed

Sign in to join this conversation.