Sample question 1 — SDLC Automation
A software company's build service currently holds permissions that let it push container images straight into production, and a compromised build job could therefore deploy malicious code without any deploy-stage review. The security team wants the build identity itself to lose that power while deployments still run. Which IAM design should be adopted?
- A. Give the build job a role that cannot deploy and let CodePipeline assume the deploy role.
- B. Store the deployment credentials in the build project's environment variables.
- C. Add a second reviewer to the pull request that changes the deployment manifest.
- D. Restrict the build role to a single Region so it cannot reach production.
Answer: A. Option A is correct because splitting the build job's role from the deployment role and letting CodePipeline assume the deploy role means a compromised build can never push code to production on its own. Placing deployment credentials in the build project's environment variables, option B, hands that power back to the build identity. A second reviewer on the manifest pull request, option C, adds a human check but leaves the build role able to deploy. Limiting the build role to one Region, option D, still permits deployment inside that Region.
