Skip to main content

What are Webhooks?

Webhooks are automated HTTP callbacks that allow Corgea to send real-time notifications to your external systems when specific events occur. Instead of continuously polling our API to check for updates, webhooks push event data directly to your specified endpoint the moment something happens.

Key Benefits

  • Real-time notifications - Receive instant updates when security issues are found, status changes occur, or scans complete
  • Automation - Trigger workflows in external tools like Slack, Zapier, or custom applications
  • Efficiency - No need to poll APIs - we push data to you when events happen
  • Flexibility - Subscribe only to the events you care about and filter by project, status, or scheduled scan
  • Reliability - Built-in retry logic and delivery tracking ensure your notifications get through

Supported Event Types

Corgea supports webhooks for the following events: Issue Events:
  • issue.status_changed - Triggered when an issue’s status is updated (e.g., open → fixed)
  • issue.assigned - Triggered when an issue is assigned to a team member
SLA Events:
  • sla.violation - Triggered when the daily SLA job finds one or more SAST or SCA issues past their remediation or escalation deadline (configured per SLA in SLA Management)
Scan Events:
  • scan.started - Triggered when a security scan begins
  • scan.completed - Triggered when a scan finishes successfully
  • scan.failed - Triggered when a scan encounters an error
  • scheduled_scan.daily_report - Triggered daily when scheduled scan runs complete, summarizing new issues found across all runs in the last 24 hours. See Notifications for the email and payload schema.
Scan lifecycle events (scan.started, scan.completed, scan.failed) include data.message — a short plain-text summary you can drop into Slack, Zapier, or other chat tools. They also include triage fields: pull_request_id, scan_url, true_positive_count, project_name, and status.For Slack Workflow Builder (Type = Slack + hooks.slack.com/triggers/...), Corgea flattens only scan.started / scan.completed / scan.failed and webhook.test into top-level keys. Do not map nested data.* in Slack — that causes HTTP 400. Other event types on the same Slack webhook keep the nested envelope. See Slack.
User Auth Events:
  • user.login - Triggered when a user successfully logs in
  • user.login_failed - Triggered when a user login attempt fails

How Webhooks Work

The Webhook Lifecycle

1

Event Occurs

Something happens in Corgea (e.g., a scan completes, an issue status changes)
2

Webhook Triggered

The system identifies all webhooks subscribed to that event type
3

Filtering Applied

Project, status, scheduled scan, PR-only, and completed-with-findings filters determine if the webhook should fire
4

Payload Built

By default, a standardized JSON envelope is constructed with event details (or your custom body template is used, if configured). For Slack Workflow Builder (Type = Slack + triggers/ URL), Corgea flattens the HTTP body for scan.* and webhook.test only; other events stay nested.
5

HTTP POST Request

The payload is sent to your webhook URL with security headers
6

Retry Logic

If the request fails, automatic retries occur with exponential backoff
7

Delivery Logged

All attempts are tracked in the delivery history for troubleshooting

Payload Structure

By default, webhook payloads follow a standardized nested envelope (Zapier / Other). Scan lifecycle events include data.message plus triage fields:
webhook-payload.json
summary.total_issues counts all non-deleted issues (including false positives and code-quality). true_positive_count is the triage count used in message and Scan Event Filters. true_positive_count counts non-deleted security findings that are not false positives (same logic as the scan UI: excludes status=false_positive, hold_reason=false_positive, and detected_by=code-quality). The optional (N with fixes) suffix in scan.completed messages counts fixes only among those true-positive findings (not all issues on the scan).
Slack Workflow Builder: when Type = Slack and the URL is hooks.slack.com/triggers/..., Corgea POSTs a flat body for scan.* and webhook.test (top-level message, pull_request_id, scan_url, true_positive_count, company, etc.). Nested data.* mapping is unsupported in Slack and causes HTTP 400. Non-scan events on that webhook are not flattened. See Slack.
Example sla.violation payload (from SLA Management daily job):
sla-violation-payload.json
Subscribe to sla.violation under Integrations → Webhooks, or attach a webhook from the SLA Management form (existing webhooks are auto-subscribed). Example scheduled_scan.daily_report payload:
scheduled-scan-daily-report-payload.json
Company admins can control whether this event sends to webhooks from Settings → Notifications → Company Defaults. If you configure Custom Body during webhook setup, Corgea sends your rendered JSON object instead of the default payload structure.
The scheduled_scan.daily_report event uses the same envelope but has its own data schema. See Payload Examples for the full reference.

