Schedule icon
Request icon
Return icon
Switch icon
Log icon
SlackIncomingWebhook icon
OutputValues icon

OWASP DefectDojo Vulnerability SLA Escalation Sentinel

Audit OWASP DefectDojo vulnerability SLAs, monitor active critical and high CVE findings, classify compliance posture, and route Slack alerts via Kestra.

Categories
Infrastructure

Continuously audits OWASP DefectDojo vulnerability management platforms by querying REST API v2 endpoints, validating active verified findings against SLA resolution deadlines, classifying organizational posture, and routing escalation alerts to Slack.

How it works

  1. probe_products queries /api/v2/products/ using an API token to verify DefectDojo service health and active product tracking.
  2. probe_critical_findings queries /api/v2/findings/ filtered for active=true, verified=true, is_mitigated=false, and severity=Critical.
  3. probe_high_findings queries /api/v2/findings/ with identical filters for severity=High.
  4. classify_sla_status evaluates finding counts against configurable SLA thresholds using a Pebble conditional expression:
    • Classifies state as CRITICAL_SLA_BREACH when active Critical findings exceed max_tolerated_critical_findings.
    • Classifies state as HIGH_SEVERITY_WARNING when High findings exceed max_tolerated_high_findings.
    • Classifies state as COMPLIANT when all findings remain within allowable limits.
    • Identifies unreachable endpoints as API_UNREACHABLE or PROBE_FAILED.
  5. route_by_sla_status branches workflow execution based on the classification:
    • COMPLIANT: Logs compliant posture, tracked product counts, and current finding metrics.
    • HIGH_SEVERITY_WARNING: Dispatches a Slack alert with finding IDs, titles, and CVE identifiers exceeding the high-severity threshold.
    • CRITICAL_SLA_BREACH: Posts an urgent escalation alert to Slack naming exact Critical finding titles and CVEs requiring immediate patching.
    • API_UNREACHABLE / PROBE_FAILED: Notifies on-call teams of API communication failures.
  6. log_audit_summary exports structured metrics capturing SLA classifications and finding counts for compliance verification.
  7. errors catches unhandled exceptions and posts a high-priority incident notice to Slack.

What you get

  • Automated, scheduled auditing of application security vulnerability backlogs without manual dashboard reviews.
  • Immediate escalation of overdue Critical and High CVEs before regulatory or SLA deadlines are breached.
  • Contextual Slack alerts containing exact finding IDs, vulnerability titles, and associated CVE numbers.
  • Centralized audit records tracking compliance metrics over time for SOC2, ISO27001, and FedRAMP audits.
  • Automated weekday scheduling with full support for on-demand CI/CD pipeline triggers.

Who it's for

  • DevSecOps Engineers and Security Champions tracking remediation velocity across development teams.
  • Security Operations (SecOps) teams enforcing vulnerability management SLAs and policy gates.
  • Platform and Engineering Leads requiring automated visibility into open security liabilities.

Why orchestrate this with Kestra

Vulnerability backlogs in tools like DefectDojo grow continuously from daily automated scanner runs. Without active orchestration, critical findings slip past SLA deadlines unnoticed until an audit or incident occurs. Kestra provides declarative, reliable orchestration with unified secret management, robust HTTP probing, automated scheduling, and multi-channel incident alerting.

Prerequisites

  • A running OWASP DefectDojo instance with REST API v2 accessible from the Kestra worker.
  • A DefectDojo API key generated under User Profile > API v2 Key.
  • An incoming Slack webhook URL for alert delivery.

Secrets

  • DEFECTDOJO_API_KEY: DefectDojo user API token used for HTTP Token authentication.
  • SLACK_WEBHOOK: Incoming Slack webhook URL used by alert_high_warning_slack, alert_critical_breach_slack, alert_probe_failed_slack, alert_unreachable_slack, and the errors handler.

Quick start

  1. Generate an API v2 key in DefectDojo and add DEFECTDOJO_API_KEY and SLACK_WEBHOOK as secrets in your Kestra namespace.
  2. Start a local DefectDojo instance using Docker Compose:
    git clone https://github.com/DefectDojo/django-DefectDojo && cd django-DefectDojo
    ./dc-build.sh && ./dc-up.sh
    
  3. Execute this flow manually in Kestra setting defectdojo_host: "localhost" or "defectdojo".
  4. The workflow queries finding counts, evaluates thresholds, classifies COMPLIANT, and logs audit metrics.
  5. Enable the every_morning_weekday trigger to automate daily morning SLA monitoring.

How to extend

  • Filter findings by specific product tags or engagement IDs using additional query parameters like tags=production.
  • Automatically create Jira or GitHub issues for overdue findings using dedicated Kestra issue tracker plugins.
  • Integrate with PagerDuty for Critical SLA breaches requiring immediate on-call pageouts.
  • Add automated test re-import tasks to trigger fresh scanner ingestion prior to running the SLA evaluation.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.