---
title: TruffleHog
slug: connectors/trufflehog
docTags: 
createdAt: 2026-06-09T16:30:28.115Z
---

TruffleHog searches through git repositories for secrets, digging deep into commit history and branches. This is effective at finding secrets accidentally committed.

TruffleHog is a cutting-edge secret detection tool that scans code repositories and other sources to identify exposed secrets like passwords, API keys, and tokens. The TruffleHog connector for Swimlane Turbine enables users to automate the process of detecting, listing, and managing secrets across multiple platforms. By integrating with TruffleHog, Swimlane Turbine users can enhance their security posture by proactively identifying and addressing potential secret leaks, streamlining the triage process, and ensuring sensitive information is securely managed within their environment.

### Supported Version

- The TruffleHog connector supports the latest API version.

### Limitations

None to date.

## Asset Setup

TruffleHog API allows clients to manage sources and secrets. API requests require X-Thog-Key and X-Thog-Secret headers which can be generated at the your-instance.trufflehog.org/api-keys

## Prerequisites

To effectively utilize the TruffleHog connector within the Swimlane Turbine platform, ensure you have the following prerequisites:

- TruffleHog API authentication:
  - URL: The endpoint URL for the TruffleHog API.
  - API Key: Your personal API key to authenticate requests.
  - App ID: The application identifier for your TruffleHog instance.

## Capabilities

This Connector provides the following capabilities:

- List Secrets
- Retrieve Secret
- List Secret Locations
- Retrieve Secret Location

### List Secrets

- Lists all secrets for all sources.

### Retrieve Secret

- Get a specific secret by ID.

### List Secret Locations

- List all secret locations for all sources.

### Retrieve Secret Location

- Retrieve a specific secret location by ID.

# Configurations

## TruffleHog API Key Authentication

TruffleHog API authentication using API key in header

### Configuration Parameters

| **Parameter** | **Description**                    | **Type** | **Required** |
| ------------- | ---------------------------------- | -------- | ------------ |
| url           | A URL to the target host.          | string   | Required     |
| apiKey        | X-Thog-Secret API Key              | string   | Required     |
| appId         | X-Thog-Key API Key                 | string   | Required     |
| verify\_ssl   | Verify SSL certificate             | boolean  | Optional     |
| http\_proxy   | A proxy to route requests through. | string   | Optional     |

# Actions

## List secret locations

Retrieve a comprehensive list of potential secret locations identified by TruffleHog across multiple sources.

### Endpoint

- **URL:** `/v2/secret_locations`
- **Method:** `GET`

### Input

| **Argument Name**       | **Type** | **Required** | **Description**                                            |
| ----------------------- | -------- | ------------ | ---------------------------------------------------------- |
| `parameters.page`       | number   | Optional     | Specifies the page number of the secrets to be displayed.  |
| `parameters.secret__id` | number   | Optional     | Filters for secret locations related to a specific Secret. |

### Input Example

`{"parameters":{"page":1,"secret__id":10}}`

### Output

| **Parameter**      | **Type** | **Description**                  |
| ------------------ | -------- | -------------------------------- |
| `status_code`      | number   | HTTP status code of the response |
| `reason`           | string   | Response reason phrase           |
| `lastPage`         | number   | Output field: lastPage           |
| `countItems`       | number   | Output field: countItems         |
| `countItemsOnPage` | number   | Output field: countItemsOnPage   |
| `current`          | number   | Output field: current            |
| `next`             | string   | Output field: next               |
| `previous`         | string   | Output field: previous           |
| `results`          | array    | Result of the operation          |
| `total_pages`      | number   | Output field: total\_pages       |
| `cur_page`         | number   | Output field: cur\_page          |

### Output Example

`{"status_code":200,"reason":"OK","json_body":{"lastPage":30,"countItems":10,"countItemsOnPage":10,"current":2,"next":"https://api.trytruffle.ai/v2/secret_locations?page=3","previous":"https://api.trytruffle.ai/v2/secret_locations?page=1","results":[{}],"total_pages":100,"cur_page":2}}`

## List Secrets

Retrieve a comprehensive list of secrets detected across all configured sources in TruffleHog.

### Endpoint

