Vulnerability Analysis
TruffleHog is an open-source secrets discovery, classification, verification and analysis tool by Truffle Security. It scans Git history, GitHub, filesystems, Docker images, cloud storage and other supported sources for API keys, passwords, private keys and related machine credentials.
sudo apt install trufflehog
trufflehog git <repository-url> --results=verified
TruffleHog v3 is an open-source secrets discovery, classification, verification and analysis tool maintained by Truffle Security. It looks for machine credentials such as API keys, database passwords and private keys across Git repositories, GitHub, GitLab, filesystems, Docker images, S3, Google Cloud Storage and other supported sources. The project classifies more than 800 secret types and has more than 700 detectors capable of checking credentials against real APIs. Use that capability only on assets you own or have explicit permission to assess, because verification may contact the service associated with a discovered credential.
Results are divided into verified, unverified and unknown states. Verified means a live check confirmed that the credential worked, unverified means a candidate was classified but not confirmed, and unknown means verification was attempted but failed because of a network, API or related problem. The default output includes all three states, while `--results` can select the states relevant to a workflow. JSON, legacy JSON for selected repository sources, SARIF and GitHub Actions output support automation, and `--fail` returns exit code 183 when findings are present.
Kali Linux provides TruffleHog through `sudo apt install trufflehog`, and the project also documents Homebrew, Docker, release binaries, an official install script and installation from Go source. A safe first scan uses the public `trufflesecurity/test_keys` demonstration repository rather than an unrelated project. Production use should combine scanning with token protection, scoped authorization, rotation and revocation procedures, output retention controls and repeatable CI checks. TruffleHog discovers exposure; it does not replace the operational response needed to invalidate a leaked credential.
| Command | Purpose |
|---|---|
trufflehog git https://github.com/trufflesecurity/test_keys --results=verified | Scan the official demo repo and report only verified live secrets. |
trufflehog github --org=<org> --results=verified | Scan every repo in a GitHub org for verified secrets.Add --token to raise GitHub rate limits on large orgs. |
trufflehog filesystem <path> | Scan files and directories for leaked credentials. |
trufflehog docker --image <image> --results=verified | Scan a container image for verified secrets. |
trufflehog s3 --bucket=<bucket> --results=verified,unknown | Scan an S3 bucket for verified and unknown secrets. |
trufflehog git file://. --since-commit main --branch feature-1 --results=verified,unknown --fail | Scan only new commits on a branch in CI and fail the build (exit 183) if secrets are found. |
sudo apt install trufflehogInstall the official Kali Linux TruffleHog package.brew install trufflehogInstall TruffleHog through Homebrew on macOS or Linux.curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh | sh -s -- -b /usr/local/binInstall the release binary into /usr/local/bin with the official project script.curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh | sh -s -- -v -b /usr/local/binInstall TruffleHog while verifying the checksum signature with cosign.git clone https://github.com/trufflesecurity/trufflehog.git && cd trufflehog && go installClone the official source repository and install TruffleHog with Go.trufflehog --versionPrint the installed TruffleHog version for setup and audit records.trufflehog --helpDisplay the available TruffleHog sources and global options.trufflehog git https://github.com/trufflesecurity/test_keys --results=verifiedScan the official authorized demo repository and report secrets verified against their services.trufflehog git https://github.com/trufflesecurity/test_keys --results=verified --jsonScan the official authorized demo repository and emit one JSON object for each verified result.trufflehog git file://test_keys --results=verified,unknownScan a local clone of the authorized demo repository and retain verified and unknown results.trufflehog git file://. --since-commit main --branch feature-1 --results=verified,unknown --failScan an authorized feature branch since main and return exit code 183 when matching results are found.trufflehog github --org=trufflesecurity --results=verifiedScan repositories in the public Truffle Security organization and report verified results.trufflehog github --org=trufflesecurity --exclude-archived --results=verifiedScan the public Truffle Security organization while skipping archived repositories.trufflehog github --repo=https://github.com/trufflesecurity/test_keys --issue-comments --pr-commentsScan the official authorized demo repository together with its issue and pull-request comments.trufflehog github-experimental --repo https://github.com/trufflesecurity/test_keys.git --object-discoveryRun alpha object discovery against the official authorized demo repository to enumerate hidden or deleted commit objects.trufflehog gitlab --token=<token>Scan an authorized GitLab scope using the required GitLab token.trufflehog filesystem path/to/file1.txt path/to/file2.txt path/to/dirScan authorized files and directories, including supported documents, binaries and archives.trufflehog filesystem . --sarif --no-verification > results.sarifScan the authorized current workspace without live verification and write SARIF output for code-scanning ingestion.trufflehog docker --image trufflesecurity/secrets --results=verifiedScan the official demonstration image from a remote registry and report verified secrets.trufflehog docker --image docker://new_image:tagScan an authorized image available through the local Docker daemon.trufflehog docker --image file://path_to_image.tarScan an authorized Docker image stored as a local tarball.trufflehog s3 --bucket=<bucket name> --results=verified,unknownScan an authorized S3 bucket and retain verified and unknown findings.trufflehog s3 --bucket=<bucket name> --role-arn=<iam role arn> --results=verifiedAssume an authorized IAM role while scanning an S3 bucket for verified secrets.trufflehog s3 --bucket=<bucket name> --include-prefix=src/ --include-extension=envLimit an authorized S3 scan to a literal object prefix and files whose extension is env.trufflehog gcs --project-id=<project-ID> --cloud-environment --results=verifiedScan an authorized Google Cloud project using its cloud environment and report verified findings.trufflehog postman --token=<postman api token> --workspace-id=<workspace id>Scan an authorized Postman workspace using its API token and workspace identifier.trufflehog jenkins --url https://jenkins.example.com --username admin --password adminScan an authorized Jenkins service using credentials supplied for the assessment.trufflehog elasticsearch --nodes 192.168.14.3 192.168.14.4 --username truffle --password hogScan authorized Elasticsearch nodes with the provided account credentials.trufflehog huggingface --model <model_id> --dataset <dataset_id> --space <space_id> --bucket <bucket_id>Scan authorized Hugging Face models, datasets, spaces and buckets by identifier.aws s3 cp s3://example/gzipped/data.gz - | gunzip -c | trufflehog stdinStream authorized decompressed S3 data into TruffleHog through standard input.Inspect the full history of a repository you own or are authorized to assess for committed API keys, passwords and private keys. Commit, file and line metadata helps responders locate the exposure and begin rotation.
Scan authorized GitHub organizations or repositories and optionally include issue and pull-request comments. Authentication reduces rate-limit pressure and allows access appropriate to the approved scope.
Inspect authorized remote images, local-daemon images or image tarballs for credentials copied into layers or application content. Verified findings should trigger credential rotation and an image rebuild.
Search approved S3 buckets and Google Cloud projects for secrets stored in objects, archives and environment files. Prefix and extension controls can narrow an S3 review to the agreed data set.
Run TruffleHog in GitHub Actions, GitLab CI or another authorized pipeline and use exit code 183 to block changes containing findings. JSON or SARIF can feed review and code-scanning systems.
Use verified status and supported credential analysis to prioritize exposed credentials that are still live. Responders can revoke or rotate the credential, remove its exposure and rescan the authorized source.
TruffleHog finds and classifies machine credentials such as API keys, database passwords and private keys across Git, Docker, filesystems, cloud storage and other supported sources.
Install the official Kali package with sudo apt install trufflehog, then verify the executable with trufflehog --version.
TruffleHog can test supported credentials against their real APIs; accepted credentials are verified, detected but unconfirmed candidates are unverified, and failed verification attempts are unknown.
Use the Git source on the official demo repository or a repository you own or are authorized to scan, and select the required result states with --results.
Exit code 183 means --fail was enabled and results were found without a scan error; it should be handled as a secret-detection outcome in CI.
TruffleHog offers broader source coverage and live verification, while Gitleaks is a lighter Git-focused option often suited to pre-commit checks.
Vulnerability Analysis
Nuclei is used to send requests across targets based on templates, allowing zero false positives and providing rapid scanning over large infrastructure footprints.
Information Gathering
theHarvester is a comprehensive OSINT tool for gathering email addresses, subdomains, employee names, open ports, and banners from public sources including search engines, PGP key servers, Shodan, and DNS databases for passive reconnaissance and attack surface mapping.
Password Attacks
Hashcat is the world's fastest and most advanced password recovery utility, supporting five unique modes of attack for over 300 highly optimized hashing algorithms. It leverages GPU power for incredible speed.
Vulnerability Analysis
OpenVAS (Open Vulnerability Assessment System) is a full-featured vulnerability scanner providing a comprehensive architectural network engine that checks endpoints against thousands of active vulnerability feeds.
Vulnerability Analysis
SSLScan queries SSL/TLS services (such as HTTPS) to determine supported ciphers, key exchanges, and security flaws like Heartbleed or broken protocol configurations.
Vulnerability Analysis
Lynis is a battle-tested security auditing tool for systems running Linux, macOS, or Unix-based operating systems. It performs an in-depth local scan to discover security weaknesses, configuration flaws, and system hardening opportunities.
Learn to use Amass for comprehensive attack surface mapping including DNS enumeration, subdomain discovery, integration with APIs, and visualizations.
Active Directory · AdvancedLearn how to use BloodHound and SharpHound for Active Directory reconnaissance, attack path analysis, privilege escalation detection, and security assessment.
Tools · BeginnerLearn Dirb for web content discovery and directory brute-forcing with wordlist-based scanning, file extension detection, and security assessment.
OSINT · BeginnerMaster DNS enumeration techniques from basic queries to advanced zone transfers, subdomain brute forcing, and DNS security assessment using Kali Linux tools.
TruffleHog prints a result for each classified credential candidate found in the authorized source. The detector identifies the secret type, while source metadata can identify the repository, commit, file and line that exposed it. A verified result means TruffleHog tested the credential against the relevant service and confirmed that it was accepted. An unverified result matched a detector but was not confirmed as valid, while unknown means verification was attempted but could not be completed because of a network, API or similar verification problem. By default, TruffleHog includes verified, unverified and unknown results; `--results` narrows that set. JSON output emits one object per result, which is convenient for pipelines, while SARIF is designed for code-scanning systems. With `--no-verification`, detection still runs but live API validation is disabled, so the output must not be described as confirmed. A private key marked verified was confirmed usable for SSH or SSL authentication through TruffleHog's private-key verification process. If the tool displays only its banner and exits, no secrets were detected. When `--fail` is present, exit code 183 means the scan completed without an error but found results; exit code 0 means no errors and no results, and exit code 1 means an error occurred. Treat every output artifact as sensitive because it can contain credentials, source locations and repository metadata.
This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.