🛡️ Sentinel: [CRITICAL/HIGH] Fix open redirect token leakage - #712
🛡️ Sentinel: [CRITICAL/HIGH] Fix open redirect token leakage#712n24q02m wants to merge 4 commits into
Conversation
This commit modifies the custom fetch wrapper `jFetch` to set `redirect: 'error'` when sending requests with an authorization token. This prevents accidental token leakage via cross-origin open redirects, a critical security defense-in-depth measure. Also adds corresponding unit tests in `security.test.js` to ensure the redirect option is tracked. Co-authored-by: n24q02m <135627235+n24q02m@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. |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This commit modifies the custom fetch wrapper `jFetch` to set `redirect: 'error'` when sending requests with an authorization token. This prevents accidental token leakage via cross-origin open redirects, a critical security defense-in-depth measure. Also adds corresponding unit tests in `security.test.js` and `background.test.js` to ensure the redirect option is tracked and to satisfy code coverage requirements. Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
…cking This commit duplicates the redirect tests from `security.test.js` to `background.test.js` to ensure the coverage tracker accurately measures the added redirect configurations in `jFetch` which addresses the Codecov failure. Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
This commit modifies the custom fetch wrapper `jFetch` to set `redirect: 'error'` when sending requests with an authorization token. This prevents accidental token leakage via cross-origin open redirects, a critical security defense-in-depth measure. Also adds corresponding unit tests in `security.test.js` and `background.test.js` to ensure the redirect option is tracked and to satisfy code coverage requirements. Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
🚨 Severity: CRITICAL
💡 Vulnerability: The
jFetchwrapper did not constrain HTTP redirects when sending requests with sensitive credentials (API tokens), making it susceptible to accidental token leakage via cross-origin open redirects.🎯 Impact: If the application fetched from an endpoint that initiated an open redirect, the authorization header containing the API token could be forwarded and leaked to a third-party domain.
🔧 Fix: Explicitly set
redirect: 'error'injFetchwhen an authentication token is provided and a redirect option is not already explicitly specified.✅ Verification: Ensure the test suite passes which now tracks the
redirectoption passed to the mockfetch. Runpnpm test.PR created automatically by Jules for task 8238353396502790442 started by @n24q02m