New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate CIS benchmark controls as parallel Kestra subflows, log per-control verdicts, and trigger scans via webhook or after VM provisioning.
Run a CIS benchmark section as a governed scan. This orchestrator fans out individual control flows (each an assess/remediate unit) against a target host, collects their complianceStatus outputs, and logs a verdict per control. It ships with two optional triggers: a webhook for on-demand scans from an ITSM tool, and a Flow trigger that scans every VM automatically the moment a provisioning flow finishes, closing the gap between "machine exists" and "machine is hardened".
section_1_6 task (io.kestra.plugin.core.flow.Parallel with concurrent: 1) hosts one Sequential branch per control. Branches are modeled in a Parallel container deliberately: any single control can be retriggered from the UI without rerunning its siblings.io.kestra.plugin.core.flow.Subflow with wait: true and transmitFailed: true: run_control_1_6_4 invokes cis-control-motd-permissions and run_control_1_6_5 invokes cis-control-etc-issue-permissions.{{ trigger.body.ipAddress ?? inputs.ipAddress }}, so the same flow serves webhook-driven and manual scans.io.kestra.plugin.core.log.Log task records the returned complianceStatus verdict.scanRequestWebhook trigger (io.kestra.plugin.core.trigger.Webhook) and the postVMCreation trigger (io.kestra.plugin.core.trigger.Flow with a preconditions block on the provisioning flow's SUCCESS state) are included disabled; enable whichever entry point you need.remediateControls toggle propagated to every control (audit vs enforce).Benchmark scripts are all-or-nothing: one failing check means rerunning the whole run, and results live in a log file. Kestra decomposes the benchmark into subflows with real dependency semantics, parallel fan-out, per-branch retries, and typed outputs you can aggregate. The Flow trigger with preconditions turns compliance from a scheduled afterthought into an automatic step of the provisioning lifecycle.
cis-control-motd-permissions and cis-control-etc-issue-permissions (adjust flowId values if you rename them).SSH_VM_USER and SSH_PRIVATE_KEY secrets).CIS_SCAN_WEBHOOK_KEY: shared key guarding the webhook trigger (only needed if you enable it).ipAddress and remediateControls: false for an audit pass.postVMCreation trigger and point its flowId at your provisioning flow to scan new VMs automatically.Subflow call.io.kestra.plugin.notifications.slack.SlackIncomingWebhook.io.kestra.plugin.core.flow.ForEach for fleet-wide scans.