[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4687":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":37,"readmeContent":38,"aiSummary":39,"trendingCount":16,"starSnapshotCount":16,"syncStatus":40,"lastSyncTime":41,"discoverSource":42},4687,"trufflehog","trufflesecurity\u002Ftrufflehog","trufflesecurity","Find, verify, and analyze leaked credentials","https:\u002F\u002Ftrufflesecurity.com",null,"Go",26730,2454,203,259,0,14,102,598,73,120,"GNU Affero General Public License v3.0",false,"main",[26,27,28,29,30,31,32,33,34,35,5,36],"credentials","devsecops","dynamic-analysis","precommit","scanning","secret","secret-management","secrets","security","security-tools","verification","2026-06-12 04:00:22","\u003Cp align=\"center\">\n  \u003Cimg alt=\"GoReleaser Logo\" src=\"https:\u002F\u002Fstorage.googleapis.com\u002Ftrufflehog-static-sources\u002Fpixel_pig.png\" height=\"140\" \u002F>\n  \u003Ch2 align=\"center\">TruffleHog\u003C\u002Fh2>\n  \u003Cp align=\"center\">Find leaked credentials.\u003C\u002Fp>\n\u003C\u002Fp>\n\n---\n\n\u003Cdiv align=\"center\">\n\n[![Go Report Card](https:\u002F\u002Fgoreportcard.com\u002Fbadge\u002Fgithub.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Fv3)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Fv3)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-AGPL--3.0-brightgreen)](\u002FLICENSE)\n[![Total Detectors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fdirectory-file-count\u002Ftrufflesecurity\u002FtruffleHog\u002Fpkg\u002Fdetectors?label=Total%20Detectors&type=dir)](\u002Fpkg\u002Fdetectors)\n\n\u003C\u002Fdiv>\n\n---\n\n# :mag_right: _Now Scanning_\n\n\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"assets\u002Fscanning_logos.svg\">\n\n**...and more**\n\nTo learn more about TruffleHog and its features and capabilities, visit our [product page](https:\u002F\u002Ftrufflesecurity.com\u002Ftrufflehog?gclid=CjwKCAjwouexBhAuEiwAtW_Zx5IW87JNj97Ci7heFnA5ar6-DuNzT2Y5nIl9DuZ-FOUqx0Qg3vb9nxoClcEQAvD_BwE).\n\n\u003C\u002Fdiv>\n\n# :globe_with_meridians: TruffleHog Enterprise\n\nAre you interested in continuously monitoring **Git, Jira, Slack, Confluence, Microsoft Teams, Sharepoint (and more)** for credentials? We have an enterprise product that can help! Learn more at \u003Chttps:\u002F\u002Ftrufflesecurity.com\u002Ftrufflehog-enterprise>.\n\nWe take the revenue from the enterprise product to fund more awesome open source projects that the whole community can benefit from.\n\n\u003C\u002Fdiv>\n\n# What is TruffleHog 🐽\n\nTruffleHog is the most powerful secrets **Discovery, Classification, Validation,** and **Analysis** tool. In this context, secret refers to a credential a machine uses to authenticate itself to another machine. This includes API keys, database passwords, private encryption keys, and more.\n\n## Discovery 🔍\n\nTruffleHog can look for secrets in many places including Git, chats, wikis, logs, API testing platforms, object stores, filesystems and more.\n\n## Classification 📁\n\nTruffleHog classifies over 800 secret types, mapping them back to the specific identity they belong to. Is it an AWS secret? Stripe secret? Cloudflare secret? Postgres password? SSL Private key? Sometimes it's hard to tell looking at it, so TruffleHog classifies everything it finds.\n\n## Validation ✅\n\nFor every secret TruffleHog can classify, it can also log in to confirm if that secret is live or not. This step is critical to know if there’s an active present danger or not.\n\n## Analysis 🔬\n\nFor the 20 some of the most commonly leaked out credential types, instead of sending one request to check if the secret can log in, TruffleHog can send many requests to learn everything there is to know about the secret. Who created it? What resources can it access? What permissions does it have on those resources?\n\n# :loudspeaker: Join Our Community\n\nHave questions? Feedback? Jump into Slack or Discord and hang out with us.\n\nJoin our [Slack Community](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Ftrufflehog-community\u002Fshared_invite\u002Fzt-pw2qbi43-Aa86hkiimstfdKH9UCpPzQ)\n\nJoin the [Secret Scanning Discord](https:\u002F\u002Fdiscord.gg\u002F8Hzbrnkr7E)\n\n# :tv: Demo\n\n![GitHub scanning demo](https:\u002F\u002Fstorage.googleapis.com\u002Ftruffle-demos\u002Fnon-interactive.svg)\n\n```bash\ndocker run --rm -it -v \"$PWD:\u002Fpwd\" trufflesecurity\u002Ftrufflehog:latest github --org=trufflesecurity\n```\n\n# :floppy_disk: Installation\n\nSeveral options are available for you:\n\n### MacOS users\n\n```bash\nbrew install trufflehog\n```\n\n### Docker:\n\n\u003Csub>\u003Ci>_Ensure Docker engine is running before executing the following commands:_\u003C\u002Fi>\u003C\u002Fsub>\n\n#### &nbsp;&nbsp;&nbsp;&nbsp;Unix\n\n```bash\ndocker run --rm -it -v \"$PWD:\u002Fpwd\" trufflesecurity\u002Ftrufflehog:latest github --repo https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys\n```\n\n#### &nbsp;&nbsp;&nbsp;&nbsp;Windows Command Prompt\n\n```bash\ndocker run --rm -it -v \"%cd:\u002F=\\%:\u002Fpwd\" trufflesecurity\u002Ftrufflehog:latest github --repo https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys\n```\n\n#### &nbsp;&nbsp;&nbsp;&nbsp;Windows PowerShell\n\n```bash\ndocker run --rm -it -v \"${PWD}:\u002Fpwd\" trufflesecurity\u002Ftrufflehog github --repo https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys\n```\n\n#### &nbsp;&nbsp;&nbsp;&nbsp;M1 and M2 Mac\n\n```bash\ndocker run --platform linux\u002Farm64 --rm -it -v \"$PWD:\u002Fpwd\" trufflesecurity\u002Ftrufflehog:latest github --repo https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys\n```\n\n### Binary releases\n\n```bash\nDownload and unpack from https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Freleases\n```\n\n### Compile from source\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftrufflehog.git\ncd trufflehog; go install\n```\n\n### Using installation script\n\n```bash\ncurl -sSfL https:\u002F\u002Fraw.githubusercontent.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- -b \u002Fusr\u002Flocal\u002Fbin\n```\n\n### Using installation script, verify checksum signature (requires cosign to be installed)\n\n```bash\ncurl -sSfL https:\u002F\u002Fraw.githubusercontent.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- -v -b \u002Fusr\u002Flocal\u002Fbin\n```\n\n### Using installation script to install a specific version\n\n```bash\ncurl -sSfL https:\u002F\u002Fraw.githubusercontent.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- -b \u002Fusr\u002Flocal\u002Fbin \u003CReleaseTag like v3.56.0>\n```\n\n# :closed_lock_with_key: Verifying the artifacts\n\nChecksums are applied to all artifacts, and the resulting checksum file is signed using cosign.\n\nYou need the following tool to verify signature:\n\n- [Cosign](https:\u002F\u002Fdocs.sigstore.dev\u002Fcosign\u002Fsystem_config\u002Finstallation\u002F)\n\nVerification steps are as follows:\n\n1. Download the artifact files you want, and the following files from the [releases](https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Freleases) page.\n\n   - trufflehog\\_{version}\\_checksums.txt\n   - trufflehog\\_{version}\\_checksums.txt.pem\n   - trufflehog\\_{version}\\_checksums.txt.sig\n\n2. Verify the signature:\n\n   ```shell\n   cosign verify-blob \u003Cpath to trufflehog_{version}_checksums.txt> \\\n   --certificate \u003Cpath to trufflehog_{version}_checksums.txt.pem> \\\n   --signature \u003Cpath to trufflehog_{version}_checksums.txt.sig> \\\n   --certificate-identity-regexp 'https:\u002F\u002Fgithub\\.com\u002Ftrufflesecurity\u002Ftrufflehog\u002F\\.github\u002Fworkflows\u002F.+' \\\n   --certificate-oidc-issuer \"https:\u002F\u002Ftoken.actions.githubusercontent.com\"\n   ```\n\n3. Once the signature is confirmed as valid, you can proceed to validate that the SHA256 sums align with the downloaded artifact:\n\n   ```shell\n   sha256sum --ignore-missing -c trufflehog_{version}_checksums.txt\n   ```\n\nReplace `{version}` with the downloaded files version\n\nAlternatively, if you are using the installation script, pass `-v` option to perform signature verification.\nThis requires Cosign binary to be installed prior to running the installation script.\n\n# :rocket: Quick Start\n\n## 1: Scan a repo for only verified secrets\n\nCommand:\n\n```bash\ntrufflehog git https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys --results=verified\n```\n\nExpected output:\n\n```\n🐷🔑🐷  TruffleHog. Unearth your secrets. 🐷🔑🐷\n\nFound verified result 🐷🔑\nDetector Type: AWS\nDecoder Type: PLAIN\nRaw result: AKIAYVP4CIPPERUVIFXG\nLine: 4\nCommit: fbc14303ffbf8fb1c2c1914e8dda7d0121633aca\nFile: keys\nEmail: counter \u003Ccounter@counters-MacBook-Air.local>\nRepository: https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys\nTimestamp: 2022-06-16 10:17:40 -0700 PDT\n...\n```\n\n## 2: Scan a GitHub Org for only verified secrets\n\n```bash\ntrufflehog github --org=trufflesecurity --results=verified\n```\n\n## 3: Scan a GitHub Repo for only verified secrets and get JSON output\n\nCommand:\n\n```bash\ntrufflehog git https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys --results=verified --json\n```\n\nExpected output:\n\n```\n{\"SourceMetadata\":{\"Data\":{\"Git\":{\"commit\":\"fbc14303ffbf8fb1c2c1914e8dda7d0121633aca\",\"file\":\"keys\",\"email\":\"counter \\u003ccounter@counters-MacBook-Air.local\\u003e\",\"repository\":\"https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys\",\"timestamp\":\"2022-06-16 10:17:40 -0700 PDT\",\"line\":4}}},\"SourceID\":0,\"SourceType\":16,\"SourceName\":\"trufflehog - git\",\"DetectorType\":2,\"DetectorName\":\"AWS\",\"DecoderName\":\"PLAIN\",\"Verified\":true,\"Raw\":\"AKIAYVP4CIPPERUVIFXG\",\"Redacted\":\"AKIAYVP4CIPPERUVIFXG\",\"ExtraData\":{\"account\":\"595918472158\",\"arn\":\"arn:aws:iam::595918472158:user\u002Fcanarytokens.com@@mirux23ppyky6hx3l6vclmhnj\",\"user_id\":\"AIDAYVP4CIPPJ5M54LRCY\"},\"StructuredData\":null}\n...\n```\n\n## 4: Scan a GitHub Repo + its Issues and Pull Requests\n\n```bash\ntrufflehog github --repo=https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys --issue-comments --pr-comments\n```\n\n## 5: Scan an S3 bucket for high-confidence results (verified + unknown)\n\n```bash\ntrufflehog s3 --bucket=\u003Cbucket name> --results=verified,unknown\n```\n\n## 6: Scan S3 buckets using IAM Roles\n\n```bash\ntrufflehog s3 --role-arn=\u003Ciam role arn>\n```\n\n## 7: Scan a Github Repo using SSH authentication in Docker\n\n```bash\ndocker run --rm -v \"$HOME\u002F.ssh:\u002Froot\u002F.ssh:ro\" trufflesecurity\u002Ftrufflehog:latest git ssh:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys\n```\n\n## 8: Scan individual files or directories\n\n```bash\ntrufflehog filesystem path\u002Fto\u002Ffile1.txt path\u002Fto\u002Ffile2.txt path\u002Fto\u002Fdir\n```\n\n## 9: Scan a local git repo\n\nClone the git repo. For example [test keys](git@github.com:trufflesecurity\u002Ftest_keys.git) repo.\n```bash\ngit clone git@github.com:trufflesecurity\u002Ftest_keys.git\n```\n\nRun trufflehog from the parent directory (outside the git repo).\n```bash\ntrufflehog git file:\u002F\u002Ftest_keys --results=verified,unknown\n```\n\nTo guard against malicious git configs in local scanning (see CVE-2025-41390), TruffleHog clones local git repositories to a temporary directory prior to scanning. This follows [Git's security best practices](https:\u002F\u002Fgit-scm.com\u002Fdocs\u002Fgit#_security). If you want to specify a custom path to clone the repository to (instead of tmp), you can use the `--clone-path` flag. If you'd like to skip the local cloning process and scan the repository directly (only do this for trusted repos), you can use the `--trust-local-git-config` flag.\n\n## 10: Scan GCS buckets for only verified secrets\n\n```bash\ntrufflehog gcs --project-id=\u003Cproject-ID> --cloud-environment --results=verified\n```\n\n## 11: Scan a Docker image for only verified secrets\n\nUse the `--image` flag multiple times to scan multiple images.\n\n```bash\n# to scan from a remote registry\ntrufflehog docker --image trufflesecurity\u002Fsecrets --results=verified\n\n# to scan from the local docker daemon\ntrufflehog docker --image docker:\u002F\u002Fnew_image:tag --results=verified\n\n# to scan from an image saved as a tarball\ntrufflehog docker --image file:\u002F\u002Fpath_to_image.tar --results=verified\n```\n\n## 12: Scan in CI\n\nSet the `--since-commit` flag to your default branch that people merge into (ex: \"main\"). Set the `--branch` flag to your PR's branch name (ex: \"feature-1\"). Depending on the CI\u002FCD platform you use, this value can be pulled in dynamically (ex: [CIRCLE_BRANCH in Circle CI](https:\u002F\u002Fcircleci.com\u002Fdocs\u002Fvariables\u002F) and [TRAVIS_PULL_REQUEST_BRANCH in Travis CI](https:\u002F\u002Fdocs.travis-ci.com\u002Fuser\u002Fenvironment-variables\u002F)). If the repo is cloned and the target branch is already checked out during the CI\u002FCD workflow, then `--branch HEAD` should be sufficient. The `--fail` flag will return an 183 error code if valid credentials are found.\n\n```bash\ntrufflehog git file:\u002F\u002F. --since-commit main --branch feature-1 --results=verified,unknown --fail\n```\n\n## 13: Scan a Postman workspace\n\nUse the `--workspace-id`, `--collection-id`, `--environment` flags multiple times to scan multiple targets.\n\n```bash\ntrufflehog postman --token=\u003Cpostman api token> --workspace-id=\u003Cworkspace id>\n```\n\n## 14: Scan a Jenkins server\n\n```bash\ntrufflehog jenkins --url https:\u002F\u002Fjenkins.example.com --username admin --password admin\n```\n\n## 15: Scan an Elasticsearch server\n\n### Scan a Local Cluster\n\nThere are two ways to authenticate to a local cluster with TruffleHog: (1) username and password, (2) service token.\n\n#### Connect to a local cluster with username and password\n\n```bash\ntrufflehog elasticsearch --nodes 192.168.14.3 192.168.14.4 --username truffle --password hog\n```\n\n#### Connect to a local cluster with a service token\n\n```bash\ntrufflehog elasticsearch --nodes 192.168.14.3 192.168.14.4 --service-token ‘AAEWVaWM...Rva2VuaSDZ’\n```\n\n### Scan an Elastic Cloud Cluster\n\nTo scan a cluster on Elastic Cloud, you’ll need a Cloud ID and API key.\n\n```bash\ntrufflehog elasticsearch \\\n  --cloud-id 'search-prod:dXMtY2Vx...YjM1ODNlOWFiZGRlNjI0NA==' \\\n  --api-key 'MlVtVjBZ...ZSYlduYnF1djh3NG5FQQ=='\n```\n\n## 16. Scan a GitHub Repository for Cross Fork Object References and Deleted Commits\n\nThe following command will enumerate deleted and hidden commits on a GitHub repository and then scan them for secrets. This is an alpha release feature.\n\n```bash\ntrufflehog github-experimental --repo https:\u002F\u002Fgithub.com\u002F\u003CUSER>\u002F\u003CREPO>.git --object-discovery\n```\n\nIn addition to the normal TruffleHog output, the `--object-discovery` flag creates two files in a new `$HOME\u002F.trufflehog` directory: `valid_hidden.txt` and `invalid.txt`. These are used to track state during commit enumeration, as well as to provide users with a complete list of all hidden and deleted commits (`valid_hidden.txt`). If you'd like to automatically remove these files after scanning, please add the flag `--delete-cached-data`.\n\n**Note**: Enumerating all valid commits on a repository using this method takes between 20 minutes and a few hours, depending on the size of your repository. We added a progress bar to keep you updated on how long the enumeration will take. The actual secret scanning runs extremely fast.\n\nFor more information on Cross Fork Object References, please [read our blog post](https:\u002F\u002Ftrufflesecurity.com\u002Fblog\u002Fanyone-can-access-deleted-and-private-repo-data-github).\n\n## 17. Scan Hugging Face\n\n### Scan a Hugging Face Model, Dataset or Space\n\n```bash\ntrufflehog huggingface --model \u003Cmodel_id> --space \u003Cspace_id> --dataset \u003Cdataset_id>\n```\n\n### Scan all Models, Datasets and Spaces belonging to a Hugging Face Organization or User\n\n```bash\ntrufflehog huggingface --org \u003Corgname> --user \u003Cusername>\n```\n\n(Optionally) When scanning an organization or user, you can skip an entire class of resources with `--skip-models`, `--skip-datasets`, `--skip-spaces` OR a particular resource with `--ignore-models \u003Cmodel_id>`, `--ignore-datasets \u003Cdataset_id>`, `--ignore-spaces \u003Cspace_id>`.\n\n### Scan Discussion and PR Comments\n\n```bash\ntrufflehog huggingface --model \u003Cmodel_id> --include-discussions --include-prs\n```\n\n## 18. Scan stdin Input\n\n```bash\naws s3 cp s3:\u002F\u002Fexample\u002Fgzipped\u002Fdata.gz - | gunzip -c | trufflehog stdin\n```\n\n# :question: FAQ\n\n- All I see is `🐷🔑🐷  TruffleHog. Unearth your secrets. 🐷🔑🐷` and the program exits, what gives?\n  - That means no secrets were detected\n- Why is the scan taking a long time when I scan a GitHub org\n  - Unauthenticated GitHub scans have rate limits. To improve your rate limits, include the `--token` flag with a personal access token\n- It says a private key was verified, what does that mean?\n  - A verified result means TruffleHog confirmed the credential is valid by testing it against the service's API. For private keys, we've confirmed the key can be used live for SSH or SSL authentication. Check out our Driftwood blog post to learn more [Blog post](https:\u002F\u002Ftrufflesecurity.com\u002Fblog\u002Fdriftwood-know-if-private-keys-are-sensitive\u002F)\n- Is there an easy way to ignore specific secrets?\n  - If the scanned source [supports line numbers](https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Fblob\u002Fd6375ba92172fd830abb4247cca15e3176448c5d\u002Fpkg\u002Fengine\u002Fengine.go#L358-L365), then you can add a `trufflehog:ignore` comment on the line containing the secret to ignore that secrets.\n\n# :newspaper: What's new in v3?\n\nTruffleHog v3 is a complete rewrite in Go with many new powerful features.\n\n- We've **added over 700 credential detectors that support active verification against their respective APIs**.\n- We've also added native **support for scanning GitHub, GitLab, Docker, filesystems, S3, GCS, Circle CI and Travis CI**.\n- **Instantly verify private keys** against millions of github users and **billions** of TLS certificates using our [Driftwood](https:\u002F\u002Ftrufflesecurity.com\u002Fblog\u002Fdriftwood) technology.\n- Scan binaries, documents, and other file formats\n- Available as a GitHub Action and a pre-commit hook\n\n## What is credential verification?\n\nFor every potential credential that is detected, we've painstakingly implemented programmatic verification against the API that we think it belongs to. Verification eliminates false positives and provides three result statuses:\n\n- **verified**: Credential confirmed as valid and active by API testing\n- **unverified**: Credential detected but not confirmed valid (may be invalid, expired, or verification disabled)  \n- **unknown**: Verification attempted but failed due to errors, such as a network or API failure\n\nFor example, the [AWS credential detector](pkg\u002Fdetectors\u002Faws\u002Faws.go) performs a `GetCallerIdentity` API call against the AWS API to verify if an AWS credential is active.\n\n# :memo: Usage\n\nTruffleHog has a sub-command for each source of data that you may want to scan:\n\n- git\n- github\n- gitlab\n- docker\n- s3\n- filesystem (files and directories)\n- syslog\n- circleci\n- travisci\n- gcs (Google Cloud Storage)\n- postman\n- jenkins\n- elasticsearch\n- stdin\n- multi-scan\n\nEach subcommand can have options that you can see with the `--help` flag provided to the sub command:\n\n```\n$ trufflehog git --help\nusage: TruffleHog [\u003Cflags>] \u003Ccommand> [\u003Cargs> ...]\n\nTruffleHog is a tool for finding credentials.\n\n\nFlags:\n  -h, --[no-]help                Show context-sensitive help (also try --help-long and --help-man).\n      --log-level=0              Logging verbosity on a scale of 0 (info) to 5 (trace). Can be\n                                 disabled with \"-1\".\n      --[no-]profile             Enables profiling and sets a pprof and fgprof server on :18066.\n  -j, --[no-]json                Output in JSON format.\n      --[no-]json-legacy         Use the pre-v3.0 JSON format. Only works with git, gitlab,\n                                 and github sources.\n      --[no-]github-actions      Output in GitHub Actions format.\n      --concurrency=12           Number of concurrent workers.\n      --[no-]no-verification     Don't verify the results.\n      --results=RESULTS          Specifies which type(s) of results to output: verified (confirmed\n                                 valid by API), unknown (verification failed due to error),\n                                 unverified (detected but not verified), filtered_unverified\n                                 (unverified but would have been filtered out). Defaults to\n                                 verified,unverified,unknown.\n      --[no-]no-color            Disable colorized output\n      --[no-]allow-verification-overlap\n                                 Allow verification of similar credentials across detectors\n      --[no-]filter-unverified   Only output first unverified result per chunk per detector if there\n                                 are more than one results.\n      --filter-entropy=FILTER-ENTROPY\n                                 Filter unverified results with Shannon entropy. Start with 3.0.\n      --config=CONFIG            Path to configuration file.\n      --[no-]print-avg-detector-time\n                                 Print the average time spent on each detector.\n      --[no-]no-update           Don't check for updates.\n      --[no-]fail                Exit with code 183 if results are found.\n      --[no-]fail-on-scan-errors\n                                 Exit with non-zero error code if an error occurs during the scan.\n      --verifier=VERIFIER ...    Set custom verification endpoints.\n      --[no-]custom-verifiers-only\n                                 Only use custom verification endpoints.\n      --detector-timeout=DETECTOR-TIMEOUT\n                                 Maximum time to spend scanning chunks per detector (e.g., 30s).\n      --archive-max-size=ARCHIVE-MAX-SIZE\n                                 Maximum size of archive to scan. (Byte units eg. 512B, 2KB, 4MB)\n      --archive-max-depth=ARCHIVE-MAX-DEPTH\n                                 Maximum depth of archive to scan.\n      --archive-timeout=ARCHIVE-TIMEOUT\n                                 Maximum time to spend extracting an archive.\n      --include-detectors=\"all\"  Comma separated list of detector types to include. Protobuf name or\n                                 IDs may be used, as well as ranges.\n      --exclude-detectors=EXCLUDE-DETECTORS\n                                 Comma separated list of detector types to exclude. Protobuf name\n                                 or IDs may be used, as well as ranges. IDs defined here take\n                                 precedence over the include list.\n      --[no-]no-verification-cache\n                                 Disable verification caching\n      --[no-]force-skip-binaries\n                                 Force skipping binaries.\n      --[no-]force-skip-archives\n                                 Force skipping archives.\n      --[no-]skip-additional-refs\n                                 Skip additional references.\n      --user-agent-suffix=USER-AGENT-SUFFIX\n                                 Suffix to add to User-Agent.\n      --[no-]version             Show application version.\n\nCommands:\nhelp [\u003Ccommand>...]\n    Show help.\n\ngit [\u003Cflags>] \u003Curi>\n\n    Find credentials in git repositories.\n\ngithub [\u003Cflags>]\n    Find credentials in GitHub repositories.\n\ngithub-experimental --repo=REPO [\u003Cflags>]\n    Run an experimental GitHub scan. Must specify at least one experimental sub-module to run:\n    object-discovery.\n\ngitlab --token=TOKEN [\u003Cflags>]\n    Find credentials in GitLab repositories.\n\nfilesystem [\u003Cflags>] [\u003Cpath>...]\n    Find credentials in a filesystem.\n\ns3 [\u003Cflags>]\n    Find credentials in S3 buckets.\n\ngcs [\u003Cflags>]\n    Find credentials in GCS buckets.\n\nsyslog --format=FORMAT [\u003Cflags>]\n    Scan syslog\n\ncircleci --token=TOKEN\n    Scan CircleCI\n\ndocker [\u003Cflags>]\n    Scan Docker Image\n\n\ntravisci --token=TOKEN\n    Scan TravisCI\n\npostman [\u003Cflags>]\n    Scan Postman\n\nelasticsearch [\u003Cflags>]\n    Scan Elasticsearch\n\njenkins --url=URL [\u003Cflags>]\n    Scan Jenkins\n\nhuggingface [\u003Cflags>]\n    Find credentials in HuggingFace datasets, models and spaces.\n\nstdin\n    Find credentials from stdin.\n\nmulti-scan\n    Find credentials in multiple sources defined in configuration.\n\njson-enumerator [\u003Cpath>...]\n    Find credentials from a JSON enumerator input.\n\nanalyze\n    Analyze API keys for fine-grained permissions information.\n```\n\nFor example, to scan a `git` repository, start with\n\n```\ntrufflehog git https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftrufflehog.git\n```\n\n## Configuration\n\nTruffleHog supports defining [custom regex detectors](#custom-regex-detector-alpha)\nand multiple sources in a configuration file provided via the `--config` flag.\nThe regex detectors can be used with any subcommand, while the sources defined\nin configuration are only for the `multi-scan` subcommand.\n\nThe configuration format for sources can be found on Truffle Security's\n[source configuration documentation page](https:\u002F\u002Fdocs.trufflesecurity.com\u002Fscan-data-for-secrets).\n\nExample GitHub source configuration and [options reference](https:\u002F\u002Fdocs.trufflesecurity.com\u002Fgithub#Fvm1I):\n\n```yaml\nsources:\n- connection:\n    '@type': type.googleapis.com\u002Fsources.GitHub\n    repositories:\n    - https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftest_keys.git\n    unauthenticated: {}\n  name: example config scan\n  type: SOURCE_TYPE_GITHUB\n  verify: true\n```\n\nYou may define multiple connections under the `sources` key (see above), and\nTruffleHog will scan all of the sources concurrently.\n\n## S3\n\nThe S3 source supports assuming IAM roles for scanning in addition to IAM users. This makes it easier for users to scan multiple AWS accounts without needing to rely on hardcoded credentials for each account.\n\nThe IAM identity that TruffleHog uses initially will need to have `AssumeRole` privileges as a principal in the [trust policy](https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fsecurity\u002Fhow-to-use-trust-policies-with-iam-roles\u002F) of each IAM role to assume.\n\nTo scan a specific bucket using locally set credentials or instance metadata if on an EC2 instance:\n\n```bash\ntrufflehog s3 --bucket=\u003Cbucket-name>\n```\n\nTo scan a specific bucket using an assumed role:\n\n```bash\ntrufflehog s3 --bucket=\u003Cbucket-name> --role-arn=\u003Ciam-role-arn>\n```\n\nMultiple roles can be passed as separate arguments. The following command will attempt to scan every bucket each role has permissions to list in the S3 API:\n\n```bash\ntrufflehog s3 --role-arn=\u003Ciam-role-arn-1> --role-arn=\u003Ciam-role-arn-2>\n```\n\nExit Codes:\n\n- 0: No errors and no results were found.\n- 1: An error was encountered. Sources may not have completed scans.\n- 183: No errors were encountered, but results were found. Will only be returned if `--fail` flag is used.\n\n## :octocat: TruffleHog Github Action\n\n### General Usage\n\n```\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n    - name: Checkout code\n      uses: actions\u002Fcheckout@v4\n      with:\n        fetch-depth: 0\n    - name: Secret Scanning\n      uses: trufflesecurity\u002Ftrufflehog@main\n      with:\n        extra_args: --results=verified,unknown\n```\n\nIn the example config above, we're scanning for live secrets in all PRs and Pushes to `main`. Only code changes in the referenced commits are scanned. If you'd like to scan an entire branch, please see the \"Advanced Usage\" section below.\n\n### Shallow Cloning\n\nIf you're incorporating TruffleHog into a standalone workflow and aren't running any other CI\u002FCD tooling alongside TruffleHog, then we recommend using [Shallow Cloning](https:\u002F\u002Fgit-scm.com\u002Fdocs\u002Fgit-clone#Documentation\u002Fgit-clone.txt---depthltdepthgt) to speed up your workflow. Here's an example of how to do it:\n\n```\n...\n      - shell: bash\n        run: |\n          if [ \"${{ github.event_name }}\" == \"push\" ]; then\n            echo \"depth=$(($(jq length \u003C\u003C\u003C '${{ toJson(github.event.commits) }}') + 2))\" >> $GITHUB_ENV\n            echo \"branch=${{ github.ref_name }}\" >> $GITHUB_ENV\n          fi\n          if [ \"${{ github.event_name }}\" == \"pull_request\" ]; then\n            echo \"depth=$((${{ github.event.pull_request.commits }}+2))\" >> $GITHUB_ENV\n            echo \"branch=${{ github.event.pull_request.head.ref }}\" >> $GITHUB_ENV\n          fi\n      - uses: actions\u002Fcheckout@v3\n        with:\n          ref: ${{env.branch}}\n          fetch-depth: ${{env.depth}}\n      - uses: trufflesecurity\u002Ftrufflehog@main\n        with:\n          extra_args: --results=verified,unknown\n...\n```\n\nDepending on the event type (push or PR), we calculate the number of commits present. Then we add 2, so that we can reference a base commit before our code changes. We pass that integer value to the `fetch-depth` flag in the checkout action in addition to the relevant branch. Now our checkout process should be much shorter.\n\n### Canary detection\n\nTruffleHog statically detects [https:\u002F\u002Fcanarytokens.org\u002F](https:\u002F\u002Fcanarytokens.org\u002F).\n\n![image](https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Fassets\u002F52866392\u002F74ace530-08c5-4eaf-a169-84a73e328f6f)\n\n### Advanced Usage\n\n```yaml\n- name: TruffleHog\n  uses: trufflesecurity\u002Ftrufflehog@main\n  with:\n    # Repository path\n    path:\n    # Start scanning from here (usually main branch).\n    base:\n    # Scan commits until here (usually dev branch).\n    head: # optional\n    # Extra args to be passed to the trufflehog cli.\n    extra_args: --log-level=2 --results=verified,unknown\n```\n\nIf you'd like to specify specific `base` and `head` refs, you can use the `base` argument (`--since-commit` flag in TruffleHog CLI) and the `head` argument (`--branch` flag in the TruffleHog CLI). We only recommend using these arguments for very specific use cases, where the default behavior does not work.\n\n#### Advanced Usage: Scan entire branch\n\n```\n- name: scan-push\n        uses: trufflesecurity\u002Ftrufflehog@main\n        with:\n          base: \"\"\n          head: ${{ github.ref_name }}\n          extra_args: --results=verified,unknown\n```\n\n## TruffleHog GitLab CI\n\n### Example Usage\n\n```yaml\nstages:\n  - security\n\nsecurity-secrets:\n  stage: security\n  allow_failure: false\n  image: alpine:latest\n  variables:\n    SCAN_PATH: \".\" # Set the relative path in the repo to scan\n  before_script:\n    - apk add --no-cache git curl jq\n    - curl -sSfL https:\u002F\u002Fraw.githubusercontent.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- -b \u002Fusr\u002Flocal\u002Fbin\n  script:\n    - trufflehog filesystem \"$SCAN_PATH\" --results=verified,unknown --fail --json | jq\n  rules:\n    - if: '$CI_PIPELINE_SOURCE == \"merge_request_event\"'\n```\n\nIn the example pipeline above, we're scanning for live secrets in all repository directories and files. This job runs only when the pipeline source is a merge request event, meaning it's triggered when a new merge request is created.\n\n## Pre-commit Hook\n\nTruffleHog can be used in a pre-commit hook to prevent credentials from leaking before they ever leave your computer.\n\nSee the [pre-commit hook documentation](PreCommit.md) for more information.\n\n## Custom Regex Detector (alpha)\n\nTruffleHog supports detection and verification of custom regular expressions.\nFor detection, at least one **regular expression** and **keyword** is required.\nA **keyword** is a fixed literal string identifier that appears in or around\nthe regex to be detected. To allow maximum flexibility for verification, a\nwebhook is used containing the regular expression matches.\n\nTruffleHog will send a JSON POST request containing the regex matches to a\nconfigured webhook endpoint. If the endpoint responds with a `200 OK` response\nstatus code, the secret is considered verified. If verification fails due to network\u002FAPI errors, the result is marked as unknown.\n\nCustom Detectors support a few different filtering mechanisms: entropy, regex targeting the entire match, regex targeting the captured secret,\nand excluded word lists checked against the secret (captured group if present, entire match if capture group is not present). Note that if\nyour custom detector has multiple `regex` set (in this example `hogID`, and `hogToken`), then the filters get applied to each regex. [Here](examples\u002Fgeneric_with_filters.yml) is an example of a custom detector using these filters.\n\n**NB:** This feature is alpha and subject to change.\n\n### Regex Detector Example\n[Here](\u002Fpkg\u002Fcustom_detectors\u002FCUSTOM_DETECTORS.md) is how to setup a custom regex detector with verification server.\n\n## Generic JWT Detection\n\nTruffleHog supports detection and verification of a subset of generic JWTs it finds.\nSpecifically, if a JWT uses public-key cryptography rather than HMAC and the public key can be obtained, TruffleHog can determine whether the JWT is live or not.\n\n## :mag: Analyze\n\nTruffleHog supports running a deeper analysis of a credential to view its permissions and the resources it has access to.\n\n```bash\ntrufflehog analyze\n```\n\n# :heart: Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftrufflesecurity\u002Ftrufflehog\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=trufflesecurity\u002Ftrufflehog\" \u002F>\n\u003C\u002Fa>\n\n# :computer: Contributing\n\nContributions are very welcome! Please see our [contribution guidelines first](CONTRIBUTING.md).\n\nWe no longer accept contributions to TruffleHog v2, but that code is available in the `v2` branch.\n\n## Adding new secret detectors\n\nWe have published some [documentation and tooling to get started on adding new secret detectors](hack\u002Fdocs\u002FAdding_Detectors_external.md). Let's improve detection together!\n\n# Use as a library\n\nCurrently, trufflehog is in heavy development and no guarantees can be made on\nthe stability of the public APIs at this time.\n\n# License Change\n\nSince v3.0, TruffleHog is released under a AGPL 3 license, included in [`LICENSE`](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.\n","TruffleHog 是一款用于发现、验证和分析泄露凭证的工具。其核心功能包括在多种数据源中（如Git仓库、聊天记录、维基页面等）搜索超过800种类型的秘密信息，并对这些信息进行分类、有效性验证及深入分析，以确定它们是否仍然有效及其权限范围。该工具采用Go语言开发，具备强大的动态分析能力，适用于DevSecOps环境下的安全检查，特别是需要持续监控敏感信息泄露风险的企业级应用场景。",2,"2026-06-11 03:00:06","top_language"]