Clear Pulsar backlogs held by subscriptions nobody consumes
Detect Apache Pulsar subscriptions with no consumers that still pin a large backlog, then clear or remove them behind a dry run, an approval pause and a live re-read that fails the run.
Audit Amazon GuardDuty for active high-severity findings and alert Slack with the exact threat details, title, and severity.
GuardDuty continuously analyzes VPC Flow Logs, DNS logs, and CloudTrail events for threats, but it has no built-in way to say "notify this Slack channel the moment a HIGH-severity finding appears" without wiring an EventBridge rule and a notification target per account - a separate configuration surface from the flow that actually needs to react. This blueprint queries GuardDuty's own finding list, filtered server-side, fetches the full detail for anything found, and alerts Slack with the exact title, type, and severity.
periodic_finding_check (io.kestra.plugin.core.trigger.Schedule) runs every 30 minutes, explicitly passing aws_region, detector_id, and min_severity through its own inputs: block so the flow is self-contained when the trigger fires. Shipped disabled so a manual run can be verified first.probe_high_severity_findings (io.kestra.plugin.aws.cli.AwsCLI) runs aws guardduty list-findings with a finding-criteria JSON filter for severity >= min_severity and service.archived == false, capturing the result's FindingIds list as a named task output.evaluate_findings_presence (io.kestra.plugin.core.flow.If) branches on whether that list has any entries at all.then (ACTIVE_FINDINGS_DETECTED): get_finding_details fetches the full Findings objects for those IDs, then alert_active_findings reports each finding's severity, title, and type to Slack.else (HEALTHY): log_no_active_findings records a clean sweep.log_audit_complete always runs last, printing the active finding count regardless of which branch fired.errors block alerts Slack separately if the flow itself fails outright - an invalid detector ID or bad credentials must not read as HEALTHY.list-findings for the cheap existence check, get-findings only when something is actually found) so a routine HEALTHY check never pays for the full detail fetch.io.kestra.plugin.aws.cli.AwsCLI chaining two read-only GuardDuty CLI calls, reusing the same corrected output-capture convention (newlines only, not spaces, stripped before the marker) as this repository's CloudFormation, AWS Config, and AWS Backup sentinel blueprints.AwsCLI chaining a filtered list call into a conditional detail fetch, with an open GitHub issue (kestra-io/plugin-aws#796) confirming there is no dedicated GuardDuty task in the plugin to date.GuardDuty itself has no cross-account "notify me the moment a HIGH-severity finding appears" primitive beyond what you wire up separately in EventBridge and SNS, configuration that then has to be kept in sync as detectors are added or removed. Kestra supplies the schedule, the HEALTHY/ACTIVE_FINDINGS_DETECTED classification as a first-class branch, and an execution history that shows exactly when a threat was detected and what GuardDuty's own analysis said about it.
aws_region, detector_id - obtain the detector ID via aws guardduty list-detectors).guardduty:ListFindings and guardduty:GetFindings permission - entirely read-only, cannot modify, archive, or suppress any finding.This blueprint has no local, account-free testing path. GuardDuty is not available in LocalStack Community at all (Pro tier only, per LocalStack's own documentation), and LocalStack now additionally requires its own account and auth token as of March 2026 regardless. A real AWS account with GuardDuty enabled is the only way to exercise this blueprint meaningfully - note that GuardDuty also takes time after enabling to generate its first findings from real traffic.
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY: credentials for io.kestra.plugin.aws.cli.AwsCLI.SLACK_WEBHOOK_URL: Slack incoming webhook used by alert_active_findings and the errors block.SECRET_, base64-encoded - for example SECRET_AWS_SECRET_ACCESS_KEY=$(echo -n '<your-secret-key>' | base64) - and read back in flows with {{ secret('NAME') }}.aws_region (STRING, default us-east-1): region whose GuardDuty detector is audited.detector_id (STRING, default <your-guardduty-detector-id>, must be replaced): detector to query.min_severity (INT, default 7): severity floor for the server-side filter, matching GuardDuty's own HIGH band.outputs.probe_high_severity_findings.vars.FindingIds: the list of matching finding IDs (verified field from GuardDuty's own ListFindings API reference).outputs.get_finding_details.vars.Findings: the full finding objects, only populated on the alert branch, each with Id, Title, Type, Severity, AccountId, Description, CreatedAt, UpdatedAt (verified fields from GuardDuty's own GetFindings API reference).aws guardduty list-detectors.AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and SLACK_WEBHOOK_URL secrets.log_no_active_findings fires.aws guardduty create-sample-findings) to generate test findings, then re-run to confirm alert_active_findings fires with the real finding titles and types.periodic_finding_check once you trust the check against your real detector.detector_id / aws_region combinations with io.kestra.plugin.core.flow.Loop to audit every region where GuardDuty is enabled in one run.aws guardduty archive-findings) once a human has reviewed and dismissed it as a false positive, behind an explicit approval gate - deliberately kept out of this sentinel so the monitoring path never changes any finding's state.FindingIds into groups of 50 before calling get-findings if min_severity is lowered enough that more than 50 active findings are realistic - see Pitfalls.get-findings accepts at most 50 finding IDs per call, per GuardDuty's own API reference - if probe_high_severity_findings returns more than 50 matching IDs, get_finding_details fails outright rather than silently truncating, surfacing through the errors block.min_severity too far can produce a high-volume, noisy alert. GuardDuty's MEDIUM band starts at 4.0; auditing that low will catch far more routine findings than the HIGH-only default.tr -d '\n' | xargs -0 -I {} echo '::{"outputs":{}}::') deliberately does not strip spaces, the same corrected pattern used in this repository's CloudFormation, AWS Config, and AWS Backup sentinel blueprints, since Title and Description are human-readable sentences that stripping spaces would corrupt.list-findings / get-findings CLI syntax, the finding-criteria JSON structure, and the FindingIds / Findings / Severity / Title / Type output fields are taken verbatim from AWS's own CLI reference documentation - but no Kestra engine was run to execute this flow end to end.