Skip to content
How it works

Scanner deep dive

Every way to deploy TruffleHog Enterprise: a hosted scanner Truffle Security runs, or a self-hosted scanner you run, with its configuration and sizing. For the free trufflehog CLI, see Deploy open source.

Blocking secrets before they land, with pre-commit hooks, pre-receive hooks or CI checks, isn’t part of Enterprise. It uses the open-source CLI: see git hooks and CI on the open-source page.

Enterprise isn’t in TruffleHog’s open-source code, so every sentence here is quoted from Truffle Security’s docs, read on 2026-11-28, or marked inferred with its reason. Open a tag to see the passage.

What the tags after each sentence mean
From source
Read from TruffleHog's repository at the pinned commit. Shown as a small code icon after the sentence; it opens the exact lines.
Inferred
A conclusion the code supports but does not state. The reason and the code it rests on are listed.
From docs
TruffleHog Enterprise is not in the open-source code. Quoted from Truffle Security's docs, with the date it was read.
From the owner
Stated by the site owner from first-hand knowledge, with the date. Not in public code or docs.

How the pieces fit

The web app

The TruffleHog Enterprise web app, where you add sources, review findings and set up notifications, is hosted by Truffle Security on its Google Cloud (GCP) servers. That's the same whichever scanner you choose; you don't deploy it.

Scanners

Scanners do the scanning: they connect to your sources (the connectors) and look for secrets. This is the part you choose how to deploy: hosted on Truffle Security's GCP servers, or self-hosted by you.

How they connect

A self-hosted scanner connects to your Enterprise instance's API using the address, scanner group and scanner token in its config.

Every way to deploy it

Enterprise only

Commands and steps come from Truffle Security's Enterprise docs. Pick a hosted or a self-hosted scanner, then connect your sources.

Compare them side by side

Hosted against the four self-hosted setups. Green means yes; grey means no. You can use more than one: each source picks its scanner.

1aIs hosted right for you?

  • NoTruffle Security runs it
    Runs on
    Truffle Security's infrastructure, isolated per tenant
    Configured with
    Web UI
    Best for
    Getting started quickly
    Watch out for
    4 hosted scanners at once, org-wide

2aPick where it runs

  • YesYes, Kubernetes restarts it
    Runs on
    Your Kubernetes cluster
    Configured with
    Local config file, stored as a secret
    Best for
    Most production deployments (recommended)
    Watch out for
    Defaults request 4 CPUs and 16 GiB
  • YesYes, Kubernetes keeps it running
    Runs on
    Your Kubernetes cluster
    Configured with
    Local config file, stored as a secret
    Best for
    When Helm isn't allowed
    Watch out for
    No autoscaler; manage config by hand
  • YesYes, systemd restarts it
    Runs on
    A Linux server you run
    Configured with
    Local config file
    Best for
    Simpler setups, or no Kubernetes
    Watch out for
    Runs as root unless you set User=
  • Docker
    YesYes, with --restart=unless-stopped
    Runs on
    Any Docker host
    Configured with
    Local config file
    Best for
    Testing, CI/CD, or no orchestration
    Watch out for
    Uses the Enterprise scanner image

Option 1: Hosted scanner: Truffle Security runs it

1aIs hosted right for you?

For getting started quickly, with nothing to install or operate.

What a hosted scanner is
Runs in Truffle Security's infrastructure, in an environment isolated for your tenant, and needs no setup on your side.
What it can and can't reach
Only sources reachable from the public internet. For anything inside a private network, use a self-hosted scanner.Sources a hosted scanner can scan
Details
What a hosted scanner is
  • Truffle Security's infrastructure is its Google Cloud (GCP) servers, the same place the web app runs.
  • It needs no setup on your end: no server, config file or scanner program to download.
  • Every tenant starts with a default hosted scanner group, so you can be scanning within minutes.
  • Everything is configured in the web UI, including where notifications go.
