curl --request POST \
--url https://api.example.com/webhooks/gitlab \
--header 'Content-Type: application/json' \
--header 'X-Gitlab-Token: <x-gitlab-token>' \
--data '
{
"object_kind": "<string>",
"ref": "<string>",
"after": "<string>",
"project": {
"path_with_namespace": "<string>",
"http_url": "<string>"
}
}
'{
"success": true,
"data": {
"status": "scan_triggered",
"scan_id": 42,
"repo_id": 7,
"commit_sha": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"ref": "refs/heads/main"
}
}
curl --request POST \
--url https://api.example.com/webhooks/gitlab \
--header 'Content-Type: application/json' \
--header 'X-Gitlab-Token: <x-gitlab-token>' \
--data '
{
"object_kind": "<string>",
"ref": "<string>",
"after": "<string>",
"project": {
"path_with_namespace": "<string>",
"http_url": "<string>"
}
}
'{
"success": true,
"data": {
"status": "scan_triggered",
"scan_id": 42,
"repo_id": 7,
"commit_sha": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"ref": "refs/heads/main"
}
}
Receives GitLab push event webhooks to automatically trigger security scans when code is pushed to repositories.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/iamngoni/heimdall/llms.txt
Use this file to discover all available pages before exploring further.
X-Gitlab-Token header:
X-Gitlab-Token: <your_webhook_secret>
WEBHOOK_SECRET using string equality.
Implementation (see src/routes/webhooks.rs:162):
X-Gitlab-Token headerWEBHOOK_SECRETpush for the webhook to be processed. Other event types are ignored.refs/heads/main){
"object_kind": "push",
"ref": "refs/heads/main",
"after": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"project": {
"path_with_namespace": "acme/web-app",
"http_url": "https://gitlab.com/acme/web-app.git"
}
}
WEBHOOK_SECRET (see src/routes/webhooks.rs:162)src/routes/webhooks.rs:168)object_kind: "push", ignores others (see src/routes/webhooks.rs:180)http_url (see src/routes/webhooks.rs:218)src/routes/webhooks.rs:245)src/routes/webhooks.rs:265)Show properties
scan_triggered or ignoredstatus is scan_triggered)status is scan_triggered)status is scan_triggered)status is scan_triggered)status is ignored){
"success": true,
"data": {
"status": "scan_triggered",
"scan_id": 42,
"repo_id": 7,
"commit_sha": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"ref": "refs/heads/main"
}
}
{
"success": false,
"error": {
"code": 401,
"message": "Invalid token"
}
}
WEBHOOK_SECRET environment variable to enable webhook token verification. This secret must match the secret token configured in your GitLab project webhook settings.
https://your-heimdall-instance.com/api/webhooks/gitlabWEBHOOK_SECRET