Find a file
2022-03-04 08:39:22 -08:00
.github update docs and support multi platform docker images 2022-02-15 18:54:47 -08:00
pkg Update AWS prefixes 2022-03-04 08:39:22 -08:00
proto improvements 2022-03-04 08:39:17 -08:00
scripts Initial CLI w/ partially implemented Git source and demo detector (#1) 2022-01-13 12:02:24 -08:00
.gitignore update docs and support multi platform docker images 2022-02-15 18:54:47 -08:00
.goreleaser.yml update docs and support multi platform docker images 2022-02-15 18:54:47 -08:00
CODE_OF_CONDUCT.md Initial docs and release automation (#5) 2022-01-18 16:59:18 -08:00
CONTRIBUTING.md Initial docs and release automation (#5) 2022-01-18 16:59:18 -08:00
Dockerfile Initial docs and release automation (#5) 2022-01-18 16:59:18 -08:00
Dockerfile.goreleaser update docs and support multi platform docker images 2022-02-15 18:54:47 -08:00
go.mod improvements 2022-03-04 08:39:17 -08:00
go.sum improvements 2022-03-04 08:39:17 -08:00
LICENSE Add license 2022-01-12 08:56:33 -08:00
main.go improvements 2022-03-04 08:39:17 -08:00
Makefile Add missing pagination on github calls (#30) 2022-02-15 18:54:47 -08:00
README.md update docs and support multi platform docker images 2022-02-15 18:54:47 -08:00
SECURITY.md Initial docs and release automation (#5) 2022-01-18 16:59:18 -08:00

TruffleHog

CI Status Go Report Card Docker Hub Build Status GitHub

Join The Slack

Have questions? Feedback? Jump in slack and hang out with us

https://join.slack.com/t/trufflehog-community/shared_invite/zt-pw2qbi43-Aa86hkiimstfdKH9UCpPzQ

Installation

Several options:

1. Go

go install github.com/trufflesecurity/trufflehog2.git@latest

2. Release binaries

3. Docker

$ docker run -v "$PWD:/pwd" ghcr.io/trufflesecurity/trufflehog2:latest github --repo https://github.com/dustin-decker/secretsandstuff.git     
🐷🔑🐷  TruffleHog. Unearth your secrets. 🐷🔑🐷

Found verified result 🐷🔑
Detector Type: AWS
File: aws
Link: https://github.com/dustin-decker/secretsandstuff/blob/90c75f884c65dc3638ca1610bd9844e668f213c2/aws
Repository: https://github.com/dustin-decker/secretsandstuff.git
Commit: 90c75f884c65dc3638ca1610bd9844e668f213c2
Email: dustindecker@protonmail.com

Found unverified result 🐷🔑❓
Detector Type: Github
File: slack
Link: https://github.com/dustin-decker/secretsandstuff/blob/8afb0ecd4998b1179e428db5ebbcdc8221214432/slack
Repository: https://github.com/dustin-decker/secretsandstuff.git
Commit: 8afb0ecd4998b1179e428db5ebbcdc8221214432
Email: dustindecker@protonmail.com
...

4. Pip (TODO)

pip install trufflehog

5. Brew (TODO)

brew install trufflehog

Usage

TruffleHog has a sub-command for each source of data that you may want to scan:

  • git
  • github
  • gitlab
  • slack
  • S3

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/trufflehog2.git

License Change

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.