Quick overview
This workflow runs daily to fetch open Dependabot and secret scanning alerts from GitHub repositories (or an organization), triages them into urgent notifications or a weekly digest, and sends the results by email while tracking state across runs to detect new, changed, and closed alerts.
How it works
- Runs every morning at 07:00 (or on manual execution for a test run).
- Builds GitHub REST API requests for each configured repository (or the whole organization) to retrieve open Dependabot alerts and, optionally, open secret scanning alerts.
- Fetches all pages of alerts from GitHub and records any repositories that fail to respond or have security features disabled.
- Scores and prioritizes alerts using severity-based fix windows (SLA), reachability, fix availability, dependency scope, malware classification, and EPSS, then compares results with previously saved state to identify new, escalated, overdue, and closed items.
- Sends an immediate email for urgent findings or sends a full digest on the configured weekday (and on the first scheduled run or any manual test run), otherwise sends nothing.
- Saves the latest seen state only after the email step completes so missed sends are retried on the next run.
- If the workflow execution fails, sends a separate failure email via an error trigger.
Setup
- Create and add a GitHub API credential with permission to read Dependabot alerts, secret scanning alerts, and repository metadata (classic token:
repo and security_events; fine-grained token: read-only security permissions on the target repos).
- Update the repository list (owner/name) or set an organization plus triage rules (SLA days, urgent severity/EPSS threshold, digest weekday, include development dependencies, and optional GitHub API base URL) in the workflow’s configuration step.
- Add an SMTP email credential to the urgent, digest, and failure email steps, and set the from/to addresses (including hardcoded addresses in the failure email step).
- In the workflow settings, set this workflow as the Error workflow so failed executions trigger the failure email.
- Run the workflow manually once to generate a baseline digest, then activate it for daily scheduled checks.