---
title: Vector
slug: docs/vector
icon: {"faIcon":"fa-solid fa-v"}
docTags: 
createdAt: 2024-04-17T16:33:26.498Z
---

# Vector

:::BlockQuote
**Edition:** Enterprise only
:::

The Vector integration scans logs forwarded from Vector via the HTTP sink, enabling real-time secret detection on log streams.

## Configuration

The Vector integration is configured via a local configuration file. Web configuration in TruffleHog is not available for this source.

Setup requires configuration in two places: a TruffleHog source that listens for incoming logs, and a Vector HTTP sink that forwards logs to it.

### Local configuration

**TruffleHog source configuration**

:::BlockQuote
sources:
&#x20; \- connection:
&#x20;     "@type": type.googleapis.com/sources.Webhook
&#x20;     listenAddress: ":8080"
&#x20;     header:
&#x20;       key: Authorization
&#x20;       \# The value must be prefixed with 'Bearer ' as shown.
&#x20;       value: "Bearer your-secret-value"
&#x20;     vector:
&#x20;       \# Specify a field to extract using JQ-style syntax.
&#x20;       \# The extracted field can be used to format a link
&#x20;       \# back to your logging system in the TruffleHog dashboard.
&#x20;       locator\_field: "metadata.request\_id"
&#x20;       link\_format: "https\://your-logging-system.com/logs/&#x7B;locator}"
&#x20;   name: Vector logs
&#x20;   type: SOURCE\_TYPE\_WEBHOOK
&#x20;   verify: true
:::

**Vector HTTP sink configuration**

If present in the incoming log payload, the following fields are surfaced as metadata in the TruffleHog dashboard: host, hostname, timestamp, source\_type. See the Vector HTTP sink documentation for the full set of sink options.

:::BlockQuote
sinks:
&#x20; webhook:
&#x20;   type: http
&#x20;   inputs:
&#x20;     \- "in"
&#x20;   \# Customize the URI to point to whatever host\:port
&#x20;   \# you are running TruffleHog on.
&#x20;   uri: http\://localhost:8080/v1/vector
&#x20;   method: "post"
&#x20;   encoding:
&#x20;     codec: "json"
&#x20;   auth:
&#x20;     strategy: "bearer"
&#x20;     token: "your-secret-value"
:::

## Configuration options

| Field                 | Type   | Required | Description                                                                                      |
| --------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------ |
| listenAddress         | string | Yes      | The address and port the webhook listener binds to (e.g., :8080).                                |
| header.key            | string | Yes      | The HTTP header used for authentication. Typically Authorization.                                |
| header.value          | string | Yes      | The expected header value. For bearer tokens, prefix the secret with Bearer .                    |
| vector.locator\_field | string | No       | A jq-style path to a field in the incoming log used to build a link back to your logging system. |
| vector.link\_format   | string | No       | A URL template containing &#x7B;locator}, replaced with the value extracted via locator\_field.  |

## Capabilities

| Feature                  | Supported |
| ------------------------ | --------- |
| Real-time scanning       | ✅         |
| Scan log streams         | ✅         |
| Scan base64-encoded data | ✅         |

## Notes

- TruffleHog scans logs forwarded by Vector but does not block log delivery when credentials are detected. Detection is observe-only.
