Interview Prep/DevSecOps/Cloud Security Posture

When should cloud misconfigurations be auto-remediated, and when only alerted?

AdvancedProductionCloud Security Posture
Answer

Auto-remediate when the fix is safe, reversible and the misconfiguration is always wrong: public S3 bucket without an approved tag, security group with 0.0.0.0/0 on port 22, disabled CloudTrail, unencrypted new EBS default setting.

Alert only when the fix could cause an outage or the context matters: IAM permission changes, deleting resources, changing production network routes.

Rules for safe auto-remediation:

  • Tag-based exceptions that are approved and expire.
  • Notify the owner with what changed and why.
  • Run it in dry-run (alert) mode for a few weeks first.
  • Prefer prevention (SCPs, Terraform policies) over remediation; remediation means the bad state already existed for some minutes.
All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Cloud Security Posture