How do you automate containment for high-confidence cloud findings?
AdvancedProductionCompliance as Code, Threat Modeling & Incident Response
Answer
EventBridge rule on specific GuardDuty finding types triggers a Step Functions or Lambda workflow.
{"source": ["aws.guardduty"],
"detail-type": ["GuardDuty Finding"],
"detail": {"type": ["UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS",
"CryptoCurrency:EC2/BitcoinTool.B!DNS"]}}
The workflow: tag the resource, move the instance to a quarantine security group, snapshot volumes, revoke role sessions (deny policy with aws:TokenIssueTime condition), open an incident ticket and page on-call.
Only automate for high-confidence finding types and reversible actions. Everything else gets enrichment and a human decision.
More on Compliance as Code, Threat Modeling & Incident Response
How do you implement compliance as code across the delivery pipeline?IntermediateHow do you automate audit evidence collection?BeginnerHow do you make threat modelling routine for product teams?IntermediateWhat does "threat model as code" mean, and is it worth it?AdvancedHow do you serve SOC 2, ISO 27001 and PCI DSS with one control set?IntermediateShow a conftest policy that checks a Terraform plan for unencrypted S3 buckets.Advanced