Find credentials all over the place
10M+
Find leaked credentials.
Have questions? Feedback? Jump in slack and hang out with us
https://join.slack.com/t/trufflehog-community/shared_invite/zt-pw2qbi43-Aa86hkiimstfdKH9UCpPzQ
TruffleHog v3 is a complete rewrite in Go with many new powerful features.
For every potential credential that is detected, we've painstakingly implemented programatic verification against the API that we think it belongs to. Verification eliminates false positives. For example, the AWS credential detector performs a GetCallerIdentity API call against the AWS API to verify if an AWS credential is active.
Several options:
go install github.com/trufflesecurity/trufflehog.git@latest
Note: Apple M1 hardware users should run with
docker run --platform linux/arm64for better performance.
docker run -it -v "$PWD:/pwd" ghcr.io/trufflesecurity/trufflehog:latest github --repo https://github.com/trufflesecurity/test_keys --debug
The linux/arm64 image is better to run on the M1 than the amd64 image.
Even better is running the native darwin binary avilable, but there is not container image for that.
docker run --platform linux/arm64 -it -v "$PWD:/pwd" ghcr.io/trufflesecurity/trufflehog:latest github --repo https://github.com/trufflesecurity/test_keys
It's possible to distribute binaries in pip wheels.
Here is an example of a project that does it.
Help with setting up this packaging would be appreciated!
We'd love to distribute via brew and could use your help.
TruffleHog has a sub-command for each source of data that you may want to scan:
Each subcommand can have options that you can see with the -h flag provided to the sub command:
$ trufflehog git --help
usage: TruffleHog git [<flags>] <uri>
Find credentials in git repositories.
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--debug Run in debug mode
--json Output in JSON format.
--concurrency=8 Number of concurrent workers.
--verification Verify the results.
-i, --include_paths=INCLUDE_PATHS
Path to file with newline separated regexes for files to include in scan.
-x, --exclude_paths=EXCLUDE_PATHS
Path to file with newline separated regexes for files to exclude in scan.
--branch=BRANCH Branch to scan.
--allow No-op flag for backwards compat.
--entropy No-op flag for backwards compat.
--regex No-op flag for backwards compat.
Args:
<uri> Git repository URL. https:// or file:// schema expected.
For example, to scan a git repository, start with
$ trufflehog git https://github.com/trufflesecurity/trufflehog.git
This project exists thanks to all the people who contribute. [Contribute].
Contributions are very welcome! Please see our contribution guidelines first.
We no longer accept contributions to TruffleHog v2, but that code is available in the v2 branch.
Since v3.0, TruffleHog is released under a AGPL 3 license, included in LICENSE. TruffleHog v3.0 uses none of the previous codebase, but care was taken to preserve backwards compatibility on the command line interface. The work previous to this release is still available licensed under GPL 2.0 in the history of this repository and the previous package releases and tags. A completed CLA is required for us to accept contributions going forward.
Content type
Image
Digest
sha256:7fa530fec…
Size
45.7 MB
Last updated
about 10 hours ago
docker pull trufflesecurity/trufflehog