Repository navigation
Tighten Supabase service role key match, add Auth0 patterns - #154
Merged
Merged
Conversation
Owner
|
Thanks for the contribution, Alvaro. I kept your original fix and added a separate follow-up for the JWT claim-order edge cases and hook coverage. All checks are passing, and the PR is now merged. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Supabase service role key pattern matched any HS256 JWT header, so it also flagged public anon keys since both share the same header. I scoped the match to require the base64-encoded service_role claim in the payload, the same technique already used in cli/hooks/patterns.js, and bumped severity to critical now that the match is precise. I also added dedicated patterns for Auth0 client secret assignments and Auth0 Management API tokens, which previously were only caught when paired with a client_secret on the same line as the tenant domain. Fixes #56.
Ran this through the project's own CI on my fork before opening it, all green.