diff --git a/.gitignore b/.gitignore index f4b0ea81dd..a79a1f8a1d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ __pycache__/ .DS_Store .vscode/ .venv +.idea/ +*.iml diff --git a/terraform/aws/security/aws-cloudwatch-log-group-unencrypted.tf b/terraform/aws/security/aws-cloudwatch-log-group-encrypted-with-cmk.tf similarity index 76% rename from terraform/aws/security/aws-cloudwatch-log-group-unencrypted.tf rename to terraform/aws/security/aws-cloudwatch-log-group-encrypted-with-cmk.tf index c4dce47061..b2ac679f24 100644 --- a/terraform/aws/security/aws-cloudwatch-log-group-unencrypted.tf +++ b/terraform/aws/security/aws-cloudwatch-log-group-encrypted-with-cmk.tf @@ -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 } diff --git a/terraform/aws/security/aws-cloudwatch-log-group-unencrypted.yaml b/terraform/aws/security/aws-cloudwatch-log-group-encrypted-with-cmk.yaml similarity index 95% rename from terraform/aws/security/aws-cloudwatch-log-group-unencrypted.yaml rename to terraform/aws/security/aws-cloudwatch-log-group-encrypted-with-cmk.yaml index 7faf320dfa..e07fee55d9 100644 --- a/terraform/aws/security/aws-cloudwatch-log-group-unencrypted.yaml +++ b/terraform/aws/security/aws-cloudwatch-log-group-encrypted-with-cmk.yaml @@ -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 { diff --git a/terraform/aws/security/aws-lambda-environment-unencrypted.tf b/terraform/aws/security/aws-lambda-environment-encrypted-with-cmk.tf similarity index 94% rename from terraform/aws/security/aws-lambda-environment-unencrypted.tf rename to terraform/aws/security/aws-lambda-environment-encrypted-with-cmk.tf index f4e09c30af..319a34247a 100644 --- a/terraform/aws/security/aws-lambda-environment-unencrypted.tf +++ b/terraform/aws/security/aws-lambda-environment-encrypted-with-cmk.tf @@ -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" } @@ -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 } @@ -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 = "" } diff --git a/terraform/aws/security/aws-lambda-environment-unencrypted.yaml b/terraform/aws/security/aws-lambda-environment-encrypted-with-cmk.yaml similarity index 96% rename from terraform/aws/security/aws-lambda-environment-unencrypted.yaml rename to terraform/aws/security/aws-lambda-environment-encrypted-with-cmk.yaml index 7f2b050157..8f37a2af8e 100644 --- a/terraform/aws/security/aws-lambda-environment-unencrypted.yaml +++ b/terraform/aws/security/aws-lambda-environment-encrypted-with-cmk.yaml @@ -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 { diff --git a/terraform/aws/security/aws-secretsmanager-secret-unencrypted.tf b/terraform/aws/security/aws-secretsmanager-secret-encrypted-with-cmk.tf similarity index 88% rename from terraform/aws/security/aws-secretsmanager-secret-unencrypted.tf rename to terraform/aws/security/aws-secretsmanager-secret-encrypted-with-cmk.tf index 5030c69e59..f49941c8f4 100644 --- a/terraform/aws/security/aws-secretsmanager-secret-unencrypted.tf +++ b/terraform/aws/security/aws-secretsmanager-secret-encrypted-with-cmk.tf @@ -13,7 +13,7 @@ resource "aws_secretsmanager_secret" "enabled2" { } # failure -# ruleid: aws-secretsmanager-secret-unencrypted +# ruleid: aws-secretsmanager-secret-encrypted-with-cmk resource "aws_secretsmanager_secret" "default" { name = "secret" } diff --git a/terraform/aws/security/aws-secretsmanager-secret-unencrypted.yaml b/terraform/aws/security/aws-secretsmanager-secret-encrypted-with-cmk.yaml similarity index 95% rename from terraform/aws/security/aws-secretsmanager-secret-unencrypted.yaml rename to terraform/aws/security/aws-secretsmanager-secret-encrypted-with-cmk.yaml index bff8ae3fd1..46f4ecaad8 100644 --- a/terraform/aws/security/aws-secretsmanager-secret-unencrypted.yaml +++ b/terraform/aws/security/aws-secretsmanager-secret-encrypted-with-cmk.yaml @@ -1,5 +1,5 @@ rules: -- id: aws-secretsmanager-secret-unencrypted +- id: aws-secretsmanager-secret-encrypted-with-cmk patterns: - pattern: | resource "aws_secretsmanager_secret" $ANYTHING {