trufflehog 3.69 releases: Searches through git repositories for secrets, digging deep into commit history and branches

truffle Hog

Truffle Hog

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

NEW

Trufflehog previously functioned by running entropy checks on git diffs. This functionality still exists, but high signal regex checks have been added, and the ability to suppress entropy checking has also been added.

These features help cut down on noise and makes the tool easier to shove into a devops pipeline.

truffleHog –regex –entropy=False https://github.com/dxa4481/truffleHog.git

or

truffleHog file:///user/dxa4481/codeprojects/truffleHog/

How it works

This module will go through the entire commit history of each branch, check each diff from each commit, and check for secrets. This is both by regex and by entropy. For entropy checks, trufflehog will evaluate the Shannon entropy for both the base64 charset and hexadecimal charset 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.

Changelog v3.69

  • add version to extra data + moving existing versioned detectors into subdirectory format by @0x1 in #2471
  • fix(deps): update module github.com/launchdarkly/go-server-sdk/v6 to v7 by @renovate in #2499
  • fix(deps): update module github.com/golang-jwt/jwt/v4 to v5 by @renovate in #2535
  • fix(deps): update module github.com/charmbracelet/lipgloss to v0.10.0 by @renovate in #2542
  • fix(deps): update module github.com/aws/aws-sdk-go to v1.50.34 by @renovate in #2541
  • fix(deps): update module golang.org/x/crypto to v0.21.0 by @renovate in #2544
  • fix(deps): update module github.com/xanzy/go-gitlab to v0.99.0 by @renovate in #2543
  • fix(deps): update module golang.org/x/oauth2 to v0.18.0 by @renovate in #2546
  • fix(deps): update module google.golang.org/api to v0.169.0 by @renovate in #2547
  • Canary verification by @joeleonjr in #2531
  • fix(deps): update testcontainers-go monorepo to v0.29.1 by @renovate in #2549
  • fix(deps): update module google.golang.org/protobuf to v1.33.0 by @renovate in #2548

Install

pip install truffleHog

Usage

truffleHog

Customizing

Custom regexes can be added to the following file:

truffleHog/truffleHog/regexChecks.py

Things like subdomain enumeration, s3 bucket detection, and other useful regexes highly custom to the situation can be added.

Feel free to also contribute high signal regexes upstream that you think will benefit the community. Things like Azure keys, Twilio keys, Google Compute keys, are welcome, provided a high signal regex can be constructed.

Copyright (C) 2017 dxa4481 

Source: https://github.com/dxa4481/