What it can and can't reach
  • 22 sources list hosted scanning. Microsoft SharePoint, Microsoft Teams and Slack are hosted only.
  • 10 sources are self-hosted only, so a hosted scanner can't scan them: Amazon ECR, Elasticsearch, Filesystem, GitHub (experimental CLI), GitHub Real-time, Hugging Face, Stdin, Syslog, Travis CI and Vector.
  • A few sources are limited to one scanner type, so check the source's own docs page before choosing.
  • Custom verifiers, which check keys against your own private servers, are set in a self-hosted scanner's config file. The docs don't describe them for hosted scanners.

1bSet it up and run it

Add a source in the web app, choose how it's scanned, and the hosted scanner takes it from there.

Add a source
Four steps in the web app: open Integrations and click Add integration, pick the source, configure how it's scanned, and it's ready.Each source's setup detailsWhere findings can be sent
How often it scans, and its limits
Up to 4 hosted scanners run at once across your organization. A fifth waits for a free slot.
Details
Add a source
  • 1. Open the Integrations tab and click Add integration.
  • 2. Select the source to scan.
  • 3. Configure how it should be scanned, including which scanner runs it.
  • 4. The scanner is set up and ready to scan.
How often it scans, and its limits
  • The limit is organization-wide, not per scanner group.
  • A fifth scanner and beyond waits until a slot is free.
  • Each source's scan interval is its Duration between scans setting in the web app.
  • If a scan runs past the next interval, it keeps going and no new scan starts.

Option 2: Self-hosted scanner: you run it

2aPick where it runs

For sources that aren't reachable from the public internet, or when data residency or network isolation means scanning must happen inside your environment.

Kubernetes with Helm (recommended)
Truffle Security's recommendation for most production deployments. The Helm chart sets up the deployment, autoscaling and configuration in one install.
Kubernetes manifest
The fallback when your platform policy doesn't allow Helm. It has no autoscaler and you manage the configuration by hand.
Linux host (systemd)
For simpler setups, or where Kubernetes isn't available. Run as a systemd service, it starts at boot and restarts on its own.
Docker
Useful for testing, CI/CD pipelines, or environments without full orchestration.
Commands and details (14)
Kubernetes with Helm (recommended)
1. Create the namespace
kubectl create namespace trufflehog
2. Store the config as a secret
kubectl create secret --namespace trufflehog generic --from-file config.yaml config
3. Install the chart
helm install trufflehog trufflesecurity/trufflehog --namespace trufflehog

The docs page doesn't show adding Truffle Security's chart repository first. Helm needs it, so add it as the chart's README says before this step.

4. Check it's running and follow the logs
kubectl get pods --namespace trufflehog --watch
kubectl logs --namespace trufflehog -f -lapp=trufflehog
  • The chart's defaults: 1 replica, requesting 4 CPUs and 16 GiB of memory, with limits of 12 CPUs and 48 GiB.
  • It includes a Vertical Pod Autoscaler (VPA), on by default, which can be turned off.
  • A VPA only applies new limits after a pod restart, so it prevents the next out-of-memory crash, not the first one.
  • For infrastructure as code, the Terraform Helm provider works with the chart.
  • The docs list VPA support on "Google GKE, AWS AKS, and EKS". AKS is Azure's Kubernetes service, so that line is likely a typo for Azure AKS.
Kubernetes manifest
1. Create the namespace
kubectl create namespace trufflehog
2. Store the config as a secret
kubectl create secret --namespace trufflehog generic --from-file config.yaml config

The file must be named config.yaml, or the Deployment won't find it.

3. deployment.yaml
Show example (34 lines)
apiVersion: apps/v1
kind: Deployment
metadata:
  name: trufflehog
  labels:
    app: trufflehog
spec:
  replicas: 1
  selector:
    matchLabels:
      app: trufflehog
  template:
    metadata:
      labels:
        app: trufflehog
    spec:
      volumes:
        - name: config-secret-volume
          secret:
            secretName: config
      containers:
        - name: trufflehog
          image: us-docker.pkg.dev/thog-artifacts/public/scanner:latest
          terminationMessagePolicy: FallbackToLogsOnError
          command: ["/usr/local/bin/scanner", "scan", "--config=/secret/config.yaml", "--port=8080"]
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 3
            periodSeconds: 3
          volumeMounts:
            - name: config-secret-volume
              mountPath: /secret/
