AWS attaches quarantine policy within 10 seconds of public IAM key exposure, denying risky actions
AWS automatically attaches the AWSCompromisedKeyQuarantine managed policy within seconds of detecting a publicly exposed IAM access key, limiting attacker actions
Security & privacy Unit 42 21 Sep 2026 Measurement Real-world evidence
Published as “From Exposure to Lockdown: How AWS Neutralizes Compromised IAM Credentials through Managed Policies”
Why it matters
Security teams can monitor AttachUserPolicy events and GitHub secret-scanning user agents to detect exposed IAM keys quickly and trigger response workflows.
Summary
The authors created a test IAM user, exposed its access key in a public GitHub repo, and observed AWS’s response. Within 10 seconds of the exposure AWS attached the AWSCompromisedKeyQuarantineV3 managed policy, generated a CloudTrail AttachUserPolicy event, and sent notifications via GitHub, AWS Health, and Support. They also documented the policy’s evolution across versions and showed how the AttachUserPolicy event can be used for detection. Evidence comes from a single controlled exposure test with CloudTrail logs and email captures.
What they found 1
- AWS attached the quarantine policy within 10 seconds of exposure
“During the test scenario, AWS attached the AWSCompromisedKeyQuarantineV3 managed policy within 10 seconds of the access key exposure.”
Caveats 5
- The policy only denies specific actions, allowing advanced threat actors to use any actions not explicitly denied.
- AWS Health alerts and Support case creation did not generate CloudTrail events, limiting visibility.
- Push protection may miss secrets in large pushes or when more than five secrets are present.
- AWS Health alert and Support case creation did not appear in CloudTrail logs.
- The quarantine policy does not deny all actions, so attackers can still use allowed permissions.
What’s new here 4
- Measured the end-to-end response time of AWS’s automated quarantine (10 seconds).
- Mapped the exact CloudTrail event (AttachUserPolicy) generated by the quarantine attachment.
- Detailed the permission changes across five versions of the AWSCompromisedKeyQuarantine policy.
- Described how GitHub secret-scanning alerts and user-agent strings can be leveraged for detection.