-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(query): fix/cmk rotation disabled on terraform asymmetric key cre…
…ation (#5344) * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * Update assets/queries/terraform/aws/cmk_rotation_disabled/query.rego Co-authored-by: Rafaela Soares <[email protected]> * Update assets/queries/terraform/aws/cmk_rotation_disabled/query.rego Co-authored-by: Rafaela Soares <[email protected]> * Update assets/queries/terraform/aws/cmk_rotation_disabled/query.rego Co-authored-by: Rafaela Soares <[email protected]> * Update assets/queries/terraform/aws/cmk_rotation_disabled/query.rego Co-authored-by: Rafaela Soares <[email protected]> * fix support for AWS KMS in asymmetric keys - do not support automation key rotation * Update assets/queries/terraform/aws/cmk_rotation_disabled/query.rego Co-authored-by: Rafaela Soares <[email protected]> Co-authored-by: Rafaela Soares <[email protected]>
- Loading branch information
1 parent
f4ed3d0
commit b1c5ad2
Showing
12 changed files
with
93 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
assets/queries/terraform/aws/cmk_rotation_disabled/test/negative1.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
resource "aws_kms_key" "a3" { | ||
description = "KMS key 1" | ||
is_enabled = true | ||
resource "aws_kms_key" "negative1" { | ||
description = "KMS key 1" | ||
is_enabled = true | ||
enable_key_rotation = true | ||
} |
4 changes: 4 additions & 0 deletions
4
assets/queries/terraform/aws/cmk_rotation_disabled/test/negative2.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "aws_kms_key" "negative2" { | ||
description = "KMS key 2" | ||
customer_master_key_spec = "RSA_4096" | ||
} |
4 changes: 4 additions & 0 deletions
4
assets/queries/terraform/aws/cmk_rotation_disabled/test/negative3.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "aws_kms_key" "negative3" { | ||
description = "KMS key 3" | ||
customer_master_key_spec = "RSA_2048" | ||
} |
4 changes: 4 additions & 0 deletions
4
assets/queries/terraform/aws/cmk_rotation_disabled/test/negative4.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "aws_kms_key" "negative4" { | ||
description = "KMS key 4" | ||
customer_master_key_spec = "RSA_3072" | ||
} |
5 changes: 5 additions & 0 deletions
5
assets/queries/terraform/aws/cmk_rotation_disabled/test/negative5.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resource "aws_kms_key" "negative5" { | ||
description = "KMS key 5" | ||
customer_master_key_spec = "SYMMETRIC_DEFAULT" | ||
enable_key_rotation = true | ||
} |
4 changes: 2 additions & 2 deletions
4
assets/queries/terraform/aws/cmk_rotation_disabled/test/positive1.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
resource "aws_kms_key" "a" { | ||
description = "KMS key 1" | ||
resource "aws_kms_key" "positive1" { | ||
description = "KMS key 1" | ||
} |
6 changes: 3 additions & 3 deletions
6
assets/queries/terraform/aws/cmk_rotation_disabled/test/positive2.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
resource "aws_kms_key" "a2" { | ||
description = "KMS key 2" | ||
is_enabled = true | ||
resource "aws_kms_key" "positive2" { | ||
description = "KMS key 2" | ||
is_enabled = true | ||
enable_key_rotation = false | ||
} |
6 changes: 6 additions & 0 deletions
6
assets/queries/terraform/aws/cmk_rotation_disabled/test/positive3.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
resource "aws_kms_key" "positive3" { | ||
description = "KMS key 3" | ||
is_enabled = true | ||
customer_master_key_spec = "SYMMETRIC_DEFAULT" | ||
enable_key_rotation = false | ||
} |
5 changes: 5 additions & 0 deletions
5
assets/queries/terraform/aws/cmk_rotation_disabled/test/positive4.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resource "aws_kms_key" "positive4" { | ||
description = "KMS key 4" | ||
customer_master_key_spec = "SYMMETRIC_DEFAULT" | ||
enable_key_rotation = false | ||
} |
5 changes: 5 additions & 0 deletions
5
assets/queries/terraform/aws/cmk_rotation_disabled/test/positive5.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resource "aws_kms_key" "positive5" { | ||
description = "KMS key 5" | ||
customer_master_key_spec = "RSA_2048" | ||
enable_key_rotation = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters