GitGuardian Secret Incidents Trigger
Certified
Trigger a flow when GitGuardian detects a secret incident
GitGuardian Secret Incidents Trigger
Trigger a flow when GitGuardian detects a secret incident
Polls GET /v1/incidents/secrets at interval and starts one execution per poll carrying the incidents whose last trigger date (date) is newer than the recorded watermark, oldest first (trigger.incidents), at most maxItemsPerPoll (default 100) at a time; the rest fire on the next polls. GitGuardian bumps date when a resolved or ignored incident is triggered again, so regressions fire too; check regression on each incident if they should be handled differently. Filters (status, severity, validity, detectorGroupName, tags, riskScoreMin) are applied server-side. The watermark (newest delivered date plus the IDs sharing it) lives in the flow namespace KV store, so nothing is re-fired after a restart. On the very first poll only the current baseline is recorded and nothing fires, which avoids flooding the flow with the existing backlog when the trigger is enabled. Requires the incidents: read scope.
type: io.kestra.plugin.gitguardian.incidents.TriggerExamples
Notify Slack and assign the on-call for every new valid critical incident
id: gitguardian_incident_response
namespace: company.security
tasks:
- id: each_incident
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.incidents }}"
tasks:
- id: notify
type: io.kestra.plugin.slack.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK') }}"
messageText: ":rotating_light: {{ fromJson(item.value).incidentName }} ({{ fromJson(item.value).severity }}, {{ fromJson(item.value).validity }}) {{ fromJson(item.value).gitguardianUrl }}"
- id: assign
type: io.kestra.plugin.gitguardian.incidents.Assign
apiKey: "{{ secret('GITGUARDIAN_API_KEY') }}"
incidentId: "{{ fromJson(item.value).id }}"
assigneeEmail: security-oncall@company.com
triggers:
- id: on_incident
type: io.kestra.plugin.gitguardian.incidents.Trigger
apiKey: "{{ secret('GITGUARDIAN_API_KEY') }}"
interval: PT1M
severity: CRITICAL
validity: VALID
Open a Jira ticket for every new incident on the EU region
id: gitguardian_incident_to_jira
namespace: company.security
tasks:
- id: each_incident
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.incidents }}"
tasks:
- 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: "Leaked secret: {{ fromJson(item.value).incidentName }}"
description: "{{ fromJson(item.value).gitguardianUrl }}"
triggers:
- id: on_incident
type: io.kestra.plugin.gitguardian.incidents.Trigger
apiKey: "{{ secret('GITGUARDIAN_API_KEY') }}"
apiUrl: https://api.eu1.gitguardian.com
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.
detectorGroupName string
Only incidents from this detector group
For example aws_iam.
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.
riskScoreMin integerstring
Minimum risk score, from 0 to 100
severity string
CRITICALHIGHMEDIUMLOWINFOUNKNOWNOnly incidents at this severity
CRITICAL, HIGH, MEDIUM, LOW, INFO, or UNKNOWN. Any severity when omitted.
status string
TRIGGEREDASSIGNEDRESOLVEDIGNOREDUNKNOWNOnly incidents in this status
TRIGGERED, ASSIGNED, RESOLVED, or IGNORED. Any status when omitted.
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
validity string
VALIDINVALIDFAILED_TO_CHECKNO_CHECKERNOT_CHECKEDUNKNOWNOnly incidents with this secret validity
VALID, INVALID, FAILED_TO_CHECK, NO_CHECKER, or UNKNOWN.
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 incidents in this execution
incidents array
New incidents since the previous poll, oldest first
At most maxItemsPerPoll per execution.
io.kestra.plugin.gitguardian.incidents.Incident
Email of the assigned member
ID of the assigned member
Custom tags set on the incident
io.kestra.plugin.gitguardian.incidents.CustomTag
Custom tag ID
Custom tag key
Custom tag value
Null for key-only tags.
date-timeDate the incident was last triggered
Declarative secret status
Only set on Public Monitoring incidents delivered by webhook, for example active or not_declared.
Detector that found the secret
io.kestra.plugin.gitguardian.incidents.Detector
Detector group display name
Detector group name
Detector display name
For example AWS Keys.
Detector family
For example apikey, token, or private_key.
Detector name
For example aws_iam.
Detector nature
specific or generic.
Incident URL on the GitGuardian dashboard
Incident ID
Reason given when the incident was ignored
test_credential, false_positive, low_risk, or invalid.
date-timeDate the incident was ignored
Human-readable incident name
Combines the detector and a short identifier, for example AWS Keys - 7f3a.
Number of occurrences of the secret across monitored sources
Whether the incident was re-triggered after being resolved or ignored
date-timeDate the incident was resolved
Risk score from 0 (low) to 100 (critical)
Whether the secret was reported as revoked on resolution
CRITICALHIGHMEDIUMLOWINFOUNKNOWNIncident severity
critical, high, medium, low, info, or unknown.
Public share URL, if the incident was shared
TRIGGEREDASSIGNEDRESOLVEDIGNOREDUNKNOWNIncident status
TRIGGERED, ASSIGNED, RESOLVED, or IGNORED.
GitGuardian tags
For example FROM_HISTORICAL_SCAN, PUBLICLY_EXPOSED, or TEST_FILE.
date-timeDate the incident was first triggered
VALIDINVALIDFAILED_TO_CHECKNO_CHECKERNOT_CHECKEDUNKNOWNValidity of the secret
valid, invalid, failed_to_check, no_checker, or unknown.
Whether the secret is stored in a vault