Skip to content

🛡️ Sentinel: [CRITICAL/HIGH] Fix open redirect token leakage - #712

Open
n24q02m wants to merge 4 commits into
mainfrom
sentinel/fix-open-redirect-token-leakage-8238353396502790442
Open

🛡️ Sentinel: [CRITICAL/HIGH] Fix open redirect token leakage#712
n24q02m wants to merge 4 commits into
mainfrom
sentinel/fix-open-redirect-token-leakage-8238353396502790442

Conversation

@n24q02m

@n24q02m n24q02m commented Aug 27, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: CRITICAL
💡 Vulnerability: The jFetch wrapper 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' in jFetch when an authentication token is provided and a redirect option is not already explicitly specified.
✅ Verification: Ensure the test suite passes which now tracks the redirect option passed to the mock fetch. Run pnpm test.


PR created automatically by Jules for task 8238353396502790442 started by @n24q02m

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>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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.

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
background.js 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

google-labs-jules Bot and others added 3 commits August 27, 2026 22:43
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>
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.

1 participant