surface IdentifyOnly results from cookies and manual product mode#393
Merged
surface IdentifyOnly results from cookies and manual product mode#393
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #393 +/- ##
===========================================
+ Coverage 99.85% 100.00% +0.14%
===========================================
Files 31 30 -1
Lines 3412 3084 -328
===========================================
- Hits 3407 3084 -323
+ Misses 5 0 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The cookies branch of carve() previously only emitted SecretFound, with no
IdentifyOnly fallback like the headers and body branches had. Likewise,
check_all_modules (the manual / 'badsecrets <product>' path) only ran
check_secret. As a result, recognizable cryptographic products with unknown
keys were silently dropped — most visibly Laravel cookies (carve_locations
is just ('cookies',)).
Both paths now mirror the headers/body symmetry:
- carve() cookies branch falls back to identify() when check_secret misses,
gated on validate_carve.
- check_all_modules returns a list of dicts (now including IdentifyOnly hits),
matching carve_all_modules's shape.
- carve_all_modules and check_all_modules suppress all IdentifyOnly results
when any module produces a SecretFound — actionable hits outrank
recognition-only candidates.
- cli.py product-mode iterates the new list and dispatches SecretFound vs
IdentifyOnly to the appropriate report; URL-mode unaffected.
bbot is unaffected: it imports only carve_all_modules and consumes the list
return that already existed.
0cca1b1 to
34da87e
Compare
Open
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.
Summary
Closes the gap reported on
main @ 6a7aa49wherebadsecrets -u <laravel-protected-site>printed "No secrets found :(" even though the Laravel cookie was correctly identified — only the APP_KEY wasn't in the wordlist.What changed
carve()cookies branch: adds an IdentifyOnly fallback gated onvalidate_carve, mirroring the headers and body branches.check_all_modules()(thebadsecrets <product>path): now runsidentify()aftercheck_secretmisses and returns a list of dicts (each taggedSecretFoundorIdentifyOnly), matchingcarve_all_modules().carve_all_modules()andcheck_all_modules()both suppress every IdentifyOnly result whenever any SecretFound exists — actionable hits outrank recognition-only candidates.cli.pyproduct-mode iterates the new list and dispatches SecretFound vs IdentifyOnly to the appropriate report. URL-mode unchanged.Safety: identify_regex audit
All eight modules whose
carve_locationsincludescookies(laravel, django, flask, rack2, yii2, express, shiro, ltpa) ship a specificidentify_regex— none rely on the defaultr".+". Thevalidate_carvegate is the kill switch if any future module forgets to override.bbot compatibility
bbot only imports
carve_all_modules, which already returns a list. No changes needed on the bbot side.