domain/shield/apps/cicd/webhooks.py.
Prerequisites
- Shield running locally.
GITHUB_WEBHOOK_SECRETconfigured for the Shield service (this is what the code reads).
1) Confirm the health endpoint
By default, the GitHub Actions webhook routes are mounted under:GET /api/v1/webhooks/github-actions/health
2) Send a signed workflow_run payload
Create a minimal payload (this is a small subset of what GitHub sends):WEBHOOK_BASE_URLGITHUB_WEBHOOK_SECRETpayload(and optionallyX-GitHub-Delivery)
X-GitHub-Event: workflow_runX-GitHub-Delivery: <unique id>
POST /api/v1/webhooks/github-actions/
Expected results
- HTTP
202with a JSON body indicating the event was queued. - Shield logs should show receipt of the delivery id and event type.
Troubleshooting
401 Invalid signature: verifyGITHUB_WEBHOOK_SECRETmatches what you used to sign.400 Invalid JSON payload: ensure the request body is valid JSON and sent withContent-Type: application/json.