An auditor asks you to prove that no one deployed to prod without approval last quarter. How?
IntermediateScenarioSecrets, OIDC & Environments
Answer
Situation read → Evidence from GitHub and the cloud.
What I'd do →
- Export deployments for the prod environment via API (
/repos/{o}/{r}/deployments?environment=prod) and their reviews (/actions/runs/{id}/approvals). - Export audit log events for environment rule changes and bypasses.
- Correlate with CloudTrail
AssumeRoleWithWebIdentityevents for the prod role (session name contains run ID) to show every prod session matches an approved run.
Why → Two independent sources make the evidence credible.
Interview tip → Mention setting role-session-name with the run ID to make this correlation possible.
More on Secrets, OIDC & Environments
You find AWS access keys stored as repo secrets in 25 repos. Plan the migration.IntermediateA developer asks to print a secret in the log "just once" to debug. What do you do instead?BeginnerStaging and prod need different database URLs and different AWS roles, using one workflow. How?BeginnerSecurity requires two people for prod deploys: the author cannot approve. Configure it.BeginnerWrite the AWS trust policy for a role used only by the prod deploy job of one repo.IntermediatePR workflows need read-only AWS access for `terraform plan`, including from same-repo branches. How do you set trust?Advanced