Skip to content

Find, verify, and analyze leaked credentials

added ci scanning info to readme (#2126)

joeleonjr1759f093d171
diff --git a/README.md b/README.md
index 7cb55fcec..16f1ff666 100644
--- a/README.md
+++ b/README.md
@@ -196,6 +196,14 @@ Use the `--image` flag multiple times to scan multiple images.
trufflehog docker --image trufflesecurity/secrets --only-verified
```
+## 11: Scan in CI
+
+Set 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.
+
+```bash
+trufflehog git file://. --since-commit main --branch feature-1 --only-verified --fail
+```
+
# :question: FAQ
- All I see is `πŸ·πŸ”‘πŸ· TruffleHog. Unearth your secrets. πŸ·πŸ”‘πŸ·` and the program exits, what gives?