curl --request POST \
--url https://api.example.com/webhooks/github \
--header 'Content-Type: application/json' \
--header 'X-GitHub-Event: <x-github-event>' \
--header 'X-Hub-Signature-256: <x-hub-signature-256>' \
--data '
{
"ref": "<string>",
"after": "<string>",
"repository": {
"full_name": "<string>",
"clone_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/github \
--header 'Content-Type: application/json' \
--header 'X-GitHub-Event: <x-github-event>' \
--header 'X-Hub-Signature-256: <x-hub-signature-256>' \
--data '
{
"ref": "<string>",
"after": "<string>",
"repository": {
"full_name": "<string>",
"clone_url": "<string>"
}
}
'{
"success": true,
"data": {
"status": "scan_triggered",
"scan_id": 42,
"repo_id": 7,
"commit_sha": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"ref": "refs/heads/main"
}
}
Receives GitHub 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-Hub-Signature-256 header:
X-Hub-Signature-256: sha256=<hex_digest>
WEBHOOK_SECRET and verifies it matches the signature from GitHub.
Implementation (see src/routes/webhooks.rs:327):
X-Hub-Signature-256 headersha256= prefix and decodes hexWEBHOOK_SECRETsha256=push for the webhook to be processed. Other event types are ignored.refs/heads/main){
"ref": "refs/heads/main",
"after": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"repository": {
"full_name": "acme/web-app",
"clone_url": "https://github.com/acme/web-app.git"
}
}
src/routes/webhooks.rs:69)push events, ignores others (see src/routes/webhooks.rs:82)src/routes/webhooks.rs:91)clone_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 signature"
}
}
WEBHOOK_SECRET environment variable to enable webhook signature verification. This secret must match the secret configured in your GitHub repository webhook settings.
https://your-heimdall-instance.com/api/webhooks/githubapplication/jsonWEBHOOK_SECRET