Skip to content

Commit 283255e

Browse files
committed
Added checkov suppression
1 parent c3b89d2 commit 283255e

File tree

14 files changed

+67
-0
lines changed

14 files changed

+67
-0
lines changed

aws_sra_examples/terraform/common/dynamodb/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
########################################################################
55

66
resource "aws_dynamodb_table" "terraform_locks" {
7+
#checkov:skip=CKV_AWS_28: Ensure DynamoDB point in time recovery (backup) is enabled
8+
#checkov:skip=CKV_AWS_119: Ensure DynamoDB Tables are encrypted using a KMS Customer Managed CMK
79
name = var.dynamodb_name
810
billing_mode = "PAY_PER_REQUEST"
911
hash_key = "LockID"

aws_sra_examples/terraform/common/secrets_kms/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ resource "aws_kms_key" "sra_secrets_key" {
1010
}
1111

1212
data "aws_iam_policy_document" "sra_secrets_key_policy" {
13+
#checkov:skip=CKV_AWS_109: Ensure IAM policies does not allow permissions management without constraints
14+
#checkov:skip=CKV_AWS_111: Ensure IAM policies does not allow write access without constraints
1315
statement {
1416
sid = "Enable IAM User Permissions"
1517
effect = "Allow"

aws_sra_examples/terraform/common/sra_execution_role/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
########################################################################
55

66
resource "aws_iam_role" "sra_execution_role" {
7+
#checkov:skip=CKV_AWS_274: Disallow IAM roles, users, and groups from using the AWS AdministratorAccess policy
78
name = var.execution_role_name
89

910
assume_role_policy = jsonencode({

aws_sra_examples/terraform/common/ssm_parameters/main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ data "archive_file" "zipped_lambda" {
5555
}
5656

5757
resource "aws_lambda_function" "management_account_parameters" {
58+
#checkov:skip=CKV_AWS_272: Ensure AWS Lambda function is configured to validate code-signing
59+
#checkov:skip=CKV_AWS_116: Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
60+
#checkov:skip=CKV_AWS_173: Check encryption settings for Lambda environment variable
61+
#checkov:skip=CKV_AWS_115: Ensure that AWS Lambda function is configured for function-level concurrent execution limit
62+
#checkov:skip=CKV_AWS_117: Ensure that AWS Lambda function is configured inside a VPC
63+
#checkov:skip=CKV_AWS_50: X-Ray tracing is enabled for Lambda
5864
function_name = var.management_account_parameters_lambda_function_name
5965
source_code_hash = data.archive_file.zipped_lambda.output_base64sha256
6066
filename = data.archive_file.zipped_lambda.output_path

aws_sra_examples/terraform/solutions/cloudtrail_org/kms/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# SPDX-License-Identifier: MIT-0
44
########################################################################
55
resource "aws_kms_key" "organization_cloudtrail_key" {
6+
#checkov:skip=CKV_AWS_149: Ensure that Secrets Manager secret is encrypted using KMS CMK
67
description = "Organization CloudTrail Key"
78
enable_key_rotation = true
89

aws_sra_examples/terraform/solutions/cloudtrail_org/org/main.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ resource "aws_iam_role_policy" "cloudtrail_cloudwatch_logs_policy" {
5151
}
5252

5353
resource "aws_cloudwatch_log_group" "cloudtrail_log_group" {
54+
#checkov:skip=CKV_AWS_158: Ensure that CloudWatch Log Group is encrypted by KMS
5455
count = var.create_cloudtrail_log_group == "true" ? 1 : 0
5556

5657
name = "sra/${var.cloudtrail_name}"
@@ -59,6 +60,7 @@ resource "aws_cloudwatch_log_group" "cloudtrail_log_group" {
5960
}
6061

6162
resource "aws_cloudwatch_log_group" "lambda_log_group" {
63+
#checkov:skip=CKV_AWS_158: Ensure that CloudWatch Log Group is encrypted by KMS
6264
count = var.create_lambda_log_group == "true" ? 1 : 0
6365

6466
name = "/aws/lambda/${var.cloudtrail_lambda_function_name}"
@@ -279,6 +281,13 @@ data "archive_file" "zipped_lambda" {
279281
}
280282

281283
resource "aws_lambda_function" "cloudtrail_org_lambda_function" {
284+
#checkov:skip=CKV_AWS_272: Ensure AWS Lambda function is configured to validate code-signing
285+
#checkov:skip=CKV_AWS_116: Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
286+
#checkov:skip=CKV_AWS_173: Check encryption settings for Lambda environment variable
287+
#checkov:skip=CKV_AWS_115: Ensure that AWS Lambda function is configured for function-level concurrent execution limit
288+
#checkov:skip=CKV_AWS_117: Ensure that AWS Lambda function is configured inside a VPC
289+
#checkov:skip=CKV_AWS_50: X-Ray tracing is enabled for Lambda
290+
282291
description = "Creates an Organization CloudTrail"
283292
function_name = var.cloudtrail_lambda_function_name
284293
role = aws_iam_role.cloudtrail_lambda_role.arn

aws_sra_examples/terraform/solutions/cloudtrail_org/s3/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ resource "aws_s3_bucket_policy" "org_trail_bucket_policy" {
137137
}
138138

139139
resource "aws_secretsmanager_secret" "org_trail_s3_bucket_secret" {
140+
#checkov:skip=CKV_AWS_149: Ensure that Secrets Manager secret is encrypted using KMS CMK
140141
count = var.sra_secrets_key_alias_arn != "" ? 1 : 0
141142

142143
name = "sra/cloudtrail_org_s3_bucket"

aws_sra_examples/terraform/solutions/guard_duty/configuration_role/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ data "aws_iam_policy_document" "guardduty_policy" {
8989
}
9090

9191
data "aws_iam_policy_document" "iam_policy" {
92+
#checkov:skip=CKV_AWS_111: Ensure IAM policies does not allow write access without constraints
9293
statement {
9394
sid = "AllowReadIamActions"
9495
effect = "Allow"

aws_sra_examples/terraform/solutions/guard_duty/gd_configuration/main.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ data "aws_iam_policy_document" "sra_guardduty_org_policy_logs" {
150150
}
151151

152152
data "aws_iam_policy_document" "sra_guardduty_org_policy_organizations" {
153+
#checkov:skip=CKV_AWS_111: Ensure IAM policies does not allow write access without constraints
153154
statement {
154155
sid = "OrganizationsReadAccess"
155156
effect = "Allow"
@@ -332,6 +333,13 @@ data "archive_file" "zipped_lambda" {
332333

333334
# main function
334335
resource "aws_lambda_function" "guardduty_lambda_function" {
336+
#checkov:skip=CKV_AWS_272: Ensure AWS Lambda function is configured to validate code-signing
337+
#checkov:skip=CKV_AWS_116: Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
338+
#checkov:skip=CKV_AWS_173: Check encryption settings for Lambda environment variable
339+
#checkov:skip=CKV_AWS_115: Ensure that AWS Lambda function is configured for function-level concurrent execution limit
340+
#checkov:skip=CKV_AWS_117: Ensure that AWS Lambda function is configured inside a VPC
341+
#checkov:skip=CKV_AWS_50: X-Ray tracing is enabled for Lambda
342+
335343
function_name = var.guardduty_lambda_function_name
336344
description = "Configure GuardDuty for the Organization"
337345
role = aws_iam_role.guardduty_lambda_role.arn
@@ -390,6 +398,7 @@ resource "aws_sns_topic_subscription" "guardduty_topic_subscription" {
390398
}
391399

392400
resource "aws_sqs_queue" "guardduty_dlq" {
401+
#checkov:skip=CKV_AWS_27: Ensure all data stored in the SQS queue is encrypted
393402
name = "${var.sra_solution_name}-dlq"
394403
tags = {
395404
"sra-solution" = var.sra_solution_name

aws_sra_examples/terraform/solutions/iam_password_policy/configuration/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ data "archive_file" "zipped_lambda" {
144144

145145
# main function
146146
resource "aws_lambda_function" "iam_password_policy_lambda_function" {
147+
#checkov:skip=CKV_AWS_272: Ensure AWS Lambda function is configured to validate code-signing
148+
#checkov:skip=CKV_AWS_116: Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
149+
#checkov:skip=CKV_AWS_173: Check encryption settings for Lambda environment variable
150+
#checkov:skip=CKV_AWS_115: Ensure that AWS Lambda function is configured for function-level concurrent execution limit
151+
#checkov:skip=CKV_AWS_117: Ensure that AWS Lambda function is configured inside a VPC
152+
#checkov:skip=CKV_AWS_50: X-Ray tracing is enabled for Lambda
153+
147154
function_name = var.lambda_function_name
148155
description = "SRA Update IAM password policy"
149156
role = aws_iam_role.iam_password_policy_lambda_role.arn

0 commit comments

Comments
 (0)