Skip to content

GitHub Actions Environment Secrets defined in Terraform are not encrypted

Description

In the GitHub Terraform provider, there is an optional field to include a plaintext string of the secret. If this is checked into code, it will expose the secret.

Code Example

hcl
resource "github_actions_environment_secret" "test_secret" {

...
-  plaintext_value  = "example%value"
}

Remediation

Terraform

  • Resource: github_actions_environment_secret, github_actions_organization_secret, github_actions_secret
  • Attribute: plaintext_value

Rule Details

FieldValue
IDIAC-1035
SeverityHIGH
IaC TypeTerraform
FrameworksTerraform
Checkov IDCKV_GIT_4

References