Repository navigation
Add long redirection response detection to excavate - #3481
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3481 +/- ##
=====================================
+ Coverage 91% 91% +1%
=====================================
Files 461 461
Lines 49520 49580 +60
=====================================
+ Hits 44655 44710 +55
- Misses 4865 4870 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
📊 Performance Benchmark Report
📈 Detailed Results (All Benchmarks)
🎯 Performance Summary+ 1 improvement 🚀
30 unchanged ✅🔍 Significant Changes (>10%)
🐍 Python Version 3.11.16 |
liquidsec
added a commit
that referenced
this pull request
Oct 3, 2026
Collapse the guard chain onto event.http_status, which already handles a missing or non-integer status code. Require the body to be navigable or interactive: more than 10 distinct links, or more than 2 inputs. Across 30,894 real responses (14,874 3xx with a Location, 7,654 hosts), size alone flags 66 hosts of which 8 are genuine. The shape gate flags 9, keeping all 8. Report the link and input counts in the description so triage can see which arm fired.
Report a 3xx whose body continues for at least the threshold past the end of the HTML document. That is the server running the handler the redirect was meant to skip, rather than any body that happens to be large. Body size was the wrong signal. Across 14,874 real 3xx responses it flagged 66 hosts, of which 8 carried anything withheld; the rest were inlined analytics agents, framework payloads and error pages. Trailing content flags 6 hosts with no false positives. Raise severity to LOW now that the check identifies a specific defect.
liquidsec
marked this pull request as ready for review
October 6, 2026 22:01
en0f
approved these changes
Oct 6, 2026
liquidsec
added a commit
that referenced
this pull request
Oct 7, 2026
Two conflicts, both from each side appending tests at EOF. Kept both sides. bbot/test/test_step_1/test_depsinstaller.py: dev added test_sql_modules_request_sqlalchemy_asyncio_extra, this branch added the five installer review-fix tests. bbot/test/test_step_2/module_tests/test_module_excavate.py: dev added TestExcavateLongRedirect and TestExcavateLongRedirectDisabled (#3481), this branch added test_excavate_find_subclasses_does_not_touch_descriptors.
Draft
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.
Closes #3416
Detects a redirect whose body keeps going after the HTML document ends. Browsers discard the body of a 3xx, so content delivered there is never displayed. A server that writes a redirect document and then keeps writing has run the handler the redirect was meant to skip (CWE-698, Execution After Redirect).
A 3xx with a
Locationheader is reported at LOW severity, HIGH confidence, when at leastlong_redirect_thresholdbytes (default2048,0disables) follow</html>.Why not body size
Size was the original signal and it doesn't hold up. Measured against 30,894 responses from in-scope assets of public bug bounty programs, 14,874 of them 3xx with a
Location, across 7,654 hosts:What size catches is inlined RUM agents, SPA bundles served on canonical 307/308s, and platform error pages. All large, none of them withheld resources. Trailing content separates cleanly: where a handler kept running, the appended page is 23 KB to 352 KB, and ordinary redirect bodies trail 0 to 61 bytes of whitespace. Nothing lands in between.
Trailing content does miss two of the eight. Both are single-document cases, where the redirect is set as a header and the page renders normally, leaving nothing after
</html>to measure. That is a different defect shape, better served by its own check than by loosening this one, which would cost 58 false positives to recover 2 findings.The check measures the decoded body.
content_lengthreports the compressed size and was missing or unusable on two thirds of the candidates.Also
produced_eventsgainsFINDING, which excavate rules have always emitted viareport()but which was never declared.