Find a file
2022-03-23 16:42:39 -07:00
.github Add package write permission to release ci step 2022-03-12 07:52:11 -08:00
hack Include line numbers in git metadata (#97) 2022-03-22 09:27:15 -07:00
pkg check request errors 2022-03-23 16:42:34 -07:00
proto Use ignoreList instead of denyChannel (#98) 2022-03-22 09:27:35 -07:00
scripts Adding detectors (#46) 2022-03-04 08:39:22 -08:00
.gitattributes Adding detectors (#46) 2022-03-04 08:39:22 -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 Add git to Dockerfiles 2022-03-14 22:57:55 -07:00
Dockerfile.goreleaser Add git to Dockerfiles 2022-03-14 22:57:55 -07:00
go.mod Bump github.com/zricethezav/gitleaks/v8 from 8.5.0 to 8.5.1 (#103) 2022-03-23 16:41:50 -07:00
go.sum Bump github.com/zricethezav/gitleaks/v8 from 8.5.0 to 8.5.1 (#103) 2022-03-23 16:41:50 -07:00
LICENSE Add license 2022-01-12 08:56:33 -08:00
main.go Include line numbers in git metadata (#97) 2022-03-22 09:27:15 -07:00
Makefile Add DenyChannel to slack source (#90) 2022-03-18 10:38:20 -07:00
README.md Update detector process and readme (#79) 2022-03-14 17:27:14 -07:00
SECURITY.md Initial docs and release automation (#5) 2022-01-18 16:59:18 -08:00

GoReleaser Logo

TruffleHog

Find leaked credentials.


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

Demo

Stargazers over time

Installation

Several options:

1. Go

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

2. Release binaries

3. Docker

Note: Apple M1 hardware users should run with docker run --platform linux/arm64 for better performance.

Most users

docker run -it -v "$PWD:/pwd" ghcr.io/trufflesecurity/trufflehog2:latest github --repo https://github.com/trufflesecurity/test_keys --debug 

Apple M1 users

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/trufflehog2:latest github --repo https://github.com/trufflesecurity/test_keys 

4. Pip (help wanted)

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!

5. Brew (help wanted)

We'd love to distribute via brew and could use your help.

Usage

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

  • git
  • github
  • gitlab
  • S3
  • filesystem
  • file and stdin

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

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Stargazers over time

Stargazers over time

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.