See llms.txt for all machine-readable content.

Back to Templates

Triage GitHub Dependabot and secret scanning alerts with email digests

Quick overview

Get one email a week ranking your open GitHub Dependabot and secret scanning alerts by what to fix first, plus a same-day email when an exposed secret or critical alert appears. Reads alert metadata only, with a read-only token, and sends through your SMTP server.

How it works

  1. Runs every morning at 07:00 (or on manual execution for a test run).
  2. Builds GitHub REST API requests for each configured repository (or the whole organization) to retrieve open Dependabot alerts and, optionally, open secret scanning alerts.
  3. Fetches all pages of alerts from GitHub and records any repositories that fail to respond or have security features disabled.
  4. 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.
  5. 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.
  6. Saves the latest seen state only after the email step completes so missed sends are retried on the next run.
  7. If the workflow execution fails, sends a separate failure email via an error trigger.

Setup

  1. Create a fine-grained GitHub token limited to the repositories you watch, read-only: Dependabot alerts, Secret scanning alerts and Metadata (for an organization, the organization must own the token). A classic token (repo, security_events) also works but grants far broader access. Add it as a GitHub API credential in the alert-fetching step.
  2. 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.
  3. 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).
  4. In the workflow settings, set this workflow as the Error workflow so failed executions trigger the failure email.
  5. Run the workflow manually once to generate a baseline digest, then activate it for daily scheduled checks.

Requirements

  • A read-only GitHub token (fine-grained recommended) and SMTP credentials; no other services
  • Dependabot alerts (and, optionally, secret scanning) enabled on the repositories

Additional info

Example digest (shortened, synthetic):
Subject: GitHub security digest: 1 critical, 2 high, 1 exposed secret(s)
Exposed secrets (revoke or rotate first): Stripe API Key in octo-org/api, config/dev.env, still valid, open 2 days
Fix first: critical lodash (npm) in octo-org/website, runtime, direct, fixed in 4.17.21, EPSS 12%, fix within 4 days
By repository: ! octo-org/api: 1 high, 1 exposed secret | ! octo-org/website: 1 critical, 1 high, 2 medium

Data flow: the workflow reads alert metadata from GitHub's REST API with your token (never the secret values), keeps a summary in this workflow's static data, and sends the email through your SMTP server. Nothing else leaves your n8n.

Questions or a security report: [email protected]