GitGuardian Health Checks Trigger
Certified
Trigger a flow when a GitGuardian integration starts failing
GitGuardian Health Checks Trigger
Trigger a flow when a GitGuardian integration starts failing
Polls GET /v1/health-checks at interval for integration instances whose latest run has one of statuses (default FAIL) and starts one execution per poll listing the instances that entered that state since the previous poll (trigger.checks), at most maxItemsPerPoll (default 100) at a time. An integration that keeps failing does not re-fire: the trigger remembers each delivered instance@firstStartedAt pair, where firstStartedAt is the start of the current streak, so only new streaks fire. Tracking delivered pairs rather than a time watermark means a long-running check that reports its failure late is still delivered. On the first poll the failures already present are recorded and nothing fires. Requires the health_checks: read scope.
type: io.kestra.plugin.gitguardian.healthchecks.TriggerExamples
Page the platform team when a GitHub or GitLab integration breaks
id: gitguardian_integration_down
namespace: company.security
tasks:
- id: page
type: io.kestra.plugin.pagerduty.PagerDutyAlert
url: "https://events.pagerduty.com/v2/enqueue"
payload: |
{
"routing_key": "{{ secret('PAGERDUTY_KEY') }}",
"event_action": "trigger",
"payload": {
"summary": "GitGuardian integration failing: {{ trigger.checks | jq('[.[].instance.name] | join(", ")') | first }}",
"source": "kestra",
"severity": "error"
}
}
triggers:
- id: on_failure
type: io.kestra.plugin.gitguardian.healthchecks.Trigger
apiKey: "{{ secret('GITGUARDIAN_API_KEY') }}"
interval: PT10M
types:
- github-installation
- gitlab-installation
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.
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.
statuses array
["fail"]PASSWARNFAILUNKNOWNStatuses that fire
Any of FAIL, WARN, PASS. Defaults to FAIL only.
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
types array
Only these integration types
For example github-installation. All types when omitted.
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
checks array
Integration instances that entered a matching status since the previous poll
io.kestra.plugin.gitguardian.healthchecks.HealthCheck
date-timeWhen the current uninterrupted streak of identical results started
Health check run ID
The integration instance
io.kestra.plugin.gitguardian.healthchecks.HealthCheck-Instance
Instance ID
Instance display name
Operational status
active, revoked, suspended, or deleted.
Instance URL
date-timeDate of the last passing check for this instance
Individual check results
io.kestra.plugin.gitguardian.healthchecks.HealthCheck-Result
Error code, 0 when there is no error
Human-readable error message
Check category
api_network, webhook_network, api_access_rights, or webhook_access_rights.
PASSWARNFAILUNKNOWNCheck result
pass, warn, or fail.
date-timeWhen this run started
PASSWARNFAILUNKNOWNAggregate status
pass, warn, or fail.
Integration type
For example github-installation, slack-workspace, or jira-cloud-installation.
count integer
Number of instances