GitGuardian Audit Logs Trigger
Certified
Trigger a flow on new GitGuardian audit log events
GitGuardian Audit Logs Trigger
Trigger a flow on new GitGuardian audit log events
Polls GET /v1/audit_logs at interval and starts one execution per poll carrying the new events since the last poll (trigger.events), so a burst of activity produces one execution, not one per event. A poll carries at most maxItemsPerPoll events (default 100) to keep the output small; the rest fire on the next polls. The API cannot sort audit logs, so each poll reads every event of a window of at most one day after the watermark, then delivers the oldest ones. A longer backlog is caught up one window per poll. Optionally restrict to eventNames. The watermark (newest delivered date plus the IDs sharing it) is kept in the flow namespace KV store; on the first poll it is seeded at the current time and nothing fires. Requires the audit_logs: read scope.
type: io.kestra.plugin.gitguardian.auditlogs.TriggerExamples
Alert when an incident is ignored or an API token is created
id: gitguardian_sensitive_actions
namespace: company.security
tasks:
- id: alert
type: io.kestra.plugin.slack.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK') }}"
messageText: |
GitGuardian: {{ trigger.count }} sensitive action(s)
{% for event in trigger.events %}- {{ event.eventName }} by {{ event.memberEmail ?? event.apiTokenId }}
{% endfor %}
triggers:
- id: on_audit_event
type: io.kestra.plugin.gitguardian.auditlogs.Trigger
apiKey: "{{ secret('GITGUARDIAN_API_KEY') }}"
interval: PT5M
eventNames:
- incident.ignored
- api_token.created
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.
eventNames array
Only these event names
For example incident.ignored. All events when omitted. Filtered server-side one name at a time.
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 new events
events array
New audit log events since the previous poll, oldest first
At most maxItemsPerPoll per execution.
io.kestra.plugin.gitguardian.auditlogs.AuditLog
Action type
For example create, update, or delete.
ID of the API token used, when the action came through the API
Additional event data
date-timeEvent date
Event name
For example incident.ignored, api_token.created, or member.invited. GET /v1/audit_logs/event_names lists them all.
Audit log entry ID
Source IP address
Email of the member who performed the action
ID of the member who performed the action
Null when the member was deleted or the action came from an API token.
Name of the member at the time of the action
IDs of the objects targeted by the action