Searches through git repositories for high entropy strings, digging deep into commit history
Python
Latest commit 7d8009f Jan 4, 2017 flower shuffling imports
Permalink
Failed to load latest commit information.
LICENSE Initial commit Dec 31, 2016
README.md fixing merge conflicts Jan 3, 2017
requirements.txt adding dependancies Dec 31, 2016
truffleHog.py shuffling imports Jan 4, 2017

README.md

Truffle Hog

Searches through git repositories for high entropy strings, digging deep into commit history and branches. This is effective at finding secrets accidentally committed that contain high entropy.

python truffleHog.py https://github.com/dxa4481/truffleHog.git

Example

Setup

The only requirement is GitPython, which can be installed with the following

pip install -r requirements.txt

How it works

This module will go through the entire commit history of each branch, and check each diff from each commit, and evaluate the shannon entropy for both the base64 char set and hexidecimal char set for every blob of text greater than 20 characters comprised of those character sets in each diff. If at any point a high entropy string >20 characters is detected, it will print to the screen.

Wishlist

  • A way to detect and not scan binary diffs
  • Don't rescan diffs if already looked at in another branch