Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Added how to scan a local git repo (#3593)
zac033f2295500
diff --git a/README.md b/README.mdindex 8bb67c8ff..42cf868ff 100644--- a/README.md+++ b/README.md@@ -257,13 +257,25 @@ docker run --rm -v "$HOME/.ssh:/root/.ssh:ro" trufflesecurity/trufflehog:latesttrufflehog filesystem path/to/file1.txt path/to/file2.txt path/to/dir```-## 9: Scan GCS buckets for verified secrets+## 9: Scan a local git repo++Clone the git repo. For example [test keys]([email protected]:trufflesecurity/test_keys.git) repo.+```bash+$ git clone [email protected]:trufflesecurity/test_keys.git+```++Run trufflehog from the parent directory (outside the git repo).+```bash+$ trufflehog git file://test_keys --only-verified+```++## 10: Scan GCS buckets for verified secrets```bashtrufflehog gcs --project-id=<project-ID> --cloud-environment --only-verified```-## 10: Scan a Docker image for verified secrets+## 11: Scan a Docker image for verified secretsUse the `--image` flag multiple times to scan multiple images.@@ -271,7 +283,7 @@ Use the `--image` flag multiple times to scan multiple images.trufflehog docker --image trufflesecurity/secrets --only-verified```-## 11: Scan in CI+## 12: Scan in CISet 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/CD platform you use, this value can be pulled in dynamically (ex: [CIRCLE_BRANCH in Circle CI](https://circleci.com/docs/variables/) and [TRAVIS_PULL_REQUEST_BRANCH in Travis CI](https://docs.travis-ci.com/user/environment-variables/)). If the repo is cloned and the target branch is already checked out during the CI/CD workflow, then `--branch HEAD` should be sufficient. The `--fail` flag will return an 183 error code if valid credentials are found.@@ -279,7 +291,7 @@ Set the `--since-commit` flag to your default branch that people merge into (ex:trufflehog git file://. --since-commit main --branch feature-1 --only-verified --fail```-## 12: Scan a Postman workspace+## 13: Scan a Postman workspaceUse the `--workspace-id`, `--collection-id`, `--environment` flags multiple times to scan multiple targets.@@ -287,13 +299,13 @@ Use the `--workspace-id`, `--collection-id`, `--environment` flags multiple timetrufflehog postman --token=<postman api token> --workspace-id=<workspace id>```-## 13: Scan a Jenkins server+## 14: Scan a Jenkins server```bashtrufflehog jenkins --url https://jenkins.example.com --username admin --password admin```-## 14: Scan an Elasticsearch server+## 15: Scan an Elasticsearch server### Scan a Local Cluster@@ -321,7 +333,7 @@ trufflehog elasticsearch \--api-key 'MlVtVjBZ...ZSYlduYnF1djh3NG5FQQ=='```-## 15. Scan a GitHub Repository for Cross Fork Object References and Deleted Commits+## 16. Scan a GitHub Repository for Cross Fork Object References and Deleted CommitsThe following command will enumerate deleted and hidden commits on a GitHub repository and then scan them for secrets. This is an alpha release feature.@@ -335,7 +347,7 @@ In addition to the normal TruffleHog output, the `--object-discovery` flag creatFor more information on Cross Fork Object References, please [read our blog post](https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github).-## 16. Scan Hugging Face+## 17. Scan Hugging Face### Scan a Hugging Face Model, Dataset or Space