Push code to Git at regular intervals
Continuously push your Kestra flows and namespace files to a Git repository on a schedule for GitOps version control.
Monitor Cloudflare edge rate-limiting and API abuse spikes with Kestra. Query GraphQL analytics, track GitHub issues, and notify SecOps on Slack.
Modern web APIs and SaaS applications rely on Cloudflare Rate Limiting rules to protect origin servers from DDoS flood attacks, brute-force credential stuffing, and unauthorized data scraping. When client traffic triggers rate-limiting rules, Cloudflare serves HTTP 429 Too Many Requests responses at the edge. A sudden surge in 429 status codes indicates either an active adversarial attack or a misconfigured enterprise partner client experiencing broken retry backoff loops. This blueprint queries Cloudflare's GraphQL analytics API hourly, flags anomalous surges in HTTP 429 responses, opens an automated GitHub SecOps investigation ticket, and alerts security teams via Slack.
check_rate_limits_hourly (io.kestra.plugin.core.trigger.Schedule) initiates the audit every hour (shipped disabled for safe verification).probe_rate_limit_events (io.kestra.plugin.scripts.python.Script) interrogates Cloudflare's GraphQL Analytics API for httpRequestsAdaptiveGroups filtered by edgeResponseStatus: 429 over the previous hour.branch_on_rate_limit_surge (io.kestra.plugin.core.flow.If) evaluates whether 429 counts exceeded the operator-defined threshold (is_abuse_surge == true):then: Automatically files a GitHub tracking issue via create_abuse_incident_issue (io.kestra.plugin.github.issues.Create) and alerts the SecOps Slack channel via alert_secops_slack (io.kestra.plugin.slack.notifications.SlackIncomingWebhook).else: Emits an informational log entry (log_traffic_normal) confirming normal baseline traffic.log_audit_complete (io.kestra.plugin.core.log.Log) records the final audit outcome.errors block alerts Slack if Cloudflare API tokens expire or queries fail.Kestra coordinates GraphQL querying, JSON metric transformation, conditional escalation, and chat alerting in a single declarative workflow. It injects API tokens securely, provides complete execution history, and eliminates the need for separate standalone monitoring daemons.
Zone.Analytics:Read permissions.CLOUDFLARE_API_TOKEN: Authentication token for Cloudflare GraphQL API.GITHUB_TOKEN: GitHub token used to open incident issues.SLACK_WEBHOOK: Incoming Webhook URL for security alerts.zone_id (STRING, default 023e105f4ecef8ad9ca31a8372d0c353): Target Cloudflare Zone identifier.rate_limit_threshold (INT, default 500): Maximum tolerated 429 responses per hour before alerting.target_repository (STRING, default my-org/cloudflare-security-operations): Target GitHub repository for logging incident issues.outputs.probe_rate_limit_events.vars.zone_id: Audited Cloudflare Zone ID.outputs.probe_rate_limit_events.vars.total_429_count: Aggregated count of rate-limited requests over the last hour.outputs.probe_rate_limit_events.vars.is_abuse_surge: Boolean indicating whether count exceeded threshold.CLOUDFLARE_API_TOKEN, GITHUB_TOKEN, and SLACK_WEBHOOK in your Kestra namespace.zone_id to match an active Cloudflare Zone.check_rate_limits_hourly trigger for continuous rate-limit monitoring.io.kestra.plugin.core.flow.Loop.