How should deploy credentials be scoped for a staging versus production pipeline?
BeginnerProductionSecrets and Credentials
Answer
Separate identities per environment with least privilege: a staging role can only touch staging, and the production role is only assumable by jobs running on protected refs/environments with approval. Production credentials never exist in PR pipelines or on shared agents. Separate AWS accounts per environment add a hard boundary.
More on Secrets and Credentials
Why are long-lived credentials in CI a problem, and what is the modern alternative?BeginnerHow do you manage application secrets from build to runtime?IntermediateHow do you store secrets in Git safely for GitOps?IntermediateHow do you detect secrets committed to a repo?BeginnerWhat do you do after a secret is committed to Git?IntermediateHow do you use HashiCorp Vault with CI/CD?Advanced