New to Kestra?
Use blueprints to kickstart your first workflows.
SSH into a Linux host, compare /etc/issue ownership and permissions against a KV-stored baseline, and auto-remediate CIS control 1.6.5 with Kestra.
Implement CIS Ubuntu control 1.6.5 (ensure access to /etc/issue is configured) as a reusable, callable compliance flow. It reads the expected stat output from the Kestra KV store, SSHes into the target host to capture the live state, and either reports compliance or fixes ownership and permissions in place. Pair it with its sibling control flows and a scan orchestrator to run whole benchmark sections per host.
getConfiguration task (io.kestra.plugin.core.kv.Get) loads the expected stat -Lc output for /etc/issue from the KV store, keyed by the flow id so each control owns its baseline.assessControl task (io.kestra.plugin.fs.ssh.Command) connects with authMethod: PUBLIC_KEY and captures the live ownership/permission string, surfacing it as a task output via the ::{"outputs":...}:: convention.checkStatus task (io.kestra.plugin.core.flow.If) compares the observed value with the baseline and returns Compliant on a match.doRemediate If checks the remediateControls toggle; when enabled, remediateControl runs sudo chown root:root and sudo chmod u-x,go-wx on the file (following symlinks with readlink -e), otherwise the flow returns Not Compliant.complianceStatus output coalesces whichever branch executed into a single verdict string for parent flows.complianceStatus output that aggregates cleanly in fan-out scans.A shell script can check a file's permissions; it cannot give you per-host execution history, a toggle between audit and enforce modes visible in the UI, secrets kept out of the script body, or composition into a larger scan where any single control can be retried in isolation. Modeling each control as a flow turns a hardening checklist into an operable, observable system.
sudo chown/chmod.stat output string.SSH_VM_USER: SSH username for the target host.SSH_PRIVATE_KEY: private key used for public key authentication.stat string in the KV store under the key cis-control-etc-issue-permissions.ipAddress and remediateControls: false for a dry audit.io.kestra.plugin.core.flow.Subflow.io.kestra.plugin.core.trigger.Flow trigger.