π‘οΈ Sentinel: [CRITICAL] Fix internal error leakage in OAuth callback#266
π‘οΈ Sentinel: [CRITICAL] Fix internal error leakage in OAuth callback#266davidruzicka wants to merge 1 commit into
Conversation
Replaced hardcoded 500 error string with a dynamically generated `correlationId` using `generateCorrelationId()` to safely map client-facing generic errors to detailed server-side logs, addressing the "[CRITICAL] Internal Error Leakage via API Responses" directive from Sentinel. - Updated `handleCallback` in `ExternalOAuthProvider` to generate and log a `correlationId` upon error. - Updated the response to client with a generic message and `correlationId`. - Added related assertions to `src/auth/oauth-provider.test.ts`. Co-authored-by: davidruzicka <14172985+davidruzicka@users.noreply.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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Codecov Reportβ
All modified and coverable lines are covered by tests. π’ Thoughts on this report? Let us know! |
This PR resolves a Sentinel finding regarding Internal Error Leakage via API Responses (
CWE-209).It ensures that any unexpected error occurring during the OAuth token exchange callback phase is sanitized before reaching the user. We now dynamically generate a unique
correlationIdto link the generic client response with the verbose server-side log, without risking exposure of sensitive system internals.PR created automatically by Jules for task 18158615342972380218 started by @davidruzicka