Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump terraform-aws-modules/iam/aws from 5.44.1 to 5.48.0 in /terraform/environments/analytical-platform-ingestion #8636

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 12, 2024

Bumps terraform-aws-modules/iam/aws from 5.44.1 to 5.48.0.

Release notes

Sourced from terraform-aws-modules/iam/aws's releases.

v5.48.0

5.48.0 (2024-11-11)

Features

  • Add ec2:GetSecurityGroupsForVpc for AWS LB Controller v2.10.0 (#536) (9cfab4a)

v5.47.1

5.47.1 (2024-10-22)

Bug Fixes

v5.47.0

5.47.0 (2024-10-21)

Features

  • Update AWS EBS CSI Driver IAM Policy (#530) (1bc058c)

Bug Fixes

  • Update CI workflow versions to latest (#527) (15fd175)

v5.46.0

5.46.0 (2024-10-04)

Features

  • Update IAM policy for AWS Load Balancer Controller to support Listener Attributes (#525) (966c4f8)

v5.45.0

5.45.0 (2024-10-04)

Features

  • Allow modifying the iam-github-oidc-role subject condition (#523) (f2ade86)

v5.44.2

5.44.2 (2024-10-01)

Bug Fixes

... (truncated)

Changelog

Sourced from terraform-aws-modules/iam/aws's changelog.

5.48.0 (2024-11-11)

Features

  • Add ec2:GetSecurityGroupsForVpc for AWS LB Controller v2.10.0 (#536) (9cfab4a)

5.47.1 (2024-10-22)

Bug Fixes

5.47.0 (2024-10-21)

Features

  • Update AWS EBS CSI Driver IAM Policy (#530) (1bc058c)

Bug Fixes

  • Update CI workflow versions to latest (#527) (15fd175)

5.46.0 (2024-10-04)

Features

  • Update IAM policy for AWS Load Balancer Controller to support Listener Attributes (#525) (966c4f8)

5.45.0 (2024-10-04)

Features

  • Allow modifying the iam-github-oidc-role subject condition (#523) (f2ade86)

5.44.2 (2024-10-01)

Bug Fixes

  • Add required S3 PutObjectTagging permission to Velero IRSA policy (#517) (f0e65a7)
Commits
  • e20e0b9 chore(release): version 5.48.0 [skip ci]
  • 9cfab4a feat: Add ec2:GetSecurityGroupsForVpc for AWS LB Controller v2.10.0 (#536)
  • ef31aca docs: Add Mountpoint S3 CSI Driver to the list of optional supported policies...
  • cfb6845 chore(release): version 5.47.1 [skip ci]
  • 9986b50 fix: Use dynamic partition value (#532)
  • 0773c17 chore(release): version 5.47.0 [skip ci]
  • 1bc058c feat: Update AWS EBS CSI Driver IAM Policy (#530)
  • 15fd175 fix: Update CI workflow versions to latest (#527)
  • 617f4cb chore(release): version 5.46.0 [skip ci]
  • 966c4f8 feat: Update IAM policy for AWS Load Balancer Controller to support Listener ...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested review from a team as code owners November 12, 2024 00:41
@dependabot dependabot bot added dependencies Pull requests that update a dependency file terraform Pull requests that update Terraform code labels Nov 12, 2024
@github-actions github-actions bot added the environments-repository Used to exclude PRs from this repo in our Slack PR update label Nov 12, 2024
Copy link
Contributor

Trivy Scan Failed

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-12T00:43:34Z INFO [vulndb] Need to update DB
2024-11-12T00:43:34Z INFO [vulndb] Downloading vulnerability DB...
2024-11-12T00:43:34Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-12T00:43:37Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-12T00:43:37Z INFO [vuln] Vulnerability scanning is enabled
2024-11-12T00:43:37Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-12T00:43:37Z INFO [misconfig] Need to update the built-in checks
2024-11-12T00:43:37Z INFO [misconfig] Downloading the built-in checks...
160.60 KiB / 160.60 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-11-12T00:43:37Z INFO [secret] Secret scanning is enabled
2024-11-12T00:43:37Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-12T00:43:37Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-12T00:43:38Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-12T00:43:38Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-12T00:43:38Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-12T00:43:38Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-12T00:43:38Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-12T00:43:42Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:42Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:44Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-12T00:43:44Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-12T00:43:44Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-12T00:43:44Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-12T00:43:44Z INFO Number of language-specific files num=0
2024-11-12T00:43:44Z INFO Detected config files num=10

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 ┌ resource "aws_lb" "this" {
13 │ count = local.create ? 1 : 0
14 │
15 │ dynamic "access_logs" {
16 │ for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
17 │
18 │ content {
19 │ bucket = access_logs.value.bucket
20 └ enabled = try(access_logs.value.enabled, true)
..
────────────────────────────────────────

git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

terraform-aws-modules/vpc/aws/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:340
via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:323
via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:221
via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:204
via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
2024-11-12T00:43:44Z INFO [vuln] Vulnerability scanning is enabled
2024-11-12T00:43:44Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-12T00:43:44Z INFO [secret] Secret scanning is enabled
2024-11-12T00:43:44Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-12T00:43:44Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-12T00:43:45Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-12T00:43:45Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="cidr_blocks, egress_bucket, egress_bucket_kms_key, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-12T00:43:45Z INFO Number of language-specific files num=0
2024-11-12T00:43:45Z INFO Detected config files num=1
trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
2024-11-12T00:43:45Z INFO [vuln] Vulnerability scanning is enabled
2024-11-12T00:43:45Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-12T00:43:45Z INFO [secret] Secret scanning is enabled
2024-11-12T00:43:45Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-12T00:43:45Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-12T00:43:47Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-12T00:43:47Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="cidr_blocks, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-12T00:43:47Z INFO Number of language-specific files num=0
2024-11-12T00:43:47Z INFO Detected config files num=1
trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-12T00:43:47Z INFO [vuln] Vulnerability scanning is enabled
2024-11-12T00:43:47Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-12T00:43:47Z INFO [secret] Secret scanning is enabled
2024-11-12T00:43:47Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-12T00:43:47Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-12T00:43:48Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-12T00:43:48Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-12T00:43:48Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-12T00:43:48Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-12T00:43:48Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:51Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-12T00:43:51Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-12T00:43:51Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-12T00:43:51Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-12T00:43:51Z INFO Number of language-specific files num=0
2024-11-12T00:43:51Z INFO Detected config files num=7

terraform-aws-modules/alb/aws/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
terraform-aws-modules/alb/aws/main.tf:12-81
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 ┌ resource "aws_lb" "this" {
13 │ count = local.create ? 1 : 0
14 │
15 │ dynamic "access_logs" {
16 │ for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
17 │
18 │ content {
19 │ bucket = access_logs.value.bucket
20 └ enabled = try(access_logs.value.enabled, true)
..
────────────────────────────────────────

terraform-aws-modules/vpc/aws/main.tf (terraform)

Tests: 8 (SUCCESSES: 0, FAILURES: 8)
Failures: 8 (HIGH: 0, CRITICAL: 8)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:340
via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:323
via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:221
via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:204
via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:340
via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:323
via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:221
via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:204
via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=2

</details> #### `Checkov Scan` Failed
<details><summary>Show Output</summary>

```hcl

*****************************

Checkov will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-12 00:43:53,590 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,590 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,590 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,590 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,591 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,591 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,591 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,591 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,591 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,591 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,591 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,592 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,592 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,592 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,592 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,592 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,592 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:53,613 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-12 00:43:53,613 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 170, Failed checks: 2, Skipped checks: 68

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_route53_resolver_associations
	File: /route53-resolver-associations.tf:1-13
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_route53_resolver_associations" {
		2  | 
		3  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-rule-associations"
		4  |   version = "4.1.0"
		5  | 
		6  |   vpc_id = module.connected_vpc.vpc_id
		7  | 
		8  |   resolver_rule_associations = {
		9  |     mojo-dns-resolver-dom1-infra-int = {
		10 |       resolver_rule_id = aws_route53_resolver_rule.mojo_dns_resolver_dom1_infra_int.id
		11 |     }
		12 |   }
		13 | }

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_outbound_route53_resolver_endpoint
	File: /route53-resolver-endpoints.tf:1-27
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_outbound_route53_resolver_endpoint" {
		2  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-endpoints"
		3  |   version = "4.1.0"
		4  | 
		5  |   name      = "connected-vpc-outbound"
		6  |   vpc_id    = module.connected_vpc.vpc_id
		7  |   direction = "OUTBOUND"
		8  |   protocols = ["Do53"]
		9  | 
		10 |   ip_address = [
		11 |     {
		12 |       subnet_id = module.connected_vpc.private_subnets[0]
		13 |     },
		14 |     {
		15 |       subnet_id = module.connected_vpc.private_subnets[1]
		16 |     }
		17 |   ]
		18 | 
		19 |   security_group_ingress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
		20 |   security_group_egress_cidr_blocks = [
		21 |     /* MoJO DNS Resolver Service */
		22 |     "10.180.80.5/32",
		23 |     "10.180.81.5/32"
		24 |   ]
		25 | 
		26 |   tags = local.tags
		27 | }

checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-12 00:43:56,464 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:56,464 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:56,476 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-12 00:43:56,476 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 22, Failed checks: 0, Skipped checks: 6


checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-12 00:43:59,238 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:59,238 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:43:59,259 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-12 00:43:59,259 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 22, Failed checks: 0, Skipped checks: 6


checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-12 00:44:02,018 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,019 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,019 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,019 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,019 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,019 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,019 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,020 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,020 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,020 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,020 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,020 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,020 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,021 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,021 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,021 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,021 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-12 00:44:02,045 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-12 00:44:02,045 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 170, Failed checks: 2, Skipped checks: 68

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_route53_resolver_associations
	File: /route53-resolver-associations.tf:1-13
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_route53_resolver_associations" {
		2  | 
		3  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-rule-associations"
		4  |   version = "4.1.0"
		5  | 
		6  |   vpc_id = module.connected_vpc.vpc_id
		7  | 
		8  |   resolver_rule_associations = {
		9  |     mojo-dns-resolver-dom1-infra-int = {
		10 |       resolver_rule_id = aws_route53_resolver_rule.mojo_dns_resolver_dom1_infra_int.id
		11 |     }
		12 |   }
		13 | }

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_outbound_route53_resolver_endpoint
	File: /route53-resolver-endpoints.tf:1-27
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_outbound_route53_resolver_endpoint" {
		2  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-endpoints"
		3  |   version = "4.1.0"
		4  | 
		5  |   name      = "connected-vpc-outbound"
		6  |   vpc_id    = module.connected_vpc.vpc_id
		7  |   direction = "OUTBOUND"
		8  |   protocols = ["Do53"]
		9  | 
		10 |   ip_address = [
		11 |     {
		12 |       subnet_id = module.connected_vpc.private_subnets[0]
		13 |     },
		14 |     {
		15 |       subnet_id = module.connected_vpc.private_subnets[1]
		16 |     }
		17 |   ]
		18 | 
		19 |   security_group_ingress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
		20 |   security_group_egress_cidr_blocks = [
		21 |     /* MoJO DNS Resolver Service */
		22 |     "10.180.80.5/32",
		23 |     "10.180.81.5/32"
		24 |   ]
		25 | 
		26 |   tags = local.tags
		27 | }

checkov_exitcode=2

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing "terraform" plugin...
Installed "terraform" (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.9.1)
tflint will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Failed

Show Output
*****************************

Trivy will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-12T00:43:34Z	INFO	[vulndb] Need to update DB
2024-11-12T00:43:34Z	INFO	[vulndb] Downloading vulnerability DB...
2024-11-12T00:43:34Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-12T00:43:37Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-12T00:43:37Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-12T00:43:37Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-12T00:43:37Z	INFO	[misconfig] Need to update the built-in checks
2024-11-12T00:43:37Z	INFO	[misconfig] Downloading the built-in checks...
160.60 KiB / 160.60 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-11-12T00:43:37Z	INFO	[secret] Secret scanning is enabled
2024-11-12T00:43:37Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-12T00:43:37Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-12T00:43:38Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-12T00:43:38Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-12T00:43:38Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-12T00:43:38Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-12T00:43:38Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-12T00:43:42Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:42Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:44Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-12T00:43:44Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-12T00:43:44Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-12T00:43:44Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-12T00:43:44Z	INFO	Number of language-specific files	num=0
2024-11-12T00:43:44Z	INFO	Detected config files	num=10

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)
===============================================================================================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81
   via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12resource "aws_lb" "this" {
  13count = local.create ? 1 : 0
  1415dynamic "access_logs" {
  16for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
  1718content {
  19bucket  = access_logs.value.bucket
  20enabled = try(access_logs.value.enabled, true)
  ..   
────────────────────────────────────────



git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)
===============================================================================================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────



terraform-aws-modules/vpc/aws/main.tf (terraform)
=================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:340
   via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:323
   via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:221
   via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:204
   via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
2024-11-12T00:43:44Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-12T00:43:44Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-12T00:43:44Z	INFO	[secret] Secret scanning is enabled
2024-11-12T00:43:44Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-12T00:43:44Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-12T00:43:45Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-12T00:43:45Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="cidr_blocks, egress_bucket, egress_bucket_kms_key, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-12T00:43:45Z	INFO	Number of language-specific files	num=0
2024-11-12T00:43:45Z	INFO	Detected config files	num=1
trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
2024-11-12T00:43:45Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-12T00:43:45Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-12T00:43:45Z	INFO	[secret] Secret scanning is enabled
2024-11-12T00:43:45Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-12T00:43:45Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-12T00:43:47Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-12T00:43:47Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="cidr_blocks, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-12T00:43:47Z	INFO	Number of language-specific files	num=0
2024-11-12T00:43:47Z	INFO	Detected config files	num=1
trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-12T00:43:47Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-12T00:43:47Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-12T00:43:47Z	INFO	[secret] Secret scanning is enabled
2024-11-12T00:43:47Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-12T00:43:47Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-12T00:43:48Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-12T00:43:48Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-12T00:43:48Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-12T00:43:48Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-12T00:43:48Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-12T00:43:51Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-12T00:43:51Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-12T00:43:51Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-12T00:43:51Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-12T00:43:51Z	INFO	Number of language-specific files	num=0
2024-11-12T00:43:51Z	INFO	Detected config files	num=7

terraform-aws-modules/alb/aws/main.tf (terraform)
=================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 terraform-aws-modules/alb/aws/main.tf:12-81
   via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12resource "aws_lb" "this" {
  13 │   count = local.create ? 1 : 0
  1415 │   dynamic "access_logs" {
  16 │     for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
  1718 │     content {
  19 │       bucket  = access_logs.value.bucket
  20 └       enabled = try(access_logs.value.enabled, true)
  ..   
────────────────────────────────────────



terraform-aws-modules/vpc/aws/main.tf (terraform)
=================================================
Tests: 8 (SUCCESSES: 0, FAILURES: 8)
Failures: 8 (HIGH: 0, CRITICAL: 8)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:340
   via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:323
   via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:221
   via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:204
   via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:340
   via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:323
   via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:221
   via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:204
   via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:25-46 (module.isolated_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=2

@dependabot dependabot bot force-pushed the dependabot/terraform/terraform/environments/analytical-platform-ingestion/terraform-aws-modules/iam/aws-5.48.0 branch from 6ee5f25 to 8badb7e Compare November 13, 2024 15:00
Copy link
Contributor

Trivy Scan Failed

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-13T15:02:42Z INFO [vulndb] Need to update DB
2024-11-13T15:02:42Z INFO [vulndb] Downloading vulnerability DB...
2024-11-13T15:02:42Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-13T15:02:45Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-13T15:02:45Z INFO [vuln] Vulnerability scanning is enabled
2024-11-13T15:02:45Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-13T15:02:45Z INFO [misconfig] Need to update the built-in checks
2024-11-13T15:02:45Z INFO [misconfig] Downloading the built-in checks...
2024-11-13T15:02:45Z ERROR [misconfig] Falling back to embedded checks err="failed to download built-in policies: download error: OCI repository error: 1 error occurred:\n\t* GET https://ghcr.io/v2/aquasecurity/trivy-checks/manifests/1: TOOMANYREQUESTS: retry-after: 58.084µs, allowed: 44000/minute\n\n"
2024-11-13T15:02:45Z INFO [secret] Secret scanning is enabled
2024-11-13T15:02:45Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T15:02:45Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T15:02:46Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-13T15:02:46Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-13T15:02:46Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-13T15:02:46Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-13T15:02:46Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:52Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-13T15:02:52Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-13T15:02:52Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-13T15:02:52Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-13T15:02:52Z INFO Number of language-specific files num=0
2024-11-13T15:02:52Z INFO Detected config files num=9

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 ┌ resource "aws_lb" "this" {
13 │ count = local.create ? 1 : 0
14 │
15 │ dynamic "access_logs" {
16 │ for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
17 │
18 │ content {
19 │ bucket = access_logs.value.bucket
20 └ enabled = try(access_logs.value.enabled, true)
..
────────────────────────────────────────

git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
2024-11-13T15:02:52Z INFO [vuln] Vulnerability scanning is enabled
2024-11-13T15:02:52Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-13T15:02:52Z INFO [misconfig] Need to update the built-in checks
2024-11-13T15:02:52Z INFO [misconfig] Downloading the built-in checks...
2024-11-13T15:02:52Z ERROR [misconfig] Falling back to embedded checks err="failed to download built-in policies: download error: OCI repository error: 1 error occurred:\n\t* GET https://ghcr.io/v2/aquasecurity/trivy-checks/manifests/1: TOOMANYREQUESTS: retry-after: 100.821µs, allowed: 44000/minute\n\n"
2024-11-13T15:02:52Z INFO [secret] Secret scanning is enabled
2024-11-13T15:02:52Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T15:02:52Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T15:02:53Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-13T15:02:53Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="cidr_blocks, egress_bucket, egress_bucket_kms_key, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-13T15:02:53Z INFO Number of language-specific files num=0
2024-11-13T15:02:53Z INFO Detected config files num=1
trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
2024-11-13T15:02:53Z INFO [vuln] Vulnerability scanning is enabled
2024-11-13T15:02:53Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-13T15:02:53Z INFO [misconfig] Need to update the built-in checks
2024-11-13T15:02:53Z INFO [misconfig] Downloading the built-in checks...
160.60 KiB / 160.60 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-11-13T15:02:53Z INFO [secret] Secret scanning is enabled
2024-11-13T15:02:53Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T15:02:53Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T15:02:54Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-13T15:02:54Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="cidr_blocks, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-13T15:02:54Z INFO Number of language-specific files num=0
2024-11-13T15:02:54Z INFO Detected config files num=1
trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-13T15:02:54Z INFO [vuln] Vulnerability scanning is enabled
2024-11-13T15:02:54Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-13T15:02:54Z INFO [secret] Secret scanning is enabled
2024-11-13T15:02:54Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T15:02:54Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T15:02:55Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-13T15:02:55Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-13T15:02:55Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-13T15:02:55Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-13T15:02:55Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-13T15:02:56Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:56Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:56Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:56Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:58Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-13T15:02:58Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-13T15:02:58Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-13T15:02:58Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-13T15:02:58Z INFO Number of language-specific files num=0
2024-11-13T15:02:58Z INFO Detected config files num=7

terraform-aws-modules/alb/aws/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
terraform-aws-modules/alb/aws/main.tf:12-81
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 ┌ resource "aws_lb" "this" {
13 │ count = local.create ? 1 : 0
14 │
15 │ dynamic "access_logs" {
16 │ for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
17 │
18 │ content {
19 │ bucket = access_logs.value.bucket
20 └ enabled = try(access_logs.value.enabled, true)
..
────────────────────────────────────────

terraform-aws-modules/vpc/aws/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:340
via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:323
via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:221
via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:204
via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=2

</details> #### `Checkov Scan` Failed
<details><summary>Show Output</summary>

```hcl

*****************************

Checkov will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-13 15:03:00,665 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,666 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,666 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,666 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,666 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,666 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,666 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,666 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,667 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,667 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,667 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,667 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,667 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,667 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,667 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,667 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,668 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:00,684 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-13 15:03:00,689 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 185, Failed checks: 2, Skipped checks: 72

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_route53_resolver_associations
	File: /route53-resolver-associations.tf:1-13
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_route53_resolver_associations" {
		2  | 
		3  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-rule-associations"
		4  |   version = "4.1.0"
		5  | 
		6  |   vpc_id = module.connected_vpc.vpc_id
		7  | 
		8  |   resolver_rule_associations = {
		9  |     mojo-dns-resolver-dom1-infra-int = {
		10 |       resolver_rule_id = aws_route53_resolver_rule.mojo_dns_resolver_dom1_infra_int.id
		11 |     }
		12 |   }
		13 | }

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_outbound_route53_resolver_endpoint
	File: /route53-resolver-endpoints.tf:1-27
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_outbound_route53_resolver_endpoint" {
		2  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-endpoints"
		3  |   version = "4.1.0"
		4  | 
		5  |   name      = "connected-vpc-outbound"
		6  |   vpc_id    = module.connected_vpc.vpc_id
		7  |   direction = "OUTBOUND"
		8  |   protocols = ["Do53"]
		9  | 
		10 |   ip_address = [
		11 |     {
		12 |       subnet_id = module.connected_vpc.private_subnets[0]
		13 |     },
		14 |     {
		15 |       subnet_id = module.connected_vpc.private_subnets[1]
		16 |     }
		17 |   ]
		18 | 
		19 |   security_group_ingress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
		20 |   security_group_egress_cidr_blocks = [
		21 |     /* MoJO DNS Resolver Service */
		22 |     "10.180.80.5/32",
		23 |     "10.180.81.5/32"
		24 |   ]
		25 | 
		26 |   tags = local.tags
		27 | }

checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-13 15:03:03,408 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:03,408 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:03,426 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-13 15:03:03,426 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 22, Failed checks: 0, Skipped checks: 6


checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-13 15:03:05,902 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:05,902 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:05,919 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-13 15:03:05,919 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 22, Failed checks: 0, Skipped checks: 6


checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-13 15:03:08,334 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,334 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,334 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,334 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,334 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,334 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,334 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,335 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,335 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,335 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,335 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,335 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,335 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,335 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,336 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,336 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,336 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-13 15:03:08,348 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-13 15:03:08,348 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 185, Failed checks: 2, Skipped checks: 72

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_route53_resolver_associations
	File: /route53-resolver-associations.tf:1-13
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_route53_resolver_associations" {
		2  | 
		3  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-rule-associations"
		4  |   version = "4.1.0"
		5  | 
		6  |   vpc_id = module.connected_vpc.vpc_id
		7  | 
		8  |   resolver_rule_associations = {
		9  |     mojo-dns-resolver-dom1-infra-int = {
		10 |       resolver_rule_id = aws_route53_resolver_rule.mojo_dns_resolver_dom1_infra_int.id
		11 |     }
		12 |   }
		13 | }

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_outbound_route53_resolver_endpoint
	File: /route53-resolver-endpoints.tf:1-27
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_outbound_route53_resolver_endpoint" {
		2  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-endpoints"
		3  |   version = "4.1.0"
		4  | 
		5  |   name      = "connected-vpc-outbound"
		6  |   vpc_id    = module.connected_vpc.vpc_id
		7  |   direction = "OUTBOUND"
		8  |   protocols = ["Do53"]
		9  | 
		10 |   ip_address = [
		11 |     {
		12 |       subnet_id = module.connected_vpc.private_subnets[0]
		13 |     },
		14 |     {
		15 |       subnet_id = module.connected_vpc.private_subnets[1]
		16 |     }
		17 |   ]
		18 | 
		19 |   security_group_ingress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
		20 |   security_group_egress_cidr_blocks = [
		21 |     /* MoJO DNS Resolver Service */
		22 |     "10.180.80.5/32",
		23 |     "10.180.81.5/32"
		24 |   ]
		25 | 
		26 |   tags = local.tags
		27 | }

checkov_exitcode=2

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing "terraform" plugin...
Installed "terraform" (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.9.1)
tflint will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Failed

Show Output
*****************************

Trivy will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-13T15:02:42Z	INFO	[vulndb] Need to update DB
2024-11-13T15:02:42Z	INFO	[vulndb] Downloading vulnerability DB...
2024-11-13T15:02:42Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-13T15:02:45Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-13T15:02:45Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-13T15:02:45Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-13T15:02:45Z	INFO	[misconfig] Need to update the built-in checks
2024-11-13T15:02:45Z	INFO	[misconfig] Downloading the built-in checks...
2024-11-13T15:02:45Z	ERROR	[misconfig] Falling back to embedded checks	err="failed to download built-in policies: download error: OCI repository error: 1 error occurred:\n\t* GET https://ghcr.io/v2/aquasecurity/trivy-checks/manifests/1: TOOMANYREQUESTS: retry-after: 58.084µs, allowed: 44000/minute\n\n"
2024-11-13T15:02:45Z	INFO	[secret] Secret scanning is enabled
2024-11-13T15:02:45Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T15:02:45Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T15:02:46Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-13T15:02:46Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-13T15:02:46Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-13T15:02:46Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-13T15:02:46Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:52Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-13T15:02:52Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-13T15:02:52Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-13T15:02:52Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-13T15:02:52Z	INFO	Number of language-specific files	num=0
2024-11-13T15:02:52Z	INFO	Detected config files	num=9

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)
===============================================================================================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81
   via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12resource "aws_lb" "this" {
  13count = local.create ? 1 : 0
  1415dynamic "access_logs" {
  16for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
  1718content {
  19bucket  = access_logs.value.bucket
  20enabled = try(access_logs.value.enabled, true)
  ..   
────────────────────────────────────────



git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)
===============================================================================================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
2024-11-13T15:02:52Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-13T15:02:52Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-13T15:02:52Z	INFO	[misconfig] Need to update the built-in checks
2024-11-13T15:02:52Z	INFO	[misconfig] Downloading the built-in checks...
2024-11-13T15:02:52Z	ERROR	[misconfig] Falling back to embedded checks	err="failed to download built-in policies: download error: OCI repository error: 1 error occurred:\n\t* GET https://ghcr.io/v2/aquasecurity/trivy-checks/manifests/1: TOOMANYREQUESTS: retry-after: 100.821µs, allowed: 44000/minute\n\n"
2024-11-13T15:02:52Z	INFO	[secret] Secret scanning is enabled
2024-11-13T15:02:52Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T15:02:52Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T15:02:53Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-13T15:02:53Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="cidr_blocks, egress_bucket, egress_bucket_kms_key, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-13T15:02:53Z	INFO	Number of language-specific files	num=0
2024-11-13T15:02:53Z	INFO	Detected config files	num=1
trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
2024-11-13T15:02:53Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-13T15:02:53Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-13T15:02:53Z	INFO	[misconfig] Need to update the built-in checks
2024-11-13T15:02:53Z	INFO	[misconfig] Downloading the built-in checks...
160.60 KiB / 160.60 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-11-13T15:02:53Z	INFO	[secret] Secret scanning is enabled
2024-11-13T15:02:53Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T15:02:53Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T15:02:54Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-13T15:02:54Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="cidr_blocks, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-13T15:02:54Z	INFO	Number of language-specific files	num=0
2024-11-13T15:02:54Z	INFO	Detected config files	num=1
trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-13T15:02:54Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-13T15:02:54Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-13T15:02:54Z	INFO	[secret] Secret scanning is enabled
2024-11-13T15:02:54Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T15:02:54Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T15:02:55Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-13T15:02:55Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-13T15:02:55Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-13T15:02:55Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-13T15:02:55Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-13T15:02:56Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:56Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:56Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:56Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:57Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T15:02:58Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-13T15:02:58Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-13T15:02:58Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-13T15:02:58Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-13T15:02:58Z	INFO	Number of language-specific files	num=0
2024-11-13T15:02:58Z	INFO	Detected config files	num=7

terraform-aws-modules/alb/aws/main.tf (terraform)
=================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 terraform-aws-modules/alb/aws/main.tf:12-81
   via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12resource "aws_lb" "this" {
  13 │   count = local.create ? 1 : 0
  1415 │   dynamic "access_logs" {
  16 │     for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
  1718 │     content {
  19 │       bucket  = access_logs.value.bucket
  20 └       enabled = try(access_logs.value.enabled, true)
  ..   
────────────────────────────────────────



terraform-aws-modules/vpc/aws/main.tf (terraform)
=================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:340
   via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:323
   via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:221
   via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:204
   via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=2

@dependabot dependabot bot force-pushed the dependabot/terraform/terraform/environments/analytical-platform-ingestion/terraform-aws-modules/iam/aws-5.48.0 branch from 8badb7e to 75c0f7d Compare November 13, 2024 17:32
Copy link
Contributor

Trivy Scan Failed

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-13T17:35:11Z INFO [vulndb] Need to update DB
2024-11-13T17:35:11Z INFO [vulndb] Downloading vulnerability DB...
2024-11-13T17:35:11Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-13T17:35:13Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-13T17:35:13Z INFO [vuln] Vulnerability scanning is enabled
2024-11-13T17:35:13Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-13T17:35:13Z INFO [misconfig] Need to update the built-in checks
2024-11-13T17:35:13Z INFO [misconfig] Downloading the built-in checks...
160.60 KiB / 160.60 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2024-11-13T17:35:14Z INFO [secret] Secret scanning is enabled
2024-11-13T17:35:14Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T17:35:14Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T17:35:15Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-13T17:35:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-13T17:35:15Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-13T17:35:15Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-13T17:35:15Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:21Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-13T17:35:21Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-13T17:35:21Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-13T17:35:21Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-13T17:35:21Z INFO Number of language-specific files num=0
2024-11-13T17:35:21Z INFO Detected config files num=8

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 ┌ resource "aws_lb" "this" {
13 │ count = local.create ? 1 : 0
14 │
15 │ dynamic "access_logs" {
16 │ for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
17 │
18 │ content {
19 │ bucket = access_logs.value.bucket
20 └ enabled = try(access_logs.value.enabled, true)
..
────────────────────────────────────────

git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
2024-11-13T17:35:21Z INFO [vuln] Vulnerability scanning is enabled
2024-11-13T17:35:21Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-13T17:35:21Z INFO [secret] Secret scanning is enabled
2024-11-13T17:35:21Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T17:35:21Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T17:35:22Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-13T17:35:22Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="cidr_blocks, egress_bucket, egress_bucket_kms_key, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-13T17:35:22Z INFO Number of language-specific files num=0
2024-11-13T17:35:22Z INFO Detected config files num=1
trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
2024-11-13T17:35:22Z INFO [vuln] Vulnerability scanning is enabled
2024-11-13T17:35:22Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-13T17:35:22Z INFO [secret] Secret scanning is enabled
2024-11-13T17:35:22Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T17:35:22Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T17:35:23Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-13T17:35:23Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="cidr_blocks, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-13T17:35:23Z INFO Number of language-specific files num=0
2024-11-13T17:35:23Z INFO Detected config files num=1
trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-13T17:35:23Z INFO [vuln] Vulnerability scanning is enabled
2024-11-13T17:35:23Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-13T17:35:23Z INFO [secret] Secret scanning is enabled
2024-11-13T17:35:23Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T17:35:23Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T17:35:24Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-13T17:35:24Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-13T17:35:24Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-13T17:35:24Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-13T17:35:24Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:27Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-13T17:35:27Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-13T17:35:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-13T17:35:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-13T17:35:27Z INFO Number of language-specific files num=0
2024-11-13T17:35:27Z INFO Detected config files num=6

terraform-aws-modules/alb/aws/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
terraform-aws-modules/alb/aws/main.tf:12-81
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 ┌ resource "aws_lb" "this" {
13 │ count = local.create ? 1 : 0
14 │
15 │ dynamic "access_logs" {
16 │ for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
17 │
18 │ content {
19 │ bucket = access_logs.value.bucket
20 └ enabled = try(access_logs.value.enabled, true)
..
────────────────────────────────────────

terraform-aws-modules/vpc/aws/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:340
via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:323
via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:221
via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:204
via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=2

</details> #### `Checkov Scan` Failed
<details><summary>Show Output</summary>

```hcl

*****************************

Checkov will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-13 17:35:29,766 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,766 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,766 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,767 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,767 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,767 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,767 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,767 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,767 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,767 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,768 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,768 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,768 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,768 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,768 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,768 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,769 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:29,784 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-13 17:35:29,786 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 198, Failed checks: 2, Skipped checks: 74

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_route53_resolver_associations
	File: /route53-resolver-associations.tf:1-13
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_route53_resolver_associations" {
		2  | 
		3  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-rule-associations"
		4  |   version = "4.1.0"
		5  | 
		6  |   vpc_id = module.connected_vpc.vpc_id
		7  | 
		8  |   resolver_rule_associations = {
		9  |     mojo-dns-resolver-dom1-infra-int = {
		10 |       resolver_rule_id = aws_route53_resolver_rule.mojo_dns_resolver_dom1_infra_int.id
		11 |     }
		12 |   }
		13 | }

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_outbound_route53_resolver_endpoint
	File: /route53-resolver-endpoints.tf:1-27
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_outbound_route53_resolver_endpoint" {
		2  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-endpoints"
		3  |   version = "4.1.0"
		4  | 
		5  |   name      = "connected-vpc-outbound"
		6  |   vpc_id    = module.connected_vpc.vpc_id
		7  |   direction = "OUTBOUND"
		8  |   protocols = ["Do53"]
		9  | 
		10 |   ip_address = [
		11 |     {
		12 |       subnet_id = module.connected_vpc.private_subnets[0]
		13 |     },
		14 |     {
		15 |       subnet_id = module.connected_vpc.private_subnets[1]
		16 |     }
		17 |   ]
		18 | 
		19 |   security_group_ingress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
		20 |   security_group_egress_cidr_blocks = [
		21 |     /* MoJO DNS Resolver Service */
		22 |     "10.180.80.5/32",
		23 |     "10.180.81.5/32"
		24 |   ]
		25 | 
		26 |   tags = local.tags
		27 | }

checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-13 17:35:32,789 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:32,789 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:32,802 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-13 17:35:32,802 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 22, Failed checks: 0, Skipped checks: 6


checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-13 17:35:35,668 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:35,668 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:35,687 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-13 17:35:35,687 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 22, Failed checks: 0, Skipped checks: 6


checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-13 17:35:38,433 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,433 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,433 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,433 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,433 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,434 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,434 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,434 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,434 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,434 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,434 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,434 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,435 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,435 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,435 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,435 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,435 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-13 17:35:38,451 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 vertices
2024-11-13 17:35:38,455 [MainThread  ] [WARNI]  [ArmLocalGraph] created 0 edges
terraform scan results:

Passed checks: 198, Failed checks: 2, Skipped checks: 74

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_route53_resolver_associations
	File: /route53-resolver-associations.tf:1-13
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_route53_resolver_associations" {
		2  | 
		3  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-rule-associations"
		4  |   version = "4.1.0"
		5  | 
		6  |   vpc_id = module.connected_vpc.vpc_id
		7  | 
		8  |   resolver_rule_associations = {
		9  |     mojo-dns-resolver-dom1-infra-int = {
		10 |       resolver_rule_id = aws_route53_resolver_rule.mojo_dns_resolver_dom1_infra_int.id
		11 |     }
		12 |   }
		13 | }

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_outbound_route53_resolver_endpoint
	File: /route53-resolver-endpoints.tf:1-27
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_outbound_route53_resolver_endpoint" {
		2  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-endpoints"
		3  |   version = "4.1.0"
		4  | 
		5  |   name      = "connected-vpc-outbound"
		6  |   vpc_id    = module.connected_vpc.vpc_id
		7  |   direction = "OUTBOUND"
		8  |   protocols = ["Do53"]
		9  | 
		10 |   ip_address = [
		11 |     {
		12 |       subnet_id = module.connected_vpc.private_subnets[0]
		13 |     },
		14 |     {
		15 |       subnet_id = module.connected_vpc.private_subnets[1]
		16 |     }
		17 |   ]
		18 | 
		19 |   security_group_ingress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
		20 |   security_group_egress_cidr_blocks = [
		21 |     /* MoJO DNS Resolver Service */
		22 |     "10.180.80.5/32",
		23 |     "10.180.81.5/32"
		24 |   ]
		25 | 
		26 |   tags = local.tags
		27 | }

checkov_exitcode=2

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing "terraform" plugin...
Installed "terraform" (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.9.1)
tflint will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Failed

Show Output
*****************************

Trivy will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-13T17:35:11Z	INFO	[vulndb] Need to update DB
2024-11-13T17:35:11Z	INFO	[vulndb] Downloading vulnerability DB...
2024-11-13T17:35:11Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-13T17:35:13Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-13T17:35:13Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-13T17:35:13Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-13T17:35:13Z	INFO	[misconfig] Need to update the built-in checks
2024-11-13T17:35:13Z	INFO	[misconfig] Downloading the built-in checks...
160.60 KiB / 160.60 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2024-11-13T17:35:14Z	INFO	[secret] Secret scanning is enabled
2024-11-13T17:35:14Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T17:35:14Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T17:35:15Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-13T17:35:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-13T17:35:15Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-13T17:35:15Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-13T17:35:15Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:21Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-13T17:35:21Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-13T17:35:21Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-13T17:35:21Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-13T17:35:21Z	INFO	Number of language-specific files	num=0
2024-11-13T17:35:21Z	INFO	Detected config files	num=8

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)
===============================================================================================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81
   via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12resource "aws_lb" "this" {
  13count = local.create ? 1 : 0
  1415dynamic "access_logs" {
  16for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
  1718content {
  19bucket  = access_logs.value.bucket
  20enabled = try(access_logs.value.enabled, true)
  ..   
────────────────────────────────────────



git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)
===============================================================================================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
2024-11-13T17:35:21Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-13T17:35:21Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-13T17:35:21Z	INFO	[secret] Secret scanning is enabled
2024-11-13T17:35:21Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T17:35:21Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T17:35:22Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-13T17:35:22Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="cidr_blocks, egress_bucket, egress_bucket_kms_key, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-13T17:35:22Z	INFO	Number of language-specific files	num=0
2024-11-13T17:35:22Z	INFO	Detected config files	num=1
trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
2024-11-13T17:35:22Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-13T17:35:22Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-13T17:35:22Z	INFO	[secret] Secret scanning is enabled
2024-11-13T17:35:22Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T17:35:22Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T17:35:23Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-13T17:35:23Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="cidr_blocks, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-13T17:35:23Z	INFO	Number of language-specific files	num=0
2024-11-13T17:35:23Z	INFO	Detected config files	num=1
trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-13T17:35:23Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-13T17:35:23Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-13T17:35:23Z	INFO	[secret] Secret scanning is enabled
2024-11-13T17:35:23Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-13T17:35:23Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-13T17:35:24Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-13T17:35:24Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-13T17:35:24Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-13T17:35:24Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-13T17:35:24Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:25Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-13T17:35:27Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-13T17:35:27Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-13T17:35:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-13T17:35:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-13T17:35:27Z	INFO	Number of language-specific files	num=0
2024-11-13T17:35:27Z	INFO	Detected config files	num=6

terraform-aws-modules/alb/aws/main.tf (terraform)
=================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 terraform-aws-modules/alb/aws/main.tf:12-81
   via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12resource "aws_lb" "this" {
  13 │   count = local.create ? 1 : 0
  1415 │   dynamic "access_logs" {
  16 │     for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
  1718 │     content {
  19 │       bucket  = access_logs.value.bucket
  20 └       enabled = try(access_logs.value.enabled, true)
  ..   
────────────────────────────────────────



terraform-aws-modules/vpc/aws/main.tf (terraform)
=================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:340
   via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:323
   via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:221
   via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:204
   via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=2

Bumps [terraform-aws-modules/iam/aws](https://github.com/terraform-aws-modules/terraform-aws-iam) from 5.44.1 to 5.48.0.
- [Release notes](https://github.com/terraform-aws-modules/terraform-aws-iam/releases)
- [Changelog](https://github.com/terraform-aws-modules/terraform-aws-iam/blob/master/CHANGELOG.md)
- [Commits](terraform-aws-modules/terraform-aws-iam@v5.44.1...v5.48.0)

---
updated-dependencies:
- dependency-name: terraform-aws-modules/iam/aws
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/terraform/terraform/environments/analytical-platform-ingestion/terraform-aws-modules/iam/aws-5.48.0 branch from 75c0f7d to 09e83a1 Compare November 25, 2024 09:58
Copy link
Contributor

Trivy Scan Failed

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-25T10:01:02Z INFO [vulndb] Need to update DB
2024-11-25T10:01:02Z INFO [vulndb] Downloading vulnerability DB...
2024-11-25T10:01:02Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T10:01:04Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T10:01:04Z INFO [vuln] Vulnerability scanning is enabled
2024-11-25T10:01:04Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-25T10:01:04Z INFO [misconfig] Need to update the built-in checks
2024-11-25T10:01:04Z INFO [misconfig] Downloading the built-in checks...
2024-11-25T10:01:04Z ERROR [misconfig] Falling back to embedded checks err="failed to download built-in policies: download error: oci download error: failed to fetch the layer: GET https://ghcr.io/v2/aquasecurity/trivy-checks/blobs/sha256:16442a4593a0395452e678ef699a880eec94d9211dfc887d52574beb78b95030: TOOMANYREQUESTS: retry-after: 307.679µs, allowed: 44000/minute"
2024-11-25T10:01:04Z INFO [secret] Secret scanning is enabled
2024-11-25T10:01:04Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T10:01:04Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T10:01:05Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-25T10:01:05Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-25T10:01:05Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-25T10:01:05Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-25T10:01:05Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:11Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-25T10:01:11Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-25T10:01:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T10:01:11Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T10:01:11Z INFO Number of language-specific files num=0
2024-11-25T10:01:11Z INFO Detected config files num=8

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 ┌ resource "aws_lb" "this" {
13 │ count = local.create ? 1 : 0
14 │
15 │ dynamic "access_logs" {
16 │ for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
17 │
18 │ content {
19 │ bucket = access_logs.value.bucket
20 └ enabled = try(access_logs.value.enabled, true)
..
────────────────────────────────────────

git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
2024-11-25T10:01:11Z INFO [vuln] Vulnerability scanning is enabled
2024-11-25T10:01:11Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-25T10:01:11Z INFO [misconfig] Need to update the built-in checks
2024-11-25T10:01:11Z INFO [misconfig] Downloading the built-in checks...
2024-11-25T10:01:11Z ERROR [misconfig] Falling back to embedded checks err="failed to download built-in policies: download error: oci download error: failed to fetch the layer: GET https://ghcr.io/v2/aquasecurity/trivy-checks/blobs/sha256:16442a4593a0395452e678ef699a880eec94d9211dfc887d52574beb78b95030: TOOMANYREQUESTS: retry-after: 209.033µs, allowed: 44000/minute"
2024-11-25T10:01:11Z INFO [secret] Secret scanning is enabled
2024-11-25T10:01:11Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T10:01:11Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T10:01:12Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-25T10:01:12Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="cidr_blocks, egress_bucket, egress_bucket_kms_key, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-25T10:01:12Z INFO Number of language-specific files num=0
2024-11-25T10:01:12Z INFO Detected config files num=1
trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
2024-11-25T10:01:12Z INFO [vuln] Vulnerability scanning is enabled
2024-11-25T10:01:12Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-25T10:01:12Z INFO [misconfig] Need to update the built-in checks
2024-11-25T10:01:12Z INFO [misconfig] Downloading the built-in checks...
2024-11-25T10:01:12Z ERROR [misconfig] Falling back to embedded checks err="failed to download built-in policies: download error: OCI repository error: 1 error occurred:\n\t* GET https://ghcr.io/v2/aquasecurity/trivy-checks/manifests/1: TOOMANYREQUESTS: retry-after: 112.771µs, allowed: 44000/minute\n\n"
2024-11-25T10:01:12Z INFO [secret] Secret scanning is enabled
2024-11-25T10:01:12Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T10:01:12Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T10:01:13Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-25T10:01:13Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="cidr_blocks, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-25T10:01:13Z INFO Number of language-specific files num=0
2024-11-25T10:01:13Z INFO Detected config files num=1
trivy_exitcode=1


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-25T10:01:13Z INFO [vuln] Vulnerability scanning is enabled
2024-11-25T10:01:13Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-25T10:01:13Z INFO [misconfig] Need to update the built-in checks
2024-11-25T10:01:13Z INFO [misconfig] Downloading the built-in checks...
2024-11-25T10:01:13Z ERROR [misconfig] Falling back to embedded checks err="failed to download built-in policies: download error: oci download error: failed to fetch the layer: GET https://ghcr.io/v2/aquasecurity/trivy-checks/blobs/sha256:16442a4593a0395452e678ef699a880eec94d9211dfc887d52574beb78b95030: TOOMANYREQUESTS: retry-after: 476.866µs, allowed: 44000/minute"
2024-11-25T10:01:13Z INFO [secret] Secret scanning is enabled
2024-11-25T10:01:13Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T10:01:13Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T10:01:14Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-25T10:01:14Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-25T10:01:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-25T10:01:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-25T10:01:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-25T10:01:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:16Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-25T10:01:16Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-25T10:01:16Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-25T10:01:16Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-25T10:01:16Z INFO Number of language-specific files num=0
2024-11-25T10:01:16Z INFO Detected config files num=6

terraform-aws-modules/alb/aws/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
terraform-aws-modules/alb/aws/main.tf:12-81
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 ┌ resource "aws_lb" "this" {
13 │ count = local.create ? 1 : 0
14 │
15 │ dynamic "access_logs" {
16 │ for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
17 │
18 │ content {
19 │ bucket = access_logs.value.bucket
20 └ enabled = try(access_logs.value.enabled, true)
..
────────────────────────────────────────

terraform-aws-modules/vpc/aws/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:340
via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:323
via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:221
via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
terraform-aws-modules/vpc/aws/main.tf:204
via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=2

</details> #### `Checkov Scan` Failed
<details><summary>Show Output</summary>

```hcl

*****************************

Checkov will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-25 10:01:19,179 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,179 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,179 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,179 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,179 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,179 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,179 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,180 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,180 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,180 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,180 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,180 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,180 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,180 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,181 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,181 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:19,181 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:20,212 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,229 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'0': 'each.value.egress_bucket_kms_key'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${var.landing_bucket}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,246 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,337 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,354 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'0': 'each.value.egress_bucket_kms_key'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${var.landing_bucket}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,371 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,457 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,474 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'0': 'each.value.egress_bucket_kms_key'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${var.landing_bucket}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,491 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,615 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,633 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'0': 'each.value.egress_bucket_kms_key'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${var.landing_bucket}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:20,650 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
terraform scan results:

Passed checks: 198, Failed checks: 2, Skipped checks: 74

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_route53_resolver_associations
	File: /route53-resolver-associations.tf:1-13
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_route53_resolver_associations" {
		2  | 
		3  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-rule-associations"
		4  |   version = "4.1.0"
		5  | 
		6  |   vpc_id = module.connected_vpc.vpc_id
		7  | 
		8  |   resolver_rule_associations = {
		9  |     mojo-dns-resolver-dom1-infra-int = {
		10 |       resolver_rule_id = aws_route53_resolver_rule.mojo_dns_resolver_dom1_infra_int.id
		11 |     }
		12 |   }
		13 | }

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_outbound_route53_resolver_endpoint
	File: /route53-resolver-endpoints.tf:1-27
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_outbound_route53_resolver_endpoint" {
		2  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-endpoints"
		3  |   version = "4.1.0"
		4  | 
		5  |   name      = "connected-vpc-outbound"
		6  |   vpc_id    = module.connected_vpc.vpc_id
		7  |   direction = "OUTBOUND"
		8  |   protocols = ["Do53"]
		9  | 
		10 |   ip_address = [
		11 |     {
		12 |       subnet_id = module.connected_vpc.private_subnets[0]
		13 |     },
		14 |     {
		15 |       subnet_id = module.connected_vpc.private_subnets[1]
		16 |     }
		17 |   ]
		18 | 
		19 |   security_group_ingress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
		20 |   security_group_egress_cidr_blocks = [
		21 |     /* MoJO DNS Resolver Service */
		22 |     "10.180.80.5/32",
		23 |     "10.180.81.5/32"
		24 |   ]
		25 | 
		26 |   tags = local.tags
		27 | }

checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-25 10:01:22,942 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:22,942 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 22, Failed checks: 0, Skipped checks: 6


checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-25 10:01:25,769 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:25,770 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 22, Failed checks: 0, Skipped checks: 6


checkov_exitcode=1

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-25 10:01:28,300 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,300 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,300 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,300 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,300 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,301 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,301 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,301 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,301 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,301 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,301 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,301 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,302 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,302 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,302 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,302 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:28,302 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 10:01:29,314 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,332 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.egress_bucket_kms_key}', 'statement.0.resources.1': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,349 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'0': 'each.value.egress_bucket_kms_key'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,440 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,457 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.egress_bucket_kms_key}', 'statement.0.resources.1': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,474 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'0': 'each.value.egress_bucket_kms_key'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,560 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,577 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.egress_bucket_kms_key}', 'statement.0.resources.1': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,595 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'0': 'each.value.egress_bucket_kms_key'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,702 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,720 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.egress_bucket_kms_key}', 'statement.0.resources.1': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 10:01:29,738 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'0': 'each.value.egress_bucket_kms_key'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
terraform scan results:

Passed checks: 198, Failed checks: 2, Skipped checks: 74

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_route53_resolver_associations
	File: /route53-resolver-associations.tf:1-13
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_route53_resolver_associations" {
		2  | 
		3  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-rule-associations"
		4  |   version = "4.1.0"
		5  | 
		6  |   vpc_id = module.connected_vpc.vpc_id
		7  | 
		8  |   resolver_rule_associations = {
		9  |     mojo-dns-resolver-dom1-infra-int = {
		10 |       resolver_rule_id = aws_route53_resolver_rule.mojo_dns_resolver_dom1_infra_int.id
		11 |     }
		12 |   }
		13 | }

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_outbound_route53_resolver_endpoint
	File: /route53-resolver-endpoints.tf:1-27
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_outbound_route53_resolver_endpoint" {
		2  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-endpoints"
		3  |   version = "4.1.0"
		4  | 
		5  |   name      = "connected-vpc-outbound"
		6  |   vpc_id    = module.connected_vpc.vpc_id
		7  |   direction = "OUTBOUND"
		8  |   protocols = ["Do53"]
		9  | 
		10 |   ip_address = [
		11 |     {
		12 |       subnet_id = module.connected_vpc.private_subnets[0]
		13 |     },
		14 |     {
		15 |       subnet_id = module.connected_vpc.private_subnets[1]
		16 |     }
		17 |   ]
		18 | 
		19 |   security_group_ingress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
		20 |   security_group_egress_cidr_blocks = [
		21 |     /* MoJO DNS Resolver Service */
		22 |     "10.180.80.5/32",
		23 |     "10.180.81.5/32"
		24 |   ]
		25 | 
		26 |   tags = local.tags
		27 | }

checkov_exitcode=2

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing "terraform" plugin...
Installed "terraform" (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.9.1)
tflint will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Failed

Show Output
*****************************

Trivy will check the following folders:
terraform/environments/analytical-platform-ingestion
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
terraform/environments/analytical-platform-ingestion

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-25T10:01:02Z	INFO	[vulndb] Need to update DB
2024-11-25T10:01:02Z	INFO	[vulndb] Downloading vulnerability DB...
2024-11-25T10:01:02Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T10:01:04Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T10:01:04Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-25T10:01:04Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-25T10:01:04Z	INFO	[misconfig] Need to update the built-in checks
2024-11-25T10:01:04Z	INFO	[misconfig] Downloading the built-in checks...
2024-11-25T10:01:04Z	ERROR	[misconfig] Falling back to embedded checks	err="failed to download built-in policies: download error: oci download error: failed to fetch the layer: GET https://ghcr.io/v2/aquasecurity/trivy-checks/blobs/sha256:16442a4593a0395452e678ef699a880eec94d9211dfc887d52574beb78b95030: TOOMANYREQUESTS: retry-after: 307.679µs, allowed: 44000/minute"
2024-11-25T10:01:04Z	INFO	[secret] Secret scanning is enabled
2024-11-25T10:01:04Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T10:01:04Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T10:01:05Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-25T10:01:05Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-25T10:01:05Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-25T10:01:05Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-25T10:01:05Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:11Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-25T10:01:11Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-25T10:01:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T10:01:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T10:01:11Z	INFO	Number of language-specific files	num=0
2024-11-25T10:01:11Z	INFO	Detected config files	num=8

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)
===============================================================================================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81
   via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12resource "aws_lb" "this" {
  13count = local.create ? 1 : 0
  1415dynamic "access_logs" {
  16for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
  1718content {
  19bucket  = access_logs.value.bucket
  20enabled = try(access_logs.value.enabled, true)
  ..   
────────────────────────────────────────



git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)
===============================================================================================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user-with-egress
2024-11-25T10:01:11Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-25T10:01:11Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-25T10:01:11Z	INFO	[misconfig] Need to update the built-in checks
2024-11-25T10:01:11Z	INFO	[misconfig] Downloading the built-in checks...
2024-11-25T10:01:11Z	ERROR	[misconfig] Falling back to embedded checks	err="failed to download built-in policies: download error: oci download error: failed to fetch the layer: GET https://ghcr.io/v2/aquasecurity/trivy-checks/blobs/sha256:16442a4593a0395452e678ef699a880eec94d9211dfc887d52574beb78b95030: TOOMANYREQUESTS: retry-after: 209.033µs, allowed: 44000/minute"
2024-11-25T10:01:11Z	INFO	[secret] Secret scanning is enabled
2024-11-25T10:01:11Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T10:01:11Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T10:01:12Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-25T10:01:12Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="cidr_blocks, egress_bucket, egress_bucket_kms_key, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-25T10:01:12Z	INFO	Number of language-specific files	num=0
2024-11-25T10:01:12Z	INFO	Detected config files	num=1
trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion/modules/transfer-family/user
2024-11-25T10:01:12Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-25T10:01:12Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-25T10:01:12Z	INFO	[misconfig] Need to update the built-in checks
2024-11-25T10:01:12Z	INFO	[misconfig] Downloading the built-in checks...
2024-11-25T10:01:12Z	ERROR	[misconfig] Falling back to embedded checks	err="failed to download built-in policies: download error: OCI repository error: 1 error occurred:\n\t* GET https://ghcr.io/v2/aquasecurity/trivy-checks/manifests/1: TOOMANYREQUESTS: retry-after: 112.771µs, allowed: 44000/minute\n\n"
2024-11-25T10:01:12Z	INFO	[secret] Secret scanning is enabled
2024-11-25T10:01:12Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T10:01:12Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T10:01:13Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-25T10:01:13Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="cidr_blocks, landing_bucket, landing_bucket_kms_key, name, ssh_key, supplier_data_kms_key, transfer_server, transfer_server_security_group"
2024-11-25T10:01:13Z	INFO	Number of language-specific files	num=0
2024-11-25T10:01:13Z	INFO	Detected config files	num=1
trivy_exitcode=1

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-25T10:01:13Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-25T10:01:13Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-25T10:01:13Z	INFO	[misconfig] Need to update the built-in checks
2024-11-25T10:01:13Z	INFO	[misconfig] Downloading the built-in checks...
2024-11-25T10:01:13Z	ERROR	[misconfig] Falling back to embedded checks	err="failed to download built-in policies: download error: oci download error: failed to fetch the layer: GET https://ghcr.io/v2/aquasecurity/trivy-checks/blobs/sha256:16442a4593a0395452e678ef699a880eec94d9211dfc887d52574beb78b95030: TOOMANYREQUESTS: retry-after: 476.866µs, allowed: 44000/minute"
2024-11-25T10:01:13Z	INFO	[secret] Secret scanning is enabled
2024-11-25T10:01:13Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T10:01:13Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T10:01:14Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-25T10:01:14Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-25T10:01:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-25T10:01:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-25T10:01:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-25T10:01:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T10:01:16Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-25T10:01:16Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="terraform-aws-modules/s3-bucket/aws/main.tf:176-198"
2024-11-25T10:01:16Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-25T10:01:16Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-25T10:01:16Z	INFO	Number of language-specific files	num=0
2024-11-25T10:01:16Z	INFO	Detected config files	num=6

terraform-aws-modules/alb/aws/main.tf (terraform)
=================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 terraform-aws-modules/alb/aws/main.tf:12-81
   via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12resource "aws_lb" "this" {
  13 │   count = local.create ? 1 : 0
  1415 │   dynamic "access_logs" {
  16 │     for_each = length(var.access_logs) > 0 ? [var.access_logs] : []
  1718 │     content {
  19 │       bucket  = access_logs.value.bucket
  20 └       enabled = try(access_logs.value.enabled, true)
  ..   
────────────────────────────────────────



terraform-aws-modules/vpc/aws/main.tf (terraform)
=================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:340
   via terraform-aws-modules/vpc/aws/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:323
   via terraform-aws-modules/vpc/aws/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:221
   via terraform-aws-modules/vpc/aws/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 terraform-aws-modules/vpc/aws/main.tf:204
   via terraform-aws-modules/vpc/aws/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=2

@wullub wullub closed this Dec 2, 2024
@wullub wullub deleted the dependabot/terraform/terraform/environments/analytical-platform-ingestion/terraform-aws-modules/iam/aws-5.48.0 branch December 2, 2024 14:33
Copy link
Contributor Author

dependabot bot commented on behalf of github Dec 2, 2024

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file environments-repository Used to exclude PRs from this repo in our Slack PR update terraform Pull requests that update Terraform code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant