Email Digests
Users in Hourly digest or Daily digest mode receive one email per period with the new CVEs not yet notified to them, sorted by priority, with the number of hosts, a link to the filtered queue and a summary of new, resolved and SLA-breached findings.
When It Is Sent
Two Celery beat entries run the task send_digests: send-hourly-digests every hour at minute 5 (mode hourly_digest) and send-daily-digests every day at 06:05 (mode daily_digest). Times are UTC. Each run covers the period ending at the start of the current hour (for example the 06:05 run covers the period ending at 06:00 UTC).
Who Receives It
Active users with an email address whose notification preferences (/docs/notifications/preferences) have email notifications on and the frequency of the task: Hourly digest for the hourly task, Daily digest for the daily task. Users in Immediate mode receive the CVE email alerts (/docs/notifications/cve-emails) instead.
Window
Each user has their own window, ending at the end of the period. It starts at the end of the last digest sent to the user (hourly or daily); a digest that failed or had nothing to send does not move it, so the next period picks up the CVEs it missed. Without any previous digest the window is one period (1 hour or 24 hours); if only failed digests exist, it starts where the earliest of them started. The window never starts more than 7 days before the end of the period.
Which CVEs
A CVE is listed when at least one of its CVE findings is active, open and was created in the window, and those new findings qualify with the same rules as the CVE email alerts:
- at least one new finding is in the user's scope (environments and teams), and
- the finding.created event is selected and an in-scope finding is at or above the minimum severity, or the CVE is in the CISA KEV catalog with Always notify KEV and the finding.kev event selected
- a CVE already notified to the user (a CVE email alert or an earlier digest) is never listed again
Content and Order
The email is in HTML with a plain-text alternative, inline CSS only, light and dark theme. For each CVE it shows the id, the severity, the priority band and score, the number of hosts (distinct hosts with an active open finding of the CVE in the user's scope, old findings included) and a link to /dashboard/security?cve=<id>&status=open. The CVEs are sorted by priority score (highest first, CVEs without a score last), then band (P1 first), severity (highest first) and id. At most 50 CVEs are listed; the rest are summarized as "and N more CVEs" with an "Open the queue" link to /dashboard/security?status=open, where every open finding is shown (the CVEs not listed are still counted as notified).
Summary
Above the list, a summary of the window counted on the CVE findings in the user's scope:
- New CVEs: the number of CVEs in the digest
- Resolved: findings resolved in the window
- SLA breached: active open or acknowledged findings whose due date fell in the window, with a link to /dashboard/security?sla=overdue; shown only when the finding.sla_breached event is selected
Note: No CVE to notify means no email at all, even when findings were resolved or breached their SLA in the window. The burst summary of the CVE email alerts (/docs/notifications/cve-emails) uses the same layout, without the Resolved and SLA breached counts.
Known Exploited Vulnerabilities
Users in digest mode do not wait for the digest for a known exploited vulnerability: when the CVE is in the CISA KEV catalog, Always notify KEV is on and the finding.kev event is selected, the CVE email alert is sent at once at the end of the matcher run, as for Immediate users (failed alerts are retried the same way). The CVE is then excluded from the next digest. With Always notify KEV off, the CVE waits for the digest and is listed only if it is at or above the minimum severity.
Idempotency and Retries
Each digest is delivered with the event key digest:<mode>:<end of the period> on the email channel: a repeated beat for the same period sends nothing. After a digest is sent, every CVE it lists gets a cve:<id> row in NotificationLog, the same key as the CVE email alerts, so a CVE appears in at most one email per user, alert or digest, even when the user changes frequency. A failed digest (SMTP error) is recorded as failed and its CVEs are included in the digest of the next period.
Note: A manual run outside the schedule sends a digest for the period ending at the current hour and moves the user's window: the next scheduled digest then covers a shorter period (no CVE is repeated). The task returns and logs a summary {users, sent, skipped, failed, empty} (empty: users with nothing to notify). If the worker dies after the SMTP send and before recording the CVEs, they can appear again in the next digest.
docker exec idp-backend python manage.py shell -c \
"from apps.notifications.tasks import send_digests; print(send_digests(mode='daily_digest'))"