Interview Prep/DevSecOps/DAST, runtime detection and compliance scans

Security Hub still shows `[CloudTrail.1]` as FAILED although you created a trail yesterday

IntermediateTroubleshootingDAST, runtime detection and compliance scans
Answer

Likely causes → The control needs at least one multi-Region trail that logs read and write management events. A single-region trail, or one logging only write events, does not pass. The control may also be evaluated in an account the trail does not cover.

Diagnose →

aws cloudtrail describe-trails --query 'trailList[].{n:Name,multi:IsMultiRegionTrail,org:IsOrganizationTrail}'
aws cloudtrail get-event-selectors --trail-name main

Fix → aws cloudtrail update-trail --name main --is-multi-region-trail, and set management events to ReadWriteType: All. Better, create an organization trail from the management account.

Prevent → Deploy trails and Config through account-vending baselines (Control Tower or Terraform), not by hand.

All DevSecOps questions Roadmap: Policy as code

More on DAST, runtime detection and compliance scans