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

GuardDuty raises `UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS` for an EKS node role

AdvancedTroubleshootingDAST, runtime detection and compliance scans
Answer

Likely causes → Temporary credentials from that node's instance profile are being used from an IP outside AWS. Something on the node, often a compromised pod reaching IMDS, stole them.

Diagnose →

aws guardduty get-findings --detector-id <id> --finding-ids <fid> | jq '.Findings[].Service.Action'
aws cloudtrail lookup-events --lookup-attributes AttributeKey=AccessKeyId,AttributeValue=<ASIA...>

Fix → Revoke active sessions for the role ("Revoke active sessions" adds an aws:TokenIssueTime deny). Isolate the node (cordon, quarantine security group) and keep it for forensics. Find the pod that reached IMDS, and review everything the stolen credentials did.

Prevent → IMDSv2 with hop limit 1, minimal node roles, IRSA or Pod Identity for workloads, and GuardDuty EKS protection with runtime monitoring enabled.

All DevSecOps questions Roadmap: Policy as code

More on DAST, runtime detection and compliance scans