Interview Prep/DevSecOps/Compliance as Code, Threat Modeling & Incident Response

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.

All DevSecOps questions Roadmap: Policy as code

More on Compliance as Code, Threat Modeling & Incident Response