fix(js): supabase jwt base64url decode and per-project error isolation#342
Open
TBX3D wants to merge 4 commits into
Open
fix(js): supabase jwt base64url decode and per-project error isolation#342TBX3D wants to merge 4 commits into
TBX3D wants to merge 4 commits into
Conversation
htmlquery.Parse and QueryAll failures returned before spin.Stop(), leaving the "Scanning JavaScript files" spinner running forever on those paths while every other error branch in the function stops it first.
Quoted regex flag combos like "/gi" or "/su" in ordinary JS (e.g.
str.replace("/gi", x)) matched the root-relative path alternative in
endpointRegex and were reported as endpoints. Denylist the known flag
bigrams by exact match instead of raising minEndpointLen, so real short
endpoints like /v1, /me, /ws still extract normally.
…error ScanSupabase iterates every JWT found in a script and can discover several distinct supabase projects. Four error paths inside that loop (reading the signup response, parsing it, fetching the openapi spec, and a missing Paths field) returned nil and the whole error, discarding any results already collected for earlier, successfully scanned projects. Skip the broken project with continue instead so the scan still returns what it found.
pr summary6 files changed (+278 -6)
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #342 +/- ##
=======================================
Coverage ? 55.95%
=======================================
Files ? 81
Lines ? 6881
Branches ? 0
=======================================
Hits ? 3850
Misses ? 2744
Partials ? 287 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
TBX3D
force-pushed
the
harden-jsdetect-probe
branch
from
July 9, 2026 21:52
76af728 to
e48519f
Compare
go's regexp is re2 and linear by construction; the timing threshold added only flake under -race load, not coverage. the regex-flag-literal false positive it sat next to is guarded by TestRegexFlagEndpointsNotReported.
TBX3D
force-pushed
the
harden-jsdetect-probe
branch
from
July 9, 2026 23:52
e48519f to
6a29010
Compare
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.
four independent js-scan fixes: a supabase project's fetch/parse failure
(signup response, openapi spec) used to abort the whole scan, now it's
logged and skipped so other projects on the same page still get scanned;
a quoted regex-flag literal like "/gi" was reported as an endpoint; the
progress spinner kept running past an early script-parse error; and a
flaky wall-clock ReDoS-timing probe test is dropped (timing-based tests
are inherently unstable in CI).