- **URL:** `/v2/secrets`
- **Method:** `GET`

### Input

| **Argument Name**                                        | **Type** | **Required** | **Description**                                                                                                                                                                                                                                                                                                                                                                            |
| -------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `parameters.verified`                                    | boolean  | Optional     | Filters for secrets with the specified verified status.                                                                                                                                                                                                                                                                                                                                    |
| `parameters.search`                                      | string   | Optional     | A fuzzy search string that searches the secret location's email, source repository (if applicable), and source name entries, as well as the secret's type and redacted status.                                                                                                                                                                                                             |
| `parameters.created_date_after`                          | string   | Optional     | Filters secrets to include only those first discovered after the specified date and time.                                                                                                                                                                                                                                                                                                  |
| `parameters.created_date_before`                         | string   | Optional     | Filters secrets to include only those first discovered before the specified date and time.                                                                                                                                                                                                                                                                                                 |
| `parameters.last_seen_after`                             | string   | Optional     | Filters secrets to include only those last found in a scan after the specified date and time.                                                                                                                                                                                                                                                                                              |
| `parameters.last_seen_before`                            | string   | Optional     | Filters secrets to include only those last found in a scan before the specified date and time.                                                                                                                                                                                                                                                                                             |
| `parameters.last_verified_after`                         | string   | Optional     | Filters secrets to include only those last verified as live after the specified date and time.                                                                                                                                                                                                                                                                                             |
| `parameters.last_verified_before`                        | string   | Optional     | Filters secrets to include only those last verified as live before the specified date and time.                                                                                                                                                                                                                                                                                            |
| `parameters.page`                                        | number   | Optional     | Specifies the page number of the secrets to be displayed.                                                                                                                                                                                                                                                                                                                                  |
| `parameters.secret_locations__source__type`              | string   | Optional     | Specifies one or more sources (comma-delimited if multiple) to filter by Github, Slack, ECR, Jira, S3, GCS, GitLab, Confluence, GoogleDrive, or any other source type.                                                                                                                                                                                                                     |
| `parameters.secret_locations__source__id`                | number   | Optional     | Specifies the source ID to filter by.                                                                                                                                                                                                                                                                                                                                                      |
| `parameters.secret_locations__source__scanner_group__id` | number   | Optional     | Specifies the scanner ID to filter by.                                                                                                                                                                                                                                                                                                                                                     |
| `parameters.secret_locations__repository`                | string   | Optional     | Specifies the repository value to filter by.                                                                                                                                                                                                                                                                                                                                               |
| `parameters.secret_locations__bucket`                    | string   | Optional     | Specifies the bucket value to filter by.                                                                                                                                                                                                                                                                                                                                                   |
| `parameters.secret_locations__space`                     | string   | Optional     | Specifies the Confluence space value to filter by.                                                                                                                                                                                                                                                                                                                                         |
| `parameters.secret_locations__image`                     | string   | Optional     | Specifies the Docker image name value to filter by.                                                                                                                                                                                                                                                                                                                                        |
| `parameters.secret_locations__channel`                   | string   | Optional     | Specifies the Slack or Teams channel name to filter by.                                                                                                                                                                                                                                                                                                                                    |
| `parameters.secret_locations__workspace`                 | string   | Optional     | Specifies the Bitbucket workspace name to filter by.                                                                                                                                                                                                                                                                                                                                       |
| `parameters.secret_locations__package`                   | string   | Optional     | Specifies the NPM or PyPi package name to filter by.                                                                                                                                                                                                                                                                                                                                       |
| `parameters.secret_locations__account`                   | string   | Optional     | Specifies the Azure Storage account name to filter by.                                                                                                                                                                                                                                                                                                                                     |
| `parameters.secret_locations__issue`                     | string   | Optional     | Specifies the Jira issue to filter by.                                                                                                                                                                                                                                                                                                                                                     |
| `parameters.secret_type`                                 | string   | Optional     | Specifies the secret type to filter by.                                                                                                                                                                                                                                                                                                                                                    |
| `parameters.triage_state`                                | string   | Optional     | Describes the the triage state of a secret as set by the customer  \* UNTRIAGED - A triage state has not been set (referred to as active in the UI)  \* FALSE\_POSITIVE - The secret has been marked as a false positive (reffered to as invalid in the UI)  \* RESOLVED - The secret leak has been resolved \* WILL\_NOT\_FIX - The secret leak has been confirmed, but will not be fixed |
| `parameters.has_no_last_verified`                        | boolean  | Optional     | Specifies if results should only include secrets that have never been verified.                                                                                                                                                                                                                                                                                                            |
| `parameters.has_connection_issues`                       | boolean  | Optional     | Specifies if results should only include secrets that have a connection issue from their last scan.                                                                                                                                                                                                                                                                                        |