4. Apply it
kubectl apply -f /tmp/thog.yaml --namespace trufflehog

The docs create deployment.yaml in step 3 but apply /tmp/thog.yaml here. Use the path where you saved the file.

  • Kubernetes keeps the scanner running, manages its configuration secret and collects its logs.
Linux host (systemd)
1. Optional: a dedicated user (Debian-based)
sudo adduser truffle

On other distributions, use sudo useradd -m truffle. The user needs write access to the scanner's folder for updates to work.

2. /etc/systemd/system/trufflehog.service (Amazon Linux example)
[Unit]
Description=Run the TruffleHog scanner as a daemon

[Service]
Type=simple
ExecStart=/home/ec2-user/scanner scan --config=/home/ec2-user/config.yaml
Restart=on-failure
RestartSec=15s
User=ec2-user

[Install]
WantedBy=multi-user.target
3. Turn it on and check it
sudo systemctl daemon-reload
sudo systemctl enable trufflehog.service
sudo systemctl start trufflehog.service
sudo systemctl status trufflehog.service
sudo journalctl -fu trufflehog
  • systemd services run as root by default. To run as another user, set User= in the unit file.
  • The default users are ubuntu on Ubuntu, admin on Debian and ec2-user on Amazon Linux.
  • If the host has no direct internet access, add HTTP_PROXY and HTTPS_PROXY lines with Environment= in the unit file.
Docker
Run as a daemon
docker run --net=host --restart=unless-stopped \
  -v $(pwd)/YOUR_CONFIG.yaml:/tmp/YOUR_CONFIG.yaml \
  -it us-docker.pkg.dev/thog-artifacts/public/scanner:latest \
  scan --config=/tmp/YOUR_CONFIG.yaml
  • This is the Enterprise scanner image (us-docker.pkg.dev/thog-artifacts/public/scanner), not the open-source trufflesecurity/trufflehog image.
Custom certificates and proxies (2)
Use the host's certificate authority
-v /etc/pki:/etc/pki
Send traffic through an HTTP proxy
--env HTTP_PROXY="http://127.0.0.1:8200" \
--env HTTPS_PROXY="http://127.0.0.1:8433" \
--env NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
  • With a self-hosted scanner you manage the compute, and Truffle Security manages detection logic and updates.
  • All 29 sources that list self-hosted scanning work here, including 10 that only work self-hosted, such as Amazon ECR, Elasticsearch and Filesystem. Microsoft SharePoint, Microsoft Teams and Slack need a hosted scanner.

2bCreate the scanner and give it a config

A self-hosted scanner reads a local config file and belongs to its own scanner group.

Create a scanner
In the web app, go to Settings, then Scanners, and click Add Scanner. Name it, then download its config and the scanner program.
The config file
Lists your instance, scanner group and token, then the sources to scan. Credentials in a local config never leave your servers, so it can scan on-premise data.Sources TruffleHog connects toWhere results can be sent
Where the config and credentials live
Three options: a secrets manager URI (recommended), a file path, or environment variables.
Verify against your private instances
Custom verifiers let TruffleHog check secrets against your own enterprise or non-public instances, such as GitHub Enterprise Server or Jira Data Center.How verification works
Commands and details (8)
Create a scanner
Or run the published scanner image
docker run --net=host -v $(pwd)/config.yaml:/tmp/config.yaml -it --rm us-docker.pkg.dev/thog-artifacts/public/scanner:latest scan --config=/tmp/config.yaml
  • The downloaded config holds the credentials for TruffleHog and your data. Truffle Security recommends keeping it in a secrets manager.
  • The downloaded scanner runs the latest version from your instance, so you don't update it yourself.
The config file
config.yml (from the deployment guide)
trufflehogAddress: <your TruffleHog Enterprise instance>
trufflehogScannerGroup: <name of your scanner group>
trufflehogScannerToken: thog-agent-xxxxxxxxxxxxxxxxxx
logJson: true
logLevel: info
concurrency: 4
  • By default the downloaded config scans every source added to that scanner in the web app.
  • Each source in the file has its own scanPeriod, such as 12h for GitHub and 24h for Confluence in the docs' example.
Where the config and credentials live

Pick one

--config value
scanner scan --config="asm://REGION/SECRET_NAME"
  • The docs write the command as trufflehog scan on this page and ./scanner scan elsewhere. Use the name of the scanner program you downloaded.
Verify against your private instances
customVerifiers in config.yaml (excerpt)
customVerifiers:
  # Github Enterprise Server
  - name: github
    endpoints:
      - https://github.example.com/api/v3

  # Gitlab
  - name: gitlab
    endpoints:
      - https://example.gitlab.com
  • The docs list verifiers for 12 products, including Artifactory, Bitbucket, Confluence and Jira Data Center, Datadog, GitHub, GitLab and HashiCorp Vault.
  • If a verification endpoint requires OAuth2, add an auth block; TruffleHog then gets an access token from your identity provider.
  • The open-source CLI takes custom verifiers too, with --verifier.

2cStart it, size it and split the work

Start from the sizing tiers, then adjust after watching the first few scans.

Start the scanner
Run the scanner with your config. It keeps running and scans on a schedule unless you pass --run-once.
Size it
Size by developer count and number of sources. Small teams (50–250 developers, 1–4 sources) start at 1–4 CPUs, 0.5–2 GB of RAM and 50 GB+ of temporary disk.
Split work across scanner groups
Three patterns, from cheapest to most isolated: one group for everything, one group per source, or one group per host.
Commands and details (5)
Start the scanner
Run with a config file
./scanner scan --config=path/to/config.yaml
  • --run-once stops local scanners from sending notifications.
  • --fail-verified returns a non-zero exit code when verified secrets are found. --json switches the output to JSON.
  • --allow-ignore-tag skips findings on lines ending in trufflehog:ignore. --use-system-certs uses custom CA certificates.
  • If a scan is still running when the next one is due, it keeps going and the new one doesn't start.
Size it
Sizing tiers (from the deployment guide)
Tier     Developers  Sources  CPU    RAM         Temp disk
Small    50–250      1–4      1–4    0.5–2 GB    50 GB+
Medium   251–1,000   5–15     1–8    2–8 GB      50 GB+
Large    1,000+      16+      8–16   8–32 GB     100 GB+
X-Large  5,000+      32+      16+    16–32 GB+   200 GB+
  • Give CPU generous headroom, because scans are bursty. Set memory limits conservatively, since too low causes out-of-memory errors.
  • Temporary disk is mostly for cloning git repositories. Start with at least 50 GB, and plan well above that for repositories over 10 GB.
  • API sources such as Jira and Confluence enforce rate limits, so the CPU may not be fully used. Raise concurrency only if logs show it helps.
  • Running the scanner gives a different minimum: 4 CPU cores, 16 GB of memory and 10 GB of temporary disk. That's well above the Small tier, so ask Truffle Security which applies.
  • Truffle Security also publishes a resource requirements calculator, a spreadsheet that suggests a starting configuration.
Split work across scanner groups

Pick a pattern

Cheapest and the usual start for small and medium deployments. If the scanner goes down, every source stops.

One config.yml with two sources (excerpt)
Show example (16 lines)
trufflehogScannerGroup: primary-scanner
sources:
  - connection:
      '@type': type.googleapis.com/sources.GitHub
      endpoint: https://github.ourbusiness.com
    name: GitHub
    scanPeriod: 12h
    type: SOURCE_TYPE_GITHUB
    verify: true
  - connection:
      '@type': type.googleapis.com/sources.Confluence
      endpoint: https://confluence.ourbusiness.com
    name: Confluence
    scanPeriod: 24h
    type: SOURCE_TYPE_CONFLUENCE
    verify: true
  • If that scanner goes down, every source stops scanning.

Further reading