Skip to content

feat(system): daily security summary email template#6

Merged
pigri merged 1 commit into
mainfrom
feat/daily-stats-email
Jun 9, 2026
Merged

feat(system): daily security summary email template#6
pigri merged 1 commit into
mainfrom
feat/daily-stats-email

Conversation

@pigri

@pigri pigri commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

New system workflow template: daily-stats-email — emails each workspace a daily summary of blocked traffic.

  • Trigger: event on the daily_stats Kafka topic (produced by the ax_prod pg_cron job daily_block_stats() via pg_net → Strimzi Kafka Bridge), scope: workspace.
  • Steps: data.template (renders the stats — totals + day-over-day, by-action, top rules/countries/ASNs, unique IPs — into an HTML body) → resend.email (branded card).
  • Recipients: ${variables.email_recipients} — set per tenant at install (identity/email isn't in the platform DB).

Requirements

  • workflow-service ≥ the build that adds the data.template node (pigri/arxignis#735, deployed).
  • The daily_stats topic + daily_block_stats() function (shipped in pigri/arxignis#735).
  • Per-tenant install must set the email_recipients variable.

Notes

  • The template's HTML is rendered with data.template in html mode, so traffic-derived fields (rule names, etc.) are auto-escaped — verified against a malicious <b> rule name.
  • Numbers use {{printf "%.0f" .n}} to render counts as integers.

@pigri pigri force-pushed the feat/daily-stats-email branch from f195c71 to c638c8e Compare June 9, 2026 21:14
@pigri pigri merged commit 6e34b2a into main Jun 9, 2026
2 checks passed
@pigri pigri deleted the feat/daily-stats-email branch June 9, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant