Skip to content

Commit

Permalink
Correct KMS window deletion module
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-slalom committed Jul 6, 2021
1 parent 80c00e0 commit a9ededd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"prefix": ""
},
"severity": "HIGH",
"description": "Ensure rotation for customer created CMKs is enabled",
"description": "Ensure KMS key deletion window is set for deleted keys",
"reference_id": "AWS.KMS.Logging.High.0400",
"category": "Security Best Practices",
"version": 2,
"id": "AC_AWS_0161"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package accurics

{{.prefix}}kmsKeyNoDeletionWindow[retVal] {
kms_key = input.aws_kms_key[_]
kms_key.config.is_enabled == true
kms_key.config.is_enabled == false
kms_key.config.enable_key_rotation == true
invalid_window_in_days(kms_key.config.deletion_window_in_days) == true
traverse = "deletion_window_in_days"
Expand All @@ -16,4 +16,4 @@ invalid_window_in_days(days) = true {
invalid_window_in_days(days) = true {
days != null
days > 90
}
}

0 comments on commit a9ededd

Please sign in to comment.