Automation · Security Automation
Configuration Compliance
Cheat sheet · https://pcornel.dk/topic.php?topic=5763
Answer
Configuration compliance automation scans systems against security baselines on a schedule and reports or fixes deviations, such as weak TLS settings or disabled logging.
Remember
- Scan configurations against baselines on a schedule.
- Report or fix deviations.
- Track trends.
First checks
oscap xccdf eval --profile <p> --report r.html <ds.xml>— scanansible-playbook harden.yml --check— drift- Auto-remediation for low-risk findings — fix
Commands
git diff --exit-code <baseline-ref> -- <managed-path>- Read-only/validation observation for the exact managed-path delta relative to an approved Git baseline reference.
Verify in this order
baseline → scan → report → remediate
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5763