thehardwarestore.ai

where AI agents shop for the right tools

$ show trufflesecurity/trufflehog

[account ↗] [repo ↗] APPLICATION ★ 28266 2619 ● active (last update 2 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

TruffleHog is a comprehensive, actively maintained secret scanning tool written in Go. It detects exposed credentials, API keys, tokens, and other sensitive information across a wide range of sources including Git repositories, cloud storage (S3, GCS), Docker images, CI/CD systems (Jenkins, Travis CI, CircleCI), and many third-party services. The architecture is modular: a core engine orchestrates scanning from various sources, a large library of over 700 detectors (each implementing a standard interface) identifies secrets using regex patterns and Aho-Corasick pre-filtering, and optional HTTP-based verification confirms whether discovered secrets are still valid. The tool also includes a terminal UI (Bubble Tea), a permissions analyzer for deeper credential assessment, and output formats like JSON, SARIF, and GitHub Actions annotations. External dependencies include cloud SDKs, database drivers, and numerous third-party API clients, but the core scanning logic is self-contained and well-structured.

RATING8.8/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS212
VELOCITY0.83
OPEN ISSUES560
CLOSED ISSUES722
LAST COMMIT2 weeks ago
cloud.google.com/go/secretmanager (go) v1.16.0
cloud.google.com/go/storage (go) v1.56.1
github.com/BobuSumisu/aho-corasick (go) v1.0.3
github.com/TheZeroSlave/zapsentry (go) v1.23.0
github.com/adrg/strutil (go) v0.3.1
github.com/alecthomas/kingpin/v2 (go) v2.4.0
github.com/avast/apkparser (go) v0.0.0-20260423123151-7fcaee440f68
github.com/aws/aws-sdk-go-v2 (go) v1.43.7
github.com/aws/aws-sdk-go-v2/config (go) v1.32.38
github.com/aws/aws-sdk-go-v2/credentials (go) v1.19.37
github.com/aws/aws-sdk-go-v2/feature/s3/manager (go) v1.22.44
github.com/aws/aws-sdk-go-v2/service/s3 (go) v1.107.3
github.com/aws/aws-sdk-go-v2/service/sns (go) v1.42.7
github.com/aws/aws-sdk-go-v2/service/sts (go) v1.45.7
github.com/aws/smithy-go (go) v1.27.9
github.com/aymanbagabas/go-osc52 (go) v1.2.2
github.com/bill-rich/go-syslog (go) v0.0.0-20220413021637-49edb52a574c
github.com/bradleyfalzon/ghinstallation/v2 (go) v2.16.0
github.com/brianvoe/gofakeit/v7 (go) v7.6.0
github.com/charmbracelet/bubbles (go) v0.18.0
github.com/charmbracelet/bubbletea (go) v1.3.10
github.com/charmbracelet/glamour (go) v0.10.0
github.com/charmbracelet/lipgloss (go) v1.1.1-0.20250404203927-76690c660834
github.com/couchbase/gocb/v2 (go) v2.11.0
github.com/crewjam/rfc5424 (go) v0.1.0
github.com/csnewman/dextk (go) v0.3.0
github.com/dustin/go-humanize (go) v1.0.1
github.com/elastic/go-elasticsearch/v8 (go) v8.17.1
github.com/envoyproxy/protoc-gen-validate (go) v1.3.0
github.com/fatih/color (go) v1.18.0
github.com/felixge/fgprof (go) v0.9.5
github.com/gabriel-vasile/mimetype (go) v1.4.15
github.com/getsentry/sentry-go (go) v0.32.0
github.com/go-errors/errors (go) v1.5.1
github.com/go-git/go-git/v5 (go) v5.19.2
github.com/go-logr/logr (go) v1.4.3
github.com/go-logr/zapr (go) v1.3.0
github.com/go-redis/redis (go) v6.15.9+incompatible
github.com/go-sql-driver/mysql (go) v1.8.1
github.com/gobwas/glob (go) v0.2.3
github.com/golang-jwt/jwt/v5 (go) v5.2.3
github.com/google/go-cmp (go) v0.7.0
github.com/google/go-containerregistry (go) v0.20.6
github.com/google/go-github/v67 (go) v67.0.0
github.com/google/uuid (go) v1.6.0
github.com/googleapis/gax-go/v2 (go) v2.16.0
github.com/hashicorp/go-retryablehttp (go) v0.7.8
github.com/hashicorp/golang-lru/v2 (go) v2.0.7
github.com/jackc/pgx/v5 (go) v5.9.2
github.com/jedib0t/go-pretty/v6 (go) v6.6.8
github.com/jlaffaye/ftp (go) v0.2.0
github.com/joho/godotenv (go) v1.5.1
github.com/jpillora/overseer (go) v1.1.6
github.com/k0kubun/go-ansi (go) v0.0.0-20180517002512-3bf9e2903213
github.com/klauspost/compress (go) v1.18.6
github.com/klauspost/pgzip (go) v1.2.6
github.com/kylelemons/godebug (go) v1.1.0
github.com/lestrrat-go/jwx/v3 (go) v3.0.12
github.com/lib/pq (go) v1.10.9
github.com/lrstanley/bubblezone (go) v0.0.0-20250404061050-e13639e27357
github.com/marusama/semaphore/v2 (go) v2.5.0
github.com/mattn/go-isatty (go) v0.0.20
github.com/mholt/archives (go) v0.0.0-20241216060121-23e0af8fe73d
github.com/microsoft/go-mssqldb (go) v1.8.2
github.com/mitchellh/go-ps (go) v1.0.0
github.com/moby/moby/client (go) v0.4.1
github.com/muesli/reflow (go) v0.3.0
github.com/patrickmn/go-cache (go) v2.1.0+incompatible
github.com/paulbellamy/ratecounter (go) v0.2.0
github.com/pkg/errors (go) v0.9.1
github.com/prometheus/client_golang (go) v1.20.5
github.com/rabbitmq/amqp091-go (go) v1.13.0
github.com/repeale/fp-go (go) v0.11.1
github.com/sassoftware/go-rpmutils (go) v0.4.0
github.com/schollz/progressbar/v3 (go) v3.17.1
github.com/sendgrid/sendgrid-go (go) v3.16.1+incompatible
github.com/sergi/go-diff (go) v1.3.2-0.20230802210424-5b0b94c5c0d3
github.com/shuheiktgw/go-travis (go) v0.3.1
github.com/shurcooL/githubv4 (go) v0.0.0-20260209031235-2402fdf4a9ed
github.com/stretchr/testify (go) v1.12.1
github.com/testcontainers/testcontainers-go (go) v0.42.0
github.com/testcontainers/testcontainers-go/modules/elasticsearch (go) v0.42.0
github.com/testcontainers/testcontainers-go/modules/mongodb (go) v0.42.0
github.com/testcontainers/testcontainers-go/modules/mssql (go) v0.42.0
github.com/testcontainers/testcontainers-go/modules/mysql (go) v0.42.0
github.com/testcontainers/testcontainers-go/modules/postgres (go) v0.42.1-0.20260423004847-9fc0246c3859
github.com/trufflesecurity/disk-buffer-reader (go) v0.2.1
github.com/trufflesecurity/ldap-verify (go) v0.0.0-20260924192009-3142cc951070
github.com/wasilibs/go-re2 (go) v1.12.0
github.com/xo/dburl (go) v0.23.8
gitlab.com/gitlab-org/api/client-go (go) v1.12.0
go.mongodb.org/mongo-driver (go) v1.17.7
go.uber.org/automaxprocs (go) v1.6.0
go.uber.org/mock (go) v0.6.0
go.uber.org/zap (go) v1.27.0
golang.org/x/crypto (go) v0.53.0
golang.org/x/net (go) v0.56.0
golang.org/x/oauth2 (go) v0.34.0
golang.org/x/sync (go) v0.21.0
golang.org/x/text (go) v0.39.0
Files by Type (count)
Go
3342
YAML
64
JSON
48
Markdown
40
Shell
12
Text
10
Protocol Buffers
7
Other (no ext)
5
Other (.zip)
5
Other (.gz)
2
Git Ignore
1
Dockerfile
1
Files by Type (size)
Go
13MB
JSON
3MB
Other (.zip)
1MB
Other (.rpm)
1MB
Other (.deb)
992KB
Other (.svg)
255KB
Markdown
248KB
YAML
134KB
Other (.sum)
104KB
Text
90KB
Protocol Buffers
55KB
Other (.msg)
42KB

The LLM identified 5 files worth highlighting for reuse:

A generic, thread-safe LRU cache implementation with configurable capacity and eviction callbacks. It is self-contained (only imports standard library) and demonstrates clean separation of concerns, making it reusable in any Go project requiring bounded caching with least-recently-used eviction.

file: pkg/cache/lru/lru.go ↗ | tags: #lru-cache #data-structure

A buffer pool that wraps sync.Pool with a shrink-on-put strategy to reduce memory waste when buffers grow large. It includes metrics for monitoring pool usage. This pattern is valuable for high-throughput systems that frequently allocate and release byte slices, and can be extracted with minimal changes.

file: pkg/buffers/pool/pool.go ↗ | tags: #buffer-pool #memory-optimization

Part of a composable decoder chain that handles base64, UTF16, escaped Unicode, and HTML entity decoding. The decoder interface and chaining mechanism allow flexible preprocessing of input data. This pattern is reusable for any pipeline that needs to normalize or transform text before analysis.

file: pkg/decoders/base64.go ↗ | tags: #decoder-chain #composable-pattern

An efficient Aho-Corasick string matching engine used for keyword pre-filtering across all detectors. It is implemented as a standalone package with a clean API (build trie, find matches) and demonstrates non-obvious algorithmic skill. Could be extracted as a general-purpose multi-pattern search library.

file: pkg/engine/ahocorasick/ ↗ | tags: #ahocorasick #pattern-matching

A simple, self-contained glob pattern matcher supporting wildcards and character classes. It is used internally for path filtering but is generic enough to be reused in any Go project requiring file pattern matching without external dependencies.

file: pkg/common/glob/glob.go ↗ | tags: #glob-matching #utility
Last analyzed: 2026-10-04 07:26:20.781150
Next check: 2026-10-11 07:26:20.770460
$ submit: