GitGuardian Honeytokens Trigger
Certified
Trigger a flow when a GitGuardian honeytoken is used
GitGuardian Honeytokens Trigger
Trigger a flow when a GitGuardian honeytoken is used
Polls GET /v1/honeytokens_events at interval and starts one execution per poll carrying the new events, oldest first, in trigger.events (at most maxItemsPerPoll, default 100; the rest fire on the next polls), and the honeytokens they belong to in trigger.honeytokens, keyed by honeytoken ID (without their value). A honeytoken firing means someone used a decoy credential: treat it as an active intrusion signal. The delivery state is kept in the flow namespace KV store and seeded at the current time on the first poll. The events endpoint has no date filter and can only be read newest first. GitGuardian can report a use late (for example after a CloudTrail delay), so each poll reads back one hour behind the newest delivered event, skips the event IDs already delivered, and delivers the oldest of the rest. A use reported more than one hour after a newer one was delivered is not delivered. Requires the honeytokens: read scope.
type: io.kestra.plugin.gitguardian.honeytokens.TriggerExamples
Alert security and open a ticket when a honeytoken fires
id: gitguardian_honeytoken_alert
namespace: company.security
tasks:
- id: each_event
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.events }}"
tasks:
- id: alert
type: io.kestra.plugin.slack.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK') }}"
messageText: ":rotating_light: Honeytoken {{ trigger.honeytokens[fromJson(item.value).honeytokenId].name ?? fromJson(item.value).honeytokenId }} used from {{ fromJson(item.value).ipAddress }} ({{ fromJson(item.value).action }})"
- id: ticket
type: io.kestra.plugin.jira.issues.Create
baseUrl: https://company.atlassian.net
username: "{{ secret('JIRA_USER') }}"
password: "{{ secret('JIRA_TOKEN') }}"
projectKey: SEC
summary: "Honeytoken triggered: {{ trigger.honeytokens[fromJson(item.value).honeytokenId].name ?? fromJson(item.value).honeytokenId }}"
description: "{{ fromJson(item.value).gitguardianUrl }}"
triggers:
- id: on_honeytoken_event
type: io.kestra.plugin.gitguardian.honeytokens.Trigger
apiKey: "{{ secret('GITGUARDIAN_API_KEY') }}"
interval: PT1M
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-gitguardian --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
Properties
apiKey *string
GitGuardian API key
Personal access token or service account token created in the GitGuardian dashboard under API > Personal access tokens / Service accounts. The token needs the scopes required by the tasks and triggers you use, for example scan, incidents: read, incidents: write, or honeytokens: read. Sent as Authorization: Token <key>; never logged or included in error messages.
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
apiUrl string
https://api.gitguardian.comGitGuardian API URL
Base URL of the GitGuardian API for your workspace: https://api.gitguardian.com (US, default), https://api.eu1.gitguardian.com (EU), or https://<your-instance>/exposed for a self-hosted GitGuardian. The /v1 prefix is appended automatically.
honeytokenId string
Only events of this honeytoken ID
All honeytokens when omitted.
interval string
PT5MdurationPolling interval
How often to poll the GitGuardian API. Defaults to PT5M.
maxItemsPerPoll integerstring
100Maximum items delivered per poll
Caps how many new items one execution carries, from 1 to 1000. Defaults to 100. Items beyond the cap are not lost: the watermark only advances past delivered items, so they fire on the next polls, oldest first.
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
count integer
Number of events in this execution
events array
New honeytoken events since the previous poll, oldest first
At most maxItemsPerPoll per execution.
io.kestra.plugin.gitguardian.honeytokens.HoneytokenEvent
Action performed with the honeytoken
For example GetCallerIdentity.
Additional event data
For example user agent, AWS region, or geolocation.
Event URL on the GitGuardian dashboard
ID of the honeytoken that was used
Event ID
Source IP address
Event status
open or closed.
GitGuardian tags
date-timeWhen the honeytoken was used
honeytokens object
The honeytokens that were used, keyed by honeytoken ID, without their value
A honeytoken that could not be fetched is missing from the map.
io.kestra.plugin.gitguardian.honeytokens.Honeytoken
date-timeCreation date
ID of the member who created it
Custom tags
io.kestra.plugin.gitguardian.incidents.CustomTag
Custom tag ID
Custom tag key
Custom tag value
Null for key-only tags.
Description
Honeytoken URL on the GitGuardian dashboard
Honeytoken ID
Name
Number of open events
date-timeRevocation date
Status
active, triggered, or revoked.
GitGuardian tags
date-timeLast date the honeytoken switched from active to triggered
Type
Currently AWS.