### Input Example

`{"parameters":{"verified":true,"search":"mysecret","created_date_after":"2025-01-01","created_date_before":"2025-11-17","last_seen_after":"2025-01-01","last_seen_before":"2025-11-17","last_verified_after":"2025-01-01","last_verified_before":"2025-11-17","page":1,"secret_locations__source__type":"Github","secret_locations__source__id":1,"secret_locations__source__scanner_group__id":12,"secret_locations__repository":"myrepository","secret_locations__bucket":"mybucket","secret_locations__space":"myspace","secret_locations__image":"myimage","secret_locations__channel":"mychannel","secret_locations__workspace":"myworkspace","secret_locations__package":"mypackage","secret_locations__account":"myaccount","secret_locations__issue":"Invalid credentials","secret_type":"string","triage_state":"UNTRIAGED","has_no_last_verified":true,"has_connection_issues":true,"connection_issue_type":["NETWORK","TLS"]}}`

### Output

| **Parameter**                    | **Type** | **Description**                  |
| -------------------------------- | -------- | -------------------------------- |
| `status_code`                    | number   | HTTP status code of the response |
| `reason`                         | string   | Response reason phrase           |
| `lastPage`                       | number   | Output field: lastPage           |
| `countItems`                     | number   | Output field: countItems         |
| `countItemsOnPage`               | number   | Output field: countItemsOnPage   |
| `current`                        | number   | Output field: current            |
| `next`                           | string   | Output field: next               |
| `previous`                       | string   | Output field: previous           |
| `results`                        | array    | Result of the operation          |
| `results.id`                     | number   | Unique identifier                |
| `results.secret_type`            | string   | Type of the resource             |
| `results.redacted`               | string   | Result of the operation          |
| `results.verified`               | boolean  | Result of the operation          |
| `results.source`                 | string   | Result of the operation          |
| `results.found_date`             | string   | Result of the operation          |
| `results.triage_state`           | string   | Result of the operation          |
| `results.last_verified`          | string   | Result of the operation          |
| `results.last_seen`              | string   | Result of the operation          |
| `results.created_date`           | string   | Result of the operation          |
| `results.modified_date`          | string   | Result of the operation          |
| `results.date_rotated`           | string   | Result of the operation          |
| `results.user_defined`           | boolean  | Result of the operation          |
| `results.secret_locations_count` | number   | Result of the operation          |
| `results.distinct_source_types`  | array    | Type of the resource             |
| `results.distinct_source_names`  | array    | Name of the resource             |

### Output Example

`{"status_code":200,"reason":"OK","json_body":{"lastPage":10,"countItems":10,"countItemsOnPage":10,"current":2,"next":"https://api.trytruffle.ai/v2/secrets?page=3","previous":"https://api.trytruffle.ai/v2/secrets?page=1","results":[{}],"total_pages":20,"cur_page":2,"verification_error_count":0}}`

## Retrieve Secret

Retrieves a specific secret from TruffleHog using the unique identifier specified in the 'id' path parameter.

### Endpoint

- **URL:** `/v2/secrets/{{id}}`
- **Method:** `GET`

### Input

| **Argument Name**    | **Type** | **Required** | **Description**                           |
| -------------------- | -------- | ------------ | ----------------------------------------- |
| `path_parameters.id` | number   | Required     | Parameters for the Retrieve Secret action |

### Input Example

`{"path_parameters":{"id":10}}`

### Output

| **Parameter**                | **Type** | **Description**                  |
| ---------------------------- | -------- | -------------------------------- |
| `status_code`                | number   | HTTP status code of the response |
| `reason`                     | string   | Response reason phrase           |
| `id`                         | number   | Unique identifier                |
| `secret_type`                | string   | Type of the resource             |
| `redacted`                   | string   | Output field: redacted           |
| `verified`                   | boolean  | Output field: verified           |
| `source`                     | string   | Output field: source             |
| `found_date`                 | string   | Date value                       |
| `triage_state`               | string   | Output field: triage\_state      |
| `last_verified`              | string   | Output field: last\_verified     |
| `last_seen`                  | string   | Output field: last\_seen         |
| `created_date`               | string   | Date value                       |
| `modified_date`              | string   | Date value                       |
| `date_rotated`               | string   | Output field: date\_rotated      |
| `user_defined`               | boolean  | Output field: user\_defined      |
| `secret_locations_count`     | number   | Count value                      |
| `distinct_source_types`      | array    | Type of the resource             |
| `distinct_source_names`      | array    | Name of the resource             |
| `verification_error_message` | string   | Response message                 |
| `analyze_id`                 | number   | Unique identifier                |

### Output Example

`{"status_code":200,"reason":"OK","json_body":{"id":10,"secret_type":"test","redacted":"test","verified":true,"source":"myrepository","found_date":"2025-11-17","triage_state":"UNTRIAGED","last_verified":"2025-11-17","last_seen":"2025-11-17","created_date":"2025-11-17","modified_date":"2025-11-17","date_rotated":"2025-11-17","user_defined":true,"secret_locations_count":10,"distinct_source_types":["Github"]}}`

## Retrieve Secret Location

Retrieve the location of a specific secret in TruffleHog using the provided unique identifier (ID).

### Endpoint

- **URL:** `/v2/secret_locations/{{id}}`
- **Method:** `GET`

### Input

| **Argument Name**    | **Type** | **Required** | **Description**                            |
| -------------------- | -------- | ------------ | ------------------------------------------ |
| `path_parameters.id` | number   | Required     | The ID of the secret location to retrieve. |

### Input Example

`{"path_parameters":{"id":10}}`

### Output

| **Parameter**     | **Type** | **Description**                  |
| ----------------- | -------- | -------------------------------- |
| `status_code`     | number   | HTTP status code of the response |
| `reason`          | string   | Response reason phrase           |
| `id`              | number   | Unique identifier                |
| `secret_id`       | number   | Unique identifier                |
| `repository`      | string   | Output field: repository         |
| `bucket`          | string   | Output field: bucket             |
| `space`           | string   | Output field: space              |
| `registry`        | string   | Output field: registry           |
| `channel_name`    | string   | Name of the resource             |
| `workspace_name`  | string   | Name of the resource             |
| `package_name`    | string   | Name of the resource             |
| `account_name`    | string   | Name of the resource             |
| `file_name`       | string   | Name of the resource             |
| `issue`           | string   | Output field: issue              |
| `link`            | string   | Output field: link               |
| `azure_container` | string   | Output field: azure\_container   |
| `email`           | string   | Output field: email              |
| `snippet_id`      | number   | Unique identifier                |
| `title`           | string   | Output field: title              |
| `commit`          | string   | Output field: commit             |
| `timestamp`       | string   | Output field: timestamp          |
| `org`             | string   | Output field: org                |
| `pipeline`        | string   | Output field: pipeline           |
| `build_number`    | string   | Output field: build\_number      |
| `vcs_type`        | string   | Type of the resource             |

### Output Example

`{"status_code":200,"reason":"OK","json_body":{"id":10,"secret_id":10,"repository":"myrepository","bucket":"mybucket","space":"myspace","registry":"myregistry","channel_name":"mychannel","workspace_name":"myworkspace","package_name":"mypackage","account_name":"myaccount","file_name":"myfile.txt","issue":"myissue","link":"https://api.trytruffle.ai/v2/secret_locations/10","azure_container":"myazurecontainer","email":"myemail@example.com"}}`

# Response Headers

| **Header**   | **Description**                                       | **Example**                   |
| ------------ | ----------------------------------------------------- | ----------------------------- |
| Content-Type | The media type of the resource                        | application/json              |
| Date         | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |
