Skip to content
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,10 @@ TruffleHog statically detects [https://canarytokens.org/](https://canarytokens.o
head: # optional
# Extra args to be passed to the trufflehog cli.
extra_args: --log-level=2 --results=verified,unknown
# Scan with a specific TruffleHog version (default: latest).
version:
# Docker image to pull. Override to use a registry mirror (default: ghcr.io/trufflesecurity/trufflehog).
image:
```

If 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.
Expand Down
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ inputs:
default: "latest"
description: Scan with this trufflehog cli version.
required: false
image:
default: "ghcr.io/trufflesecurity/trufflehog"
description: Docker image to use. Override to point at a registry mirror.
required: false
branding:
icon: "shield"
color: "green"
Expand All @@ -37,6 +41,7 @@ runs:
ARGS: ${{ inputs.extra_args }}
COMMIT_IDS: ${{ toJson(github.event.commits.*.id) }}
VERSION: ${{ inputs.version }}
IMAGE: ${{ inputs.image }}
run: |
##########################################
## ADVANCED USAGE ##
Expand Down Expand Up @@ -94,7 +99,7 @@ runs:
## Run TruffleHog ##
##########################################
docker run --rm -v .:/tmp -w /tmp \
ghcr.io/trufflesecurity/trufflehog:${VERSION} \
"${IMAGE}:${VERSION}" \
git file:///tmp/ \
--since-commit \
${BASE:-''} \
Expand Down