GitGuardian Honeytokens Trigger

GitGuardian Honeytokens Trigger

Certified

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.

yaml
type: io.kestra.plugin.gitguardian.honeytokens.Trigger

Alert security and open a ticket when a honeytoken fires

yaml
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

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.

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

Defaulthttps://api.gitguardian.com

GitGuardian 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.

Only events of this honeytoken ID

All honeytokens when omitted.

DefaultPT5M
Formatduration

Polling interval

How often to poll the GitGuardian API. Defaults to PT5M.

Default100

Maximum 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.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaulttrue

A 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.

Number of events in this execution

New honeytoken events since the previous poll, oldest first

At most maxItemsPerPoll per execution.

Definitions
actionstring

Action performed with the honeytoken

For example GetCallerIdentity.

dataobject

Additional event data

For example user agent, AWS region, or geolocation.

gitguardianUrlstring

Event URL on the GitGuardian dashboard

honeytokenIdstring

ID of the honeytoken that was used

idstring

Event ID

ipAddressstring

Source IP address

statusstring

Event status

open or closed.

tagsarray
SubTypestring

GitGuardian tags

triggeredAtstring
Formatdate-time

When the honeytoken was used

The honeytokens that were used, keyed by honeytoken ID, without their value

A honeytoken that could not be fetched is missing from the map.

Definitions
createdAtstring
Formatdate-time

Creation date

creatorIdinteger

ID of the member who created it

customTagsarray

Custom tags

idstring

Custom tag ID

keystring

Custom tag key

valuestring

Custom tag value

Null for key-only tags.

descriptionstring

Description

gitguardianUrlstring

Honeytoken URL on the GitGuardian dashboard

idstring

Honeytoken ID

namestring

Name

openEventsCountinteger

Number of open events

revokedAtstring
Formatdate-time

Revocation date

statusstring

Status

active, triggered, or revoked.

tagsarray
SubTypestring

GitGuardian tags

triggeredAtstring
Formatdate-time

Last date the honeytoken switched from active to triggered

typestring

Type

Currently AWS.