What is the real threat model of a Terraform pipeline?
AdvancedProductionSecurity, Secrets and Access
Answer
Anyone who can change code that gets planned can execute code: data "external", local-exec provisioners, a malicious module, even provider configuration can run commands on the runner with its credentials. So: plan jobs run with read-only creds, PRs from forks do not get secrets, CODEOWNERS covers module sources and .tf that include executables, runners are ephemeral and network-restricted, and apply happens only from protected branches.
More on Security, Secrets and Access
How do you avoid hardcoded credentials in Terraform?BeginnerIs reading a secret with a data source safe?IntermediateHow do ephemeral resources and write-only arguments keep secrets out of state?AdvancedWhat is the better pattern for RDS master passwords?BeginnerHow do you scope IAM for the Terraform deploy role?IntermediateWhat are dynamic provider credentials in HCP Terraform?Intermediate