Security Features

  • Corgea automatically generates a secret key when you create a webhook
  • Each request includes an X-Corgea-Signature header with an HMAC-SHA256 hash of the payload
  • Verify the signature with your secret key to ensure the webhook came from Corgea
  • Include headers required by your endpoint (e.g., authentication tokens)
  • Configure custom headers during webhook setup
  • All webhook URLs must use HTTPS (ports 443 or 80 only)
  • URLs must not embed credentials in the URL
  • Destinations that resolve to private, loopback, link-local, reserved, or multicast addresses are rejected (SSRF protection)
  • Operators can optionally restrict hosts with the WEBHOOK_ALLOWED_HOSTS setting

Automatic Retry Logic

If webhook delivery fails, Corgea automatically retries with the following strategy:
  • Initial attempt + 2 retries = 3 total attempts
  • Exponential backoff: 2 seconds, 4 seconds between retries
  • Timeout: 10 seconds per request
  • Auto-pause: After 10 consecutive failures, the webhook is automatically paused

Headers Sent with Each Webhook

webhook-headers.txt

Setting Up a Webhook

Webhooks management interface showing list of configured webhooks

Prerequisites

Admin or integration management permissions in your Corgea account
A webhook endpoint URL that accepts POST requests
HTTPS endpoint (required for security)

Step-by-Step Setup

1

Navigate to Integrations

  • Open Integrations in Corgea
  • Under Automation Integrations, open Webhooks
Automation Integrations showing Webhooks active, with Slack and Zapier marked Deprecated
The standalone Slack and Zapier rows are deprecated. Use Webhooks for new setups. Existing Slack/Zapier integrations keep working — open View All to test or delete them.
2

Configure Basic Settings

Create webhook form showing Name, Webhook URL, and Type fields
  • Name: A clear label (for example, “Slack Notifications” or “Production Scan Alerts”)
  • Webhook URL: Your HTTPS endpoint
  • Type:
    • Slack — Slack Workflow Builder or Incoming Webhook destinations
    • Zapier — Zapier Catch Hooks
    • Other — custom endpoints
For Slack, prefer a Workflow Builder URL (hooks.slack.com/triggers/...). Corgea flattens scan.* and webhook.test for those destinations — map top-level message, not nested data.*. Non-scan events stay nested. Incoming Webhooks (hooks.slack.com/services/...) are rejected unless you set a Custom Body whose rendered JSON has a top-level non-empty string text field. {"text": "{{message}}"} is allowed only for scan lifecycle events and scheduled_scan.daily_report. See Slack.
3

Subscribe to Events

Event Subscriptions form with toggles for issue, SLA, scan, user, and scheduled scan events
Toggle on the events you care about. You can select more than one:
  • Issue Status Changed
  • Issue Assigned
  • SLA Violation (sla.violation)
  • Scan Started / Completed / Failed
  • User Login / User Login Failed
  • Scheduled Scan Daily Report (scheduled_scan.daily_report)
4

Configure Filters (Optional)

Project Scope, Scheduled Scan Scope, Custom Headers, and Custom Body sections
Scan Event Filters (for scan.* events)
  • Only pull request / merge request scans — skip scans without a pull_request_id
  • Only completed scans with true-positive findings — skip scan.completed when true_positive_count is 0 (scan.failed / scan.started are unaffected)
Project Scope
  • Leave disabled to receive events from all projects
  • Enable filtering to limit the webhook to selected projects
  • For sla.violation, the webhook fires if any project in the payload matches
Status Change Filter (for issue.status_changed)
  • Leave empty for all status changes
  • Or limit to statuses like fixed or false_positive
Scheduled Scan Scope (for scan.* events)
  • Leave disabled to receive all scans (manual and scheduled)
  • Enable it to only fire for selected scheduled scans
5

Add Custom Headers and Body (Optional)

