Interview Prep/CI/CD/Secrets, Supply Chain and DORA

A developer committed an AWS key to a public repo. Walk through your response.

BeginnerScenarioSecrets, Supply Chain and DORA
Answer

Situation read → Active compromise until proven otherwise.

What I'd do →

  1. Deactivate and rotate the key at once: aws iam update-access-key --access-key-id AKIA... --status Inactive --user-name ci-user.
  2. Review CloudTrail for use of that key and revoke sessions.
  3. Remove it from Git (git filter-repo) after rotation, and enable push protection and gitleaks in CI.
  4. Document and fix the root cause with OIDC or a vault.

Why → Bots scrape public commits within minutes.

Interview tip → Rotation comes first, cleanup second.

All CI/CD questions

More on Secrets, Supply Chain and DORA