Skip to content

[Please Do Not Merge] Test for Checkov + PR Commenter - #14

Open
senglezou wants to merge 2 commits into
mainfrom
test-checkove-pr-commenter
Open

[Please Do Not Merge] Test for Checkov + PR Commenter#14
senglezou wants to merge 2 commits into
mainfrom
test-checkove-pr-commenter

Conversation

@senglezou

@senglezou senglezou commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

Validate findings with running the following locally:

checkov -d "AWSGOAT" -o=sarif --soft-fail --output-file-path="test1"

For comment #14 (comment) we get the following locally:

Check: CKV_AWS_50: "X-Ray tracing is enabled for Lambda"
	FAILED for resource: aws_lambda_function.react_lambda_app
	File: /modules/module-3/main.tf:23-30
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-serverless-policies/bc-aws-serverless-4

		23 | resource "aws_lambda_function" "react_lambda_app" {
		24 |   filename      = "resources/lambda/out/reactapp.zip"
		25 |   function_name = "blog-application"
		26 |   handler       = "index.handler"
		27 |   runtime       = "nodejs14.x"
		28 |   role          = aws_iam_role.blog_app_lambda.arn
		29 |   depends_on    = [data.archive_file.lambda_zip, null_resource.file_replacement_lambda_react]
		30 | }

@senglezou
senglezou requested a review from northdpole as a code owner October 6, 2025 13:52

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smithy scan results

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X-Ray tracing is enabled for Lambda   X-Ray tracing is enabled for Lambda
Instancecheckov-pr-commenter-5f068e
ToolCheckov

Description

X-Ray tracing is enabled for Lambda

Help: X-Ray tracing is enabled for Lambda
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-serverless-policies/bc-aws-serverless-4

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)   Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
Instancecheckov-pr-commenter-5f068e
ToolCheckov

Description

Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)

Help: Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-a-dead-letter-queue-dlq

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured for function-level concurrent execution limit   Ensure that AWS Lambda function is configured for function-level concurrent execution limit
Instancecheckov-pr-commenter-5f068e
ToolCheckov

Description

Ensure that AWS Lambda function is configured for function-level concurrent execution limit

Help: Ensure that AWS Lambda function is configured for function-level concurrent execution limit
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-function-level-concurrent-execution-limit

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure Lambda Runtime is not deprecated   Ensure Lambda Runtime is not deprecated
Instancecheckov-pr-commenter-5f068e
ToolCheckov

Description

Ensure Lambda Runtime is not deprecated

Help: Ensure Lambda Runtime is not deprecated
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-363

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure AWS Lambda function is configured to validate code-signing   Ensure AWS Lambda function is configured to validate code-signing
Instancecheckov-pr-commenter-5f068e
ToolCheckov

Description

Ensure AWS Lambda function is configured to validate code-signing

Help: Ensure AWS Lambda function is configured to validate code-signing
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-272

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured inside a VPC   Ensure that AWS Lambda function is configured inside a VPC
Instancecheckov-pr-commenter-5f068e
ToolCheckov

Description

Ensure that AWS Lambda function is configured inside a VPC

Help: Ensure that AWS Lambda function is configured inside a VPC
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-inside-a-vpc-1

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smithy scan results

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure Lambda Runtime is not deprecated   Ensure Lambda Runtime is not deprecated
Instancecheckov-pr-commenter-715f0a
ToolCheckov

Description

Ensure Lambda Runtime is not deprecated

Help: Ensure Lambda Runtime is not deprecated
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-363

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)   Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
Instancecheckov-pr-commenter-715f0a
ToolCheckov

Description

Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)

Help: Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-a-dead-letter-queue-dlq

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured inside a VPC   Ensure that AWS Lambda function is configured inside a VPC
Instancecheckov-pr-commenter-715f0a
ToolCheckov

Description

Ensure that AWS Lambda function is configured inside a VPC

Help: Ensure that AWS Lambda function is configured inside a VPC
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-inside-a-vpc-1

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X-Ray tracing is enabled for Lambda   X-Ray tracing is enabled for Lambda
Instancecheckov-pr-commenter-715f0a
ToolCheckov

Description

X-Ray tracing is enabled for Lambda

Help: X-Ray tracing is enabled for Lambda
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-serverless-policies/bc-aws-serverless-4

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure AWS Lambda function is configured to validate code-signing   Ensure AWS Lambda function is configured to validate code-signing
Instancecheckov-pr-commenter-715f0a
ToolCheckov

Description

Ensure AWS Lambda function is configured to validate code-signing

Help: Ensure AWS Lambda function is configured to validate code-signing
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-272

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured for function-level concurrent execution limit   Ensure that AWS Lambda function is configured for function-level concurrent execution limit
Instancecheckov-pr-commenter-715f0a
ToolCheckov

Description

Ensure that AWS Lambda function is configured for function-level concurrent execution limit

Help: Ensure that AWS Lambda function is configured for function-level concurrent execution limit
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-function-level-concurrent-execution-limit

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smithy scan results

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)   Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)

Help: Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-a-dead-letter-queue-dlq

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure AWS Lambda function is configured to validate code-signing   Ensure AWS Lambda function is configured to validate code-signing
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

Ensure AWS Lambda function is configured to validate code-signing

Help: Ensure AWS Lambda function is configured to validate code-signing
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-272

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure Lambda Runtime is not deprecated   Ensure Lambda Runtime is not deprecated
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

Ensure Lambda Runtime is not deprecated

Help: Ensure Lambda Runtime is not deprecated
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-363

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure Lambda Runtime is not deprecated   Ensure Lambda Runtime is not deprecated
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

Ensure Lambda Runtime is not deprecated

Help: Ensure Lambda Runtime is not deprecated
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-363

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)   Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)

Help: Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-a-dead-letter-queue-dlq

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X-Ray tracing is enabled for Lambda   X-Ray tracing is enabled for Lambda
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

X-Ray tracing is enabled for Lambda

Help: X-Ray tracing is enabled for Lambda
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-serverless-policies/bc-aws-serverless-4

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured for function-level concurrent execution limit   Ensure that AWS Lambda function is configured for function-level concurrent execution limit
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

Ensure that AWS Lambda function is configured for function-level concurrent execution limit

Help: Ensure that AWS Lambda function is configured for function-level concurrent execution limit
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-function-level-concurrent-execution-limit

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured inside a VPC   Ensure that AWS Lambda function is configured inside a VPC
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

Ensure that AWS Lambda function is configured inside a VPC

Help: Ensure that AWS Lambda function is configured inside a VPC
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-inside-a-vpc-1

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure AWS Lambda function is configured to validate code-signing   Ensure AWS Lambda function is configured to validate code-signing
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

Ensure AWS Lambda function is configured to validate code-signing

Help: Ensure AWS Lambda function is configured to validate code-signing
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-272

depends_on = [aws_s3_bucket_object.upload_folder_prod]
}

resource "aws_lambda_function" "react_lambda_app" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that AWS Lambda function is configured for function-level concurrent execution limit   Ensure that AWS Lambda function is configured for function-level concurrent execution limit
Instancecheckov-pr-commenter-ae93da
ToolCheckov

Description

Ensure that AWS Lambda function is configured for function-level concurrent execution limit

Help: Ensure that AWS Lambda function is configured for function-level concurrent execution limit
Resource: aws_lambda_function.react_lambda_app

More info: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-function-level-concurrent-execution-limit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant