Skip to content

AWS Secret Manager Automatic Key Rotation is not enabled

Description

This policy detects whether rotation is enabled for Secrets in AWS Secrets Manager. Enabling rotation for secrets helps reduce the risk of unauthorized access to the secrets.

Code Example

go
resource "aws_secretsmanager_secret" "example" {
  name       = "example-secret"
  # Other necessary configurations
}

+resource "aws_secretsmanager_secret_rotation" "example" {
+  secret_id           = aws_secretsmanager_secret.example.id
+  rotation_lambda_arn = aws_lambda_function.example.arn
+  rotation_rules {
+    automatically_after_days = 30
+  }
+  # Other necessary configurations
+}

Remediation

Terraform

  • Resource: aws_secretsmanager_secret
  • Arguments: aws_secretsmanager_secret_rotation

Rule Details

FieldValue
IDIAC-0491
SeverityLOW
IaC TypeTerraform
FrameworksTerraform, TerraformPlan
Checkov IDCKV2_AWS_57

References