Skip to content

Commit

Permalink
rename to CMK
Browse files Browse the repository at this point in the history
some rules use the term "unencrypted" but are actually encrypted with AWS provided keys and are therefore actually encrypted. This change renames several rules to be consistent with "encrypted-with-cmk" terminology.
  • Loading branch information
frozenSolid committed Aug 9, 2023
1 parent 4c49b7a commit 9d0f1f5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ __pycache__/
.DS_Store
.vscode/
.venv
.idea/
*.iml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource "aws_cloudwatch_log_group" "pass" {
retention_in_days = 1
kms_key_id = "someKey"
}
# ruleid: aws-cloudwatch-log-group-unencrypted
# ruleid: aws-cloudwatch-log-group-encrypted-with-cmk
resource "aws_cloudwatch_log_group" "fail" {
retention_in_days = 1
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rules:
- id: aws-cloudwatch-log-group-unencrypted
- id: aws-cloudwatch-log-group-encrypted-with-cmk
patterns:
- pattern: |
resource "aws_cloudwatch_log_group" $ANYTHING {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "aws_lambda_function" "fail" {
mode = "PassThrough"
}

# ruleid: aws-lambda-environment-unencrypted
# ruleid: aws-lambda-environment-encrypted-with-cmk
environment {
test="true"
}
Expand All @@ -26,7 +26,7 @@ resource "aws_lambda_function" "failkmsnovars" {
tracing_config {
mode = "PassThrough"
}
# ruleid: aws-lambda-environment-unencrypted
# ruleid: aws-lambda-environment-encrypted-with-cmk
kms_key_arn = aws_kms_key.anyoldguff.arn
}

Expand Down Expand Up @@ -70,6 +70,6 @@ resource "aws_lambda_function" "failasempty" {
tracing_config {
mode = "PassThrough"
}
# ruleid: aws-lambda-environment-unencrypted
# ruleid: aws-lambda-environment-encrypted-with-cmk
kms_key_arn = ""
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rules:
- id: aws-lambda-environment-unencrypted
- id: aws-lambda-environment-encrypted-with-cmk
patterns:
- pattern-inside: |
resource "aws_lambda_function" $ANYTHING {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "aws_secretsmanager_secret" "enabled2" {
}

# failure
# ruleid: aws-secretsmanager-secret-unencrypted
# ruleid: aws-secretsmanager-secret-with-cmk
resource "aws_secretsmanager_secret" "default" {
name = "secret"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rules:
- id: aws-secretsmanager-secret-unencrypted
- id: aws-secretsmanager-secret-encrypted-with-cmk
patterns:
- pattern: |
resource "aws_secretsmanager_secret" $ANYTHING {
Expand Down

0 comments on commit 9d0f1f5

Please sign in to comment.