GitGuardian Secrets Scanning CreateIncidents

GitGuardian Secrets Scanning CreateIncidents

Certified

Scan content and create GitGuardian incidents for a custom source

Scans inline content and/or internal storage files with POST /v1/scan/create-incidents and, unlike Scan, records every secret found as a real incident on the GitGuardian dashboard, attached to a custom source identified by sourceUuid (create one with sources.CreateCustomSource). Use it to bring data that GitGuardian cannot monitor natively into the incident workflow: warehouse extracts, ticket exports, object storage dumps, generated artifacts; this is the Kestra counterpart of GitGuardian's Bring Your Own Sources with ggshield --source-uuid. Optional locationUrl and authorEmail are shown on the occurrences. Documents are grouped into requests of at most 1 MB, the endpoint's request body limit, so one document must stay under 1 MB. The endpoint is in beta on the GitGuardian side. Requires the scan: create-incidents scope, which includes scan.

yaml
type: io.kestra.plugin.gitguardian.scan.CreateIncidents

Register secrets found in a nightly warehouse export as GitGuardian incidents

yaml
id: gitguardian_warehouse_export_scan
namespace: company.data

tasks:
  - id: export
    type: io.kestra.plugin.jdbc.postgresql.CopyOut
    url: jdbc:postgresql://warehouse:5432/analytics
    username: "{{ secret('PG_USER') }}"
    password: "{{ secret('PG_PASSWORD') }}"
    sql: SELECT id, notes FROM support_tickets WHERE updated_at > now() - interval '1 day'
    format: CSV

  - id: create_incidents
    type: io.kestra.plugin.gitguardian.scan.CreateIncidents
    apiKey: "{{ secret('GITGUARDIAN_API_KEY') }}"
    sourceUuid: "{{ kv('GITGUARDIAN_WAREHOUSE_SOURCE_UUID') }}"
    files:
      - "{{ outputs.export.uri }}"
    locationUrl: https://warehouse.company.com/tables/support_tickets

triggers:
  - id: nightly
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 3 * * *"
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.

UUID of the GitGuardian custom source that owns the incidents

Returned by sources.CreateCustomSource; store it in the KV store or a secret.

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.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Email of the document author, for attribution on the occurrences

Inline content to scan

Scanned as one document named after filename. Use files to scan files from internal storage instead of, or in addition to, inline content.

Defaultcontent

File name for the inline content

Helps GitGuardian detectors that rely on file context (for example .env or id_rsa). Defaults to content.

SubTypestring

Internal storage files to scan

List of kestra:// URIs, typically outputs of previous tasks. Each file is scanned as one document named after the last segment of its URI and must be at most 1 MB.

URL shown on the created occurrences

Where the scanned data can be found, for example a warehouse table or bucket URL.

Number of documents scanned

Total number of policy breaks reported as incidents

Scan results

Detector, validity, known incident URL and match positions. Never the matched secret strings.

Definitions
filenamestring

Name of the scanned document

Set by the task from the input filename or file name; GitGuardian does not echo it back.

policiesarray
SubTypestring

Policies checked

For example Secrets detection.

policyBreakCountinteger

Number of policy breaks in this document

policyBreaksarray

Policy breaks found in this document

incidentUrlstring

URL of the existing incident on the GitGuardian dashboard, when the secret is known

knownSecretboolean

Whether GitGuardian already knows this secret from a monitored source

matchesarray

Locations of the secret in the document

indexEndinteger

End index of the match in the document

indexStartinteger

Start index of the match in the document

lineEndinteger

End line of the match

lineStartinteger

Start line of the match

typestring

Kind of match

For example apikey, client_id, password, or host.

policystring

Policy that was broken

Currently always Secrets detection.

typestring

Detector that matched

For example AWS Keys or Generic High Entropy Secret.

validitystring
Possible Values
VALIDINVALIDFAILED_TO_CHECKNO_CHECKERNOT_CHECKEDUNKNOWN

Validity of the secret

valid, invalid, failed_to_check, no_checker, or unknown.

Number of documents scanned.

Number of policy breaks (incidents) created or updated.