GitGuardian Health Checks Trigger

GitGuardian Health Checks Trigger

Certified

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.

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

Page the platform team when a GitHub or GitLab integration breaks

yaml
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

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.

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
Default["fail"]
Possible Values
PASSWARNFAILUNKNOWN

Statuses that fire

Any of FAIL, WARN, PASS. Defaults to FAIL only.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

SubTypestring

Only these integration types

For example github-installation. All types when omitted.

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.

Integration instances that entered a matching status since the previous poll

Definitions
firstStartedAtstring
Formatdate-time

When the current uninterrupted streak of identical results started

idinteger

Health check run ID

instance

The integration instance

idinteger

Instance ID

namestring

Instance display name

statusstring

Operational status

active, revoked, suspended, or deleted.

urlstring

Instance URL

lastSuccessfulCheckDatestring
Formatdate-time

Date of the last passing check for this instance

resultsarray

Individual check results

errorCodeinteger

Error code, 0 when there is no error

errorMessagestring

Human-readable error message

kindstring

Check category

api_network, webhook_network, api_access_rights, or webhook_access_rights.

statusstring
Possible Values
PASSWARNFAILUNKNOWN

Check result

pass, warn, or fail.

startedAtstring
Formatdate-time

When this run started

statusstring
Possible Values
PASSWARNFAILUNKNOWN

Aggregate status

pass, warn, or fail.

typestring

Integration type

For example github-installation, slack-workspace, or jira-cloud-installation.

Number of instances