GitGuardian Secrets Scanning CreateIncidents
Certified
Scan content and create GitGuardian incidents for a custom source
GitGuardian Secrets Scanning CreateIncidents
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.
type: io.kestra.plugin.gitguardian.scan.CreateIncidentsExamples
Register secrets found in a nightly warehouse export as GitGuardian incidents
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
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.
sourceUuid *string
UUID of the GitGuardian custom source that owns the incidents
Returned by sources.CreateCustomSource; store it in the KV store or a secret.
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.
assets
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.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset 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.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150content string
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.
filename string
contentFile name for the inline content
Helps GitGuardian detectors that rely on file context (for example .env or id_rsa). Defaults to content.
files array
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.
locationUrl string
URL shown on the created occurrences
Where the scanned data can be found, for example a warehouse table or bucket URL.
Outputs
documentCount integer
Number of documents scanned
policyBreakCount integer
Total number of policy breaks reported as incidents
results array
Scan results
Detector, validity, known incident URL and match positions. Never the matched secret strings.
io.kestra.plugin.gitguardian.scan.ScanResult
Name of the scanned document
Set by the task from the input filename or file name; GitGuardian does not echo it back.
Policies checked
For example Secrets detection.
Number of policy breaks in this document
Policy breaks found in this document
io.kestra.plugin.gitguardian.scan.PolicyBreak
URL of the existing incident on the GitGuardian dashboard, when the secret is known
Whether GitGuardian already knows this secret from a monitored source
Locations of the secret in the document
io.kestra.plugin.gitguardian.scan.PolicyBreakMatch
End index of the match in the document
Start index of the match in the document
End line of the match
Start line of the match
Kind of match
For example apikey, client_id, password, or host.
Policy that was broken
Currently always Secrets detection.
Detector that matched
For example AWS Keys or Generic High Entropy Secret.
VALIDINVALIDFAILED_TO_CHECKNO_CHECKERNOT_CHECKEDUNKNOWNValidity of the secret
valid, invalid, failed_to_check, no_checker, or unknown.
Metrics
documents counter
Number of documents scanned.
policy.breaks counter
Number of policy breaks (incidents) created or updated.