Custom HeadersAdd headers required by your webhook destination. Each service has different requirements:
Required Header:
How to get your token:
  1. In Jira, create an automation rule with an “Incoming webhook” trigger
  2. Copy the secret token provided by Jira
  3. Add it as the header value in Corgea
Jira Webhook Documentation
No custom headers needed — auth is in the Slack URL.Prefer a Workflow Builder URL (https://hooks.slack.com/triggers/...). With Type = Slack, Corgea flattens scan.* and webhook.test — map message, pull_request_id, scan_url, true_positive_count, company. Do not map nested data.* (Slack returns HTTP 400). Other event types are not flattened. See Slack.Incoming Webhooks (https://hooks.slack.com/services/...) need a Custom Body whose rendered JSON has a top-level non-empty string text field. Use {"text": "{{message}}"} only with scan lifecycle events and scheduled_scan.daily_report.
No custom headers needed - Teams webhook URLs include authentication in the URL itself.Just paste your Teams webhook URL (format: https://xxx.webhook.office.com/webhookb2/xxx/IncomingWebhook/xxx)
Teams incoming webhooks do not validate custom headers. Security is provided by keeping the webhook URL secret.
Teams Webhook Documentation
Header:
Common for REST APIs that use JWT or OAuth tokens.
Header:
Use this when sending webhook events to a Splunk HTTP Event Collector (HEC) endpoint.
Headers (choose one):
or
Common for simple API key authentication.
No custom headers needed - PagerDuty Events API v2 uses the routing_key in the JSON payload for authentication.Use the PagerDuty Events API endpoint: https://events.pagerduty.com/v2/enqueue
PagerDuty does not validate custom headers. Authentication is handled via the routing_key in the request body.
PagerDuty Webhook Documentation
No custom headers needed - Zapier webhook URLs include authentication in the URL itself.Create a “Webhooks by Zapier” trigger and use the provided URL.
Zapier Catch Hook does not validate custom headers by default. Security is provided by keeping the webhook URL secret. You can add header validation logic within your Zap if needed.
Zapier Webhook Documentation
If your service isn’t listed here, check the service’s webhook or incoming webhook documentation for required headers.
Important: While Corgea will send any custom headers you configure, not all webhook destinations validate them. Services like Slack, Teams, and Zapier rely on secret URLs rather than header validation. Only add custom headers if your destination service actually requires or validates them (like Jira, custom APIs, etc.).
Custom Body
  • Optionally provide a JSON object template for the webhook request body
  • Leave blank to use Corgea’s default payload structure
  • Supported placeholders:
    • {{payload}} (full default payload object)
    • {{time}} (Unix seconds)
    • {{timestamp}} (ISO 8601 timestamp)
    • {{event_type}}
    • {{event_id}}
    • {{message}} (from data.message when present — scan lifecycle and daily report)
  • If the rendered template is invalid JSON, delivery fails and the error appears in webhook history
6

Save and Activate

  • Click Create Webhook
  • Copy the secret key from the popup — Corgea shows it only once
Webhook Secret Key popup shown once after creating a webhook
Save the secret key before closing the dialog. You cannot view it again afterward. Contact support if you need to rotate it.
  • Click I’ve saved the Secret Key
  • The webhook is active and will start receiving events
7

Test Your Webhook

  • Open the webhook and click Test Webhook
  • Confirm your endpoint returns a 2xx response
  • For Slack Workflow Builder: expect a flat body with a non-empty top-level message and sample triage keys (pull_request_id, scan_url, true_positive_count, etc.) so you can map variables during Test. Nested-only Workflow Builder configs are unsupported.

Verifying Webhook Signatures

Use the secret key shown at creation time to verify the X-Corgea-Signature header on each request.
verify-signature.py

Use Cases

1. Real-time Slack Notifications

Scenario: Notify your security team in Slack when high-severity issues are found Setup:
  • Create a Slack incoming webhook URL in your Slack workspace
  • In Corgea, create a webhook with:
    • Type: Slack
    • URL: Your Slack webhook URL
    • Events: scan.completed
    • Project Filter: Critical production projects
Result: Your #security channel gets instant notifications when scans complete

2. Automated Ticketing for Critical Issues

Scenario: Automatically create tickets in Jira/Linear when critical issues are detected Setup:
  • Create a Zapier zap or custom endpoint that creates tickets
  • In Corgea, create a webhook with:
    • Events: scan.completed, issue.status_changed
    • Status Filter: Only open status (to avoid duplicate tickets)
    • Project Filter: Production projects
Result: High/critical issues automatically become tickets in your project management tool

3. Risk Acceptance Workflow Integration

Scenario: Automatically document accepted risks in Jira or Linear when security issues are marked as “Accepted Risk” Setup:
  • Create an endpoint or Zapier integration that creates documentation tickets
  • In Corgea, create a webhook with:
    • Events: issue.status_changed
    • Status Filter: Only accepted_risk status
    • Project Filter: All projects or specific high-compliance projects
  • Configure the integration to:
    • Create a ticket documenting the risk acceptance
    • Include issue details (classification, file path, urgency)
    • Tag with “risk-acceptance” label
    • Assign to security lead for review
Result: Every accepted risk is automatically logged in your project management system with full context, creating an audit trail for compliance and risk management reviews

4. Custom Dashboard Integration

Scenario: Display real-time security metrics on your internal dashboard Setup:
  • Build an endpoint that receives webhook data and updates your dashboard
  • In Corgea, create a webhook with:
    • Events: All scan and issue events
    • No filters (receive everything)
Result: Your dashboard shows live security scan results and issue trends

5. Multi-team Routing

Scenario: Route different project notifications to different teams Setup:
  • Create separate webhooks for each team:
    • Backend Team Webhook: Project filter = backend projects, Slack channel #backend-security
    • Frontend Team Webhook: Project filter = frontend projects, Slack channel #frontend-security
    • DevOps Team Webhook: Project filter = infrastructure projects, Slack channel #devops-security
Result: Each team only sees security issues relevant to their projects

6. Compliance Reporting

Scenario: Automatically log all security findings to a compliance system Setup:
  • Create an endpoint that writes to your compliance database
  • In Corgea, create a webhook with:
    • Events: scan.completed
    • All projects
    • Store webhook delivery history for audit trail
Result: Complete audit trail of all security scans for compliance purposes

Troubleshooting

Viewing Webhook Delivery History

1

Navigate to Webhook History

Navigate to IntegrationsWebhooks
Webhook delivery history showing recent webhook attempts
2

Access Delivery Log

Click on History or Delivery Log
3

Review Delivery Details

Detailed webhook delivery information including request and response
View all webhook delivery attempts with:
  • Event type and timestamp
  • HTTP status code
  • Request/response details
  • Error messages (if any)
  • Retry attempts

Common Issues and Solutions

Possible Causes:
  • Webhook is paused or inactive
  • Event subscriptions not configured
  • Project, status, or scheduled scan filters excluding events
  • Endpoint not returning 2xx status codes
Solutions:
  1. Check webhook status - ensure it’s active (not paused)
  2. Verify event subscriptions are selected
  3. Review filters - temporarily remove project, status, or scheduled scan filters to test
  4. Check your endpoint logs for incoming requests
  5. Test the webhook using the “Test Webhook” button
Cause: 10 consecutive delivery failuresSolutions:
  1. Check the delivery history for error details
  2. Verify your endpoint URL is correct and accessible
  3. Ensure your endpoint returns 2xx status codes
  4. Check for firewall/security rules blocking Corgea’s requests
  5. Fix the underlying issue, then manually re-activate the webhook
  6. Use “Test Webhook” to verify it’s working before re-enabling
Solutions:
  1. Use Status Filters: For issue.status_changed, filter to only statuses you care about (e.g., only fixed and false_positive)
  2. Use Project Filters: Only subscribe to specific critical projects
  3. Use Scheduled Scan Filters: For scan events, select the scheduled scans that should trigger the webhook
  4. Reduce Event Subscriptions: Unsubscribe from events you don’t need
  5. Implement Rate Limiting: On your endpoint, implement rate limiting or queuing
Possible Causes:
  • Wrong secret key
  • Incorrect signature verification logic
  • Character encoding issues
Solutions:
  1. Verify you’re using the exact secret key from Corgea
  2. Ensure you’re using HMAC-SHA256 algorithm
  3. Use the raw request body (not parsed JSON) for verification
  4. Check for UTF-8 encoding on both sides
  5. Use hmac.compare_digest() (Python) or crypto.timingSafeEqual() (Node.js) for timing-safe comparison
Log both the received signature and your computed signature to compare
Cause: Your endpoint takes longer than 10 seconds to respondSolutions:
  1. Acknowledge Immediately: Return 200 OK immediately, then process asynchronously
  2. Use a Queue: Add webhook payloads to a queue for background processing
  3. Optimize Processing: Speed up your webhook handler logic
  4. Increase Resources: Scale up your endpoint infrastructure
Best Practice Pattern:
webhook-handler.py
Possible Causes:
  • Multiple webhooks subscribed to same event
  • Retry logic triggering after delayed success
Solutions:
  1. Check for duplicate webhook configurations
  2. Use event_id field for idempotency - store processed event IDs and skip duplicates
  3. Implement idempotency keys in your endpoint
Idempotency Pattern:
idempotency.py
Solutions:
  1. Check the webhook delivery history for the full payload
  2. Some fields may be null if data doesn’t exist (e.g., unassigned issues)
  3. Implement null checks in your handler code
  4. Reference the event-specific payload structure in the delivery history

Getting Webhook Statistics

View performance metrics for your webhooks:
  1. Navigate to IntegrationsWebhooks
  2. View each webhook’s statistics:
    • Total Deliveries: Total number of webhook calls
    • Successful Deliveries: Calls that returned 2xx
    • Failed Deliveries: Calls that failed or timed out
    • Success Rate: Percentage of successful deliveries
    • Consecutive Failures: Current failure streak
    • Last Triggered: When the webhook last fired

Manual Retry

If a webhook delivery failed, you can manually retry it:
  1. Go to IntegrationsWebhooksHistory
  2. Find the failed delivery
  3. Click Retry
  4. A new delivery attempt will be created and sent immediately

Exporting Delivery History

For compliance or debugging, export webhook delivery history:
  1. Navigate to IntegrationsWebhooksHistory
  2. Apply filters (date range, event type, status, webhook)
  3. Click Export to download CSV
  4. Use the export for:
    • Compliance audits
    • Performance analysis
    • Debugging patterns
    • Issue resolution tracking

Testing Tips

  1. Use webhook.site or RequestBin to inspect payloads
  2. Test with low-volume projects first
  3. Monitor delivery success rate for the first few days
  4. Set up alerting for webhook failures in your own system
  • Webhook URL is correct and accessible
  • Endpoint returns 2xx status code within 10 seconds
  • Firewall allows Corgea’s requests
  • Event subscriptions are selected
  • Filters are configured correctly (or removed for testing)
  • Signature verification works (if using secret)
  • Webhook is active (not paused)

Payload Examples

issue-status-changed.json

FAQ

Yes! Your endpoint will receive an X-Corgea-Event header and event_type field to identify the event.
There’s no hard limit, but we recommend organizing by purpose (e.g., one per team or tool).
Corgea will retry 3 times with exponential backoff. After 10 consecutive failures, the webhook auto-pauses.
Yes! Use the “Test Webhook” button to send a sample payload without waiting for real events. For Slack Workflow Builder, the sample is flat and includes a non-empty message plus triage keys (pull_request_id, scan_url, true_positive_count, company). company_id is also included (same value) for older Test consumers.
Yes. Under Scan Event Filters, enable Only pull request / merge request scans and Only completed scans with true-positive findings. Subscribe to scan.failed and scan.completed. The findings filter does not apply to scan.failed.
Yes! Corgea auto-generates a secret key for HMAC signature verification (X-Corgea-Signature). You can also add custom headers for destination-specific auth tokens.
Not directly, but you can filter by project. You can also filter on the received payload in your endpoint.
Payloads are sent over HTTPS (TLS), providing encryption in transit. Use HMAC signatures for verification.
Delivery logs are retained for compliance and debugging. Check with your plan for specific retention periods.
Yes! Go to the webhook delivery history and click “Retry” on any failed delivery.
Contact support for the current list of IP addresses to whitelist in your firewall.

Questions or issues? Contact Corgea Support