Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace secretsdb with trufflehog #2092

Merged
merged 6 commits into from
Dec 20, 2024
Merged

Replace secretsdb with trufflehog #2092

merged 6 commits into from
Dec 20, 2024

Conversation

TheTechromancer
Copy link
Collaborator

@TheTechromancer TheTechromancer commented Dec 18, 2024

Trufflehog has become the defacto secrets module in BBOT. Since secretsdb tends to hog CPU by using old fashioned python regexes, it's high time it was replaced.

The key step here was modifying Trufflehog to accept HTTP_RESPONSE events. Trufflehog doesn't yet support stdin mode, so it currently uses the filesystem module. (see trufflesecurity/trufflehog#162).

FYSA @domwhewell-sage. What do you think of also including RAW_TEXT?

@domwhewell-sage
Copy link
Contributor

Yeh I think we can include RAW_TEXT.

Looking at trufflehogs handlers it can search for secrets in .zip, .zip.gz, .tar.gz, .tgz, .tar, .rpm and .deb

So by giving it RAW_TEXT from .pdf's, word docs and alike we shouldn't be getting duplicated secrets

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 98.85057% with 1 line in your changes missing coverage. Please review.

Project coverage is 93%. Comparing base (48c0859) to head (40d1aff).
Report is 25 commits behind head on dev.

Files with missing lines Patch % Lines
bbot/core/event/base.py 97% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##             dev   #2092   +/-   ##
=====================================
- Coverage     93%     93%   -0%     
=====================================
  Files        376     374    -2     
  Lines      28689   28666   -23     
=====================================
- Hits       26491   26457   -34     
- Misses      2198    2209   +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TheTechromancer TheTechromancer merged commit b20c231 into dev Dec 20, 2024
14 checks passed
@liquidsec liquidsec deleted the delete-secretsdb branch January 13, 2025 17:08
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.

3 participants