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

EM: Lakeformation for Cloud platform roles #9186

Open
wants to merge 66 commits into
base: main
Choose a base branch
from
Open

Conversation

matt-heery
Copy link
Contributor

@matt-heery matt-heery commented Dec 24, 2024

Adds lake formation set up to allow cloud platform to see all the appropriate tables.

@matt-heery matt-heery requested review from a team as code owners December 24, 2024 10:16
@github-actions github-actions bot added the environments-repository Used to exclude PRs from this repo in our Slack PR update label Dec 24, 2024
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data


Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:18:33Z INFO [vulndb] Need to update DB
2024-12-24T10:18:33Z INFO [vulndb] Downloading vulnerability DB...
2024-12-24T10:18:33Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:18:35Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:18:35Z INFO [vuln] Vulnerability scanning is enabled
2024-12-24T10:18:35Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-24T10:18:35Z INFO [misconfig] Need to update the built-in checks
2024-12-24T10:18:35Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:18:36Z INFO [secret] Secret scanning is enabled
2024-12-24T10:18:36Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:18:36Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:18:37Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-24T10:18:37Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-12-24T10:18:38Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:18:49Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:18:49Z INFO Number of language-specific files num=0
2024-12-24T10:18:49Z INFO Detected config files num=14
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-24 10:18:51,910 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:18:51,910 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:18:51,910 [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-12-24 10:18:51,910 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-12-24 10:18:51,910 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2611, Failed checks: 0, Skipped checks: 115


checkov_exitcode=0

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/electronic-monitoring-data

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:18:33Z	INFO	[vulndb] Need to update DB
2024-12-24T10:18:33Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-24T10:18:33Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:18:35Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:18:35Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-24T10:18:35Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-24T10:18:35Z	INFO	[misconfig] Need to update the built-in checks
2024-12-24T10:18:35Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:18:36Z	INFO	[secret] Secret scanning is enabled
2024-12-24T10:18:36Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:18:36Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:18:37Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-24T10:18:37Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-12-24T10:18:38Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:38Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:18:40Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:18:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:18:49Z	INFO	Number of language-specific files	num=0
2024-12-24T10:18:49Z	INFO	Detected config files	num=14
trivy_exitcode=0

Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data


Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:31:24Z INFO [vulndb] Need to update DB
2024-12-24T10:31:24Z INFO [vulndb] Downloading vulnerability DB...
2024-12-24T10:31:24Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:31:26Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:31:26Z INFO [vuln] Vulnerability scanning is enabled
2024-12-24T10:31:26Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-24T10:31:26Z INFO [misconfig] Need to update the built-in checks
2024-12-24T10:31:26Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:31:26Z INFO [secret] Secret scanning is enabled
2024-12-24T10:31:26Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:31:26Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:31:28Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-24T10:31:28Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:31Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:31Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:31Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:31:39Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:31:40Z INFO Number of language-specific files num=0
2024-12-24T10:31:40Z INFO Detected config files num=14
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-24 10:31:42,385 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:31:42,385 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:31:42,386 [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-12-24 10:31:42,386 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-12-24 10:31:42,386 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2611, Failed checks: 0, Skipped checks: 115


checkov_exitcode=0

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/electronic-monitoring-data

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:31:24Z	INFO	[vulndb] Need to update DB
2024-12-24T10:31:24Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-24T10:31:24Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:31:26Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:31:26Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-24T10:31:26Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-24T10:31:26Z	INFO	[misconfig] Need to update the built-in checks
2024-12-24T10:31:26Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:31:26Z	INFO	[secret] Secret scanning is enabled
2024-12-24T10:31:26Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:31:26Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:31:28Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-24T10:31:28Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:29Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:30Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:31Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:31Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:31:31Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:31:39Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:31:40Z	INFO	Number of language-specific files	num=0
2024-12-24T10:31:40Z	INFO	Detected config files	num=14
trivy_exitcode=0

@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-development December 24, 2024 10:33 — with GitHub Actions Failure
@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-test December 24, 2024 10:33 — with GitHub Actions Failure
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data


Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:33:55Z INFO [vulndb] Need to update DB
2024-12-24T10:33:55Z INFO [vulndb] Downloading vulnerability DB...
2024-12-24T10:33:55Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:33:57Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:33:57Z INFO [vuln] Vulnerability scanning is enabled
2024-12-24T10:33:57Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-24T10:33:57Z INFO [misconfig] Need to update the built-in checks
2024-12-24T10:33:57Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:33:58Z INFO [secret] Secret scanning is enabled
2024-12-24T10:33:58Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:33:58Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:33:59Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-24T10:33:59Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-12-24T10:34:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:34:11Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:34:11Z INFO Number of language-specific files num=0
2024-12-24T10:34:11Z INFO Detected config files num=14
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-24 10:34:13,868 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:34:13,868 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:34:13,868 [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-12-24 10:34:13,868 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-12-24 10:34:13,868 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2611, Failed checks: 0, Skipped checks: 115


checkov_exitcode=0

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/electronic-monitoring-data

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:33:55Z	INFO	[vulndb] Need to update DB
2024-12-24T10:33:55Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-24T10:33:55Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:33:57Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:33:57Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-24T10:33:57Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-24T10:33:57Z	INFO	[misconfig] Need to update the built-in checks
2024-12-24T10:33:57Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:33:58Z	INFO	[secret] Secret scanning is enabled
2024-12-24T10:33:58Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:33:58Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:33:59Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-24T10:33:59Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-12-24T10:34:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:34:02Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:34:11Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:34:11Z	INFO	Number of language-specific files	num=0
2024-12-24T10:34:11Z	INFO	Detected config files	num=14
trivy_exitcode=0

@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-development December 24, 2024 10:43 — with GitHub Actions Failure
@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-test December 24, 2024 10:43 — with GitHub Actions Failure
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data


Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:43:54Z INFO [vulndb] Need to update DB
2024-12-24T10:43:54Z INFO [vulndb] Downloading vulnerability DB...
2024-12-24T10:43:54Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:43:56Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:43:56Z INFO [vuln] Vulnerability scanning is enabled
2024-12-24T10:43:56Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-24T10:43:56Z INFO [misconfig] Need to update the built-in checks
2024-12-24T10:43:56Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2024-12-24T10:43:56Z INFO [secret] Secret scanning is enabled
2024-12-24T10:43:56Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:43:56Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:43:58Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-24T10:43:58Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:44:09Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:44:09Z INFO Number of language-specific files num=0
2024-12-24T10:44:09Z INFO Detected config files num=14
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-24 10:44:12,030 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:44:12,030 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:44:12,030 [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-12-24 10:44:12,030 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-12-24 10:44:12,030 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2611, Failed checks: 0, Skipped checks: 115


checkov_exitcode=0

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/electronic-monitoring-data

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:43:54Z	INFO	[vulndb] Need to update DB
2024-12-24T10:43:54Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-24T10:43:54Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:43:56Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:43:56Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-24T10:43:56Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-24T10:43:56Z	INFO	[misconfig] Need to update the built-in checks
2024-12-24T10:43:56Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2024-12-24T10:43:56Z	INFO	[secret] Secret scanning is enabled
2024-12-24T10:43:56Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:43:56Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:43:58Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-24T10:43:58Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:43:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:44:00Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:44:09Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:44:09Z	INFO	Number of language-specific files	num=0
2024-12-24T10:44:09Z	INFO	Detected config files	num=14
trivy_exitcode=0

@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-development December 24, 2024 10:52 — with GitHub Actions Failure
@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-test December 24, 2024 10:52 — with GitHub Actions Failure
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data


Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:52:34Z INFO [vulndb] Need to update DB
2024-12-24T10:52:34Z INFO [vulndb] Downloading vulnerability DB...
2024-12-24T10:52:34Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:52:36Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:52:36Z INFO [vuln] Vulnerability scanning is enabled
2024-12-24T10:52:36Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-24T10:52:36Z INFO [misconfig] Need to update the built-in checks
2024-12-24T10:52:36Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:52:36Z INFO [secret] Secret scanning is enabled
2024-12-24T10:52:36Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:52:36Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:52:37Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-24T10:52:37Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:52:49Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:52:49Z INFO Number of language-specific files num=0
2024-12-24T10:52:49Z INFO Detected config files num=14
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-24 10:52:51,654 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:52:51,654 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:52:51,654 [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-12-24 10:52:51,654 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-12-24 10:52:51,654 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2611, Failed checks: 0, Skipped checks: 115


checkov_exitcode=0

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/electronic-monitoring-data

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:52:34Z	INFO	[vulndb] Need to update DB
2024-12-24T10:52:34Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-24T10:52:34Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:52:36Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:52:36Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-24T10:52:36Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-24T10:52:36Z	INFO	[misconfig] Need to update the built-in checks
2024-12-24T10:52:36Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:52:36Z	INFO	[secret] Secret scanning is enabled
2024-12-24T10:52:36Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:52:36Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:52:37Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-24T10:52:37Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:39Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:52:40Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:52:49Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:52:49Z	INFO	Number of language-specific files	num=0
2024-12-24T10:52:49Z	INFO	Detected config files	num=14
trivy_exitcode=0

@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-test December 24, 2024 10:58 — with GitHub Actions Failure
@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-development December 24, 2024 10:58 — with GitHub Actions Failure
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data


Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:58:41Z INFO [vulndb] Need to update DB
2024-12-24T10:58:41Z INFO [vulndb] Downloading vulnerability DB...
2024-12-24T10:58:41Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:58:44Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:58:44Z INFO [vuln] Vulnerability scanning is enabled
2024-12-24T10:58:44Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-24T10:58:44Z INFO [misconfig] Need to update the built-in checks
2024-12-24T10:58:44Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:58:45Z INFO [secret] Secret scanning is enabled
2024-12-24T10:58:45Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:58:45Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:58:46Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-24T10:58:47Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:59:01Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:59:01Z INFO Number of language-specific files num=0
2024-12-24T10:59:01Z INFO Detected config files num=14
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-24 10:59:04,205 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:59:04,205 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2024-12-24 10:59:04,205 [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-12-24 10:59:04,205 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-12-24 10:59:04,205 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2611, Failed checks: 0, Skipped checks: 115


checkov_exitcode=0

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/electronic-monitoring-data

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T10:58:41Z	INFO	[vulndb] Need to update DB
2024-12-24T10:58:41Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-24T10:58:41Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:58:44Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T10:58:44Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-24T10:58:44Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-24T10:58:44Z	INFO	[misconfig] Need to update the built-in checks
2024-12-24T10:58:44Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-24T10:58:45Z	INFO	[secret] Secret scanning is enabled
2024-12-24T10:58:45Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T10:58:45Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T10:58:46Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-24T10:58:47Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:49Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T10:58:52Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T10:59:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T10:59:01Z	INFO	Number of language-specific files	num=0
2024-12-24T10:59:01Z	INFO	Detected config files	num=14
trivy_exitcode=0

@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-test December 24, 2024 11:11 — with GitHub Actions Failure
@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-development December 24, 2024 11:11 — with GitHub Actions Failure
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data


Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T11:11:04Z INFO [vulndb] Need to update DB
2024-12-24T11:11:04Z INFO [vulndb] Downloading vulnerability DB...
2024-12-24T11:11:04Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T11:11:06Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T11:11:06Z INFO [vuln] Vulnerability scanning is enabled
2024-12-24T11:11:06Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-24T11:11:06Z INFO [misconfig] Need to update the built-in checks
2024-12-24T11:11:06Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2024-12-24T11:11:06Z INFO [secret] Secret scanning is enabled
2024-12-24T11:11:06Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T11:11:06Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T11:11:07Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-24T11:11:07Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-12-24T11:11:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T11:11:19Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T11:11:19Z INFO Number of language-specific files num=0
2024-12-24T11:11:19Z INFO Detected config files num=14
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-24 11:11:22,198 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2024-12-24 11:11:22,198 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2024-12-24 11:11:22,199 [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-12-24 11:11:22,199 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-12-24 11:11:22,199 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2611, Failed checks: 0, Skipped checks: 115


checkov_exitcode=0

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/electronic-monitoring-data

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data

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

Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-24T11:11:04Z	INFO	[vulndb] Need to update DB
2024-12-24T11:11:04Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-24T11:11:04Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T11:11:06Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-24T11:11:06Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-24T11:11:06Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-24T11:11:06Z	INFO	[misconfig] Need to update the built-in checks
2024-12-24T11:11:06Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2024-12-24T11:11:06Z	INFO	[secret] Secret scanning is enabled
2024-12-24T11:11:06Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-24T11:11:06Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-24T11:11:07Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-24T11:11:07Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-12-24T11:11:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-24T11:11:10Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-24T11:11:19Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-24T11:11:19Z	INFO	Number of language-specific files	num=0
2024-12-24T11:11:19Z	INFO	Detected config files	num=14
trivy_exitcode=0

@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-test December 24, 2024 11:12 — with GitHub Actions Failure
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation


Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-30T16:00:21Z INFO [vulndb] Need to update DB
2024-12-30T16:00:21Z INFO [vulndb] Downloading vulnerability DB...
2024-12-30T16:00:21Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-30T16:00:23Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-30T16:00:23Z INFO [vuln] Vulnerability scanning is enabled
2024-12-30T16:00:23Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-30T16:00:23Z INFO [misconfig] Need to update the built-in checks
2024-12-30T16:00:23Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-30T16:00:24Z INFO [secret] Secret scanning is enabled
2024-12-30T16:00:24Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:00:24Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:00:25Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-30T16:00:25Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-30T16:00:37Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-30T16:00:37Z INFO Number of language-specific files num=0
2024-12-30T16:00:37Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
2024-12-30T16:00:37Z INFO [vuln] Vulnerability scanning is enabled
2024-12-30T16:00:37Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-30T16:00:37Z INFO [secret] Secret scanning is enabled
2024-12-30T16:00:37Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:00:37Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:00:38Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-30T16:00:38Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_locations, databases_to_share, destination_account_id"
2024-12-30T16:00:38Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2024-12-30T16:00:38Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_location_share" value="cty.NilVal"
2024-12-30T16:00:38Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data" value="cty.NilVal"
2024-12-30T16:00:38Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_resource.data_location" value="cty.NilVal"
2024-12-30T16:00:38Z INFO Number of language-specific files num=0
2024-12-30T16:00:38Z INFO Detected config files num=1
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2024-12-30T16:00:38Z INFO [vuln] Vulnerability scanning is enabled
2024-12-30T16:00:38Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-30T16:00:38Z INFO [secret] Secret scanning is enabled
2024-12-30T16:00:38Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:00:38Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:00:39Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-30T16:00:39Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2024-12-30T16:00:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2024-12-30T16:00:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2024-12-30T16:00:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2024-12-30T16:00:39Z INFO Number of language-specific files num=0
2024-12-30T16:00:39Z INFO Detected config files num=1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-30 16:00:41,693 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2024-12-30 16:00:41,694 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2024-12-30 16:00:41,694 [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-12-30 16:00:41,694 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-12-30 16:00:41,694 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2625, Failed checks: 0, Skipped checks: 117


checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-30T16:00:21Z	INFO	[vulndb] Need to update DB
2024-12-30T16:00:21Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-30T16:00:21Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-30T16:00:23Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-30T16:00:23Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-30T16:00:23Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-30T16:00:23Z	INFO	[misconfig] Need to update the built-in checks
2024-12-30T16:00:23Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-30T16:00:24Z	INFO	[secret] Secret scanning is enabled
2024-12-30T16:00:24Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:00:24Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:00:25Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-30T16:00:25Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:26Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:27Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:00:28Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-30T16:00:37Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-30T16:00:37Z	INFO	Number of language-specific files	num=0
2024-12-30T16:00:37Z	INFO	Detected config files	num=14
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
2024-12-30T16:00:37Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-30T16:00:37Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-30T16:00:37Z	INFO	[secret] Secret scanning is enabled
2024-12-30T16:00:37Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:00:37Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:00:38Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-30T16:00:38Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_locations, databases_to_share, destination_account_id"
2024-12-30T16:00:38Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2024-12-30T16:00:38Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_location_share" value="cty.NilVal"
2024-12-30T16:00:38Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data" value="cty.NilVal"
2024-12-30T16:00:38Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_resource.data_location" value="cty.NilVal"
2024-12-30T16:00:38Z	INFO	Number of language-specific files	num=0
2024-12-30T16:00:38Z	INFO	Detected config files	num=1
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2024-12-30T16:00:38Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-30T16:00:38Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-30T16:00:38Z	INFO	[secret] Secret scanning is enabled
2024-12-30T16:00:38Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:00:38Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:00:39Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-30T16:00:39Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2024-12-30T16:00:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2024-12-30T16:00:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2024-12-30T16:00:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2024-12-30T16:00:39Z	INFO	Number of language-specific files	num=0
2024-12-30T16:00:39Z	INFO	Detected config files	num=1
trivy_exitcode=0

@matt-heery matt-heery temporarily deployed to electronic-monitoring-data-test December 30, 2024 16:02 — with GitHub Actions Inactive
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation


Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-30T16:02:45Z INFO [vulndb] Need to update DB
2024-12-30T16:02:45Z INFO [vulndb] Downloading vulnerability DB...
2024-12-30T16:02:45Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-30T16:02:47Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-30T16:02:47Z INFO [vuln] Vulnerability scanning is enabled
2024-12-30T16:02:47Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-30T16:02:47Z INFO [misconfig] Need to update the built-in checks
2024-12-30T16:02:47Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-30T16:02:48Z INFO [secret] Secret scanning is enabled
2024-12-30T16:02:48Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:02:48Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:02:49Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-30T16:02:49Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-30T16:03:01Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-30T16:03:01Z INFO Number of language-specific files num=0
2024-12-30T16:03:01Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
2024-12-30T16:03:01Z INFO [vuln] Vulnerability scanning is enabled
2024-12-30T16:03:01Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-30T16:03:01Z INFO [secret] Secret scanning is enabled
2024-12-30T16:03:01Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:03:01Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:03:02Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-30T16:03:02Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_locations, databases_to_share, destination_account_id"
2024-12-30T16:03:02Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2024-12-30T16:03:02Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_location_share" value="cty.NilVal"
2024-12-30T16:03:02Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data" value="cty.NilVal"
2024-12-30T16:03:02Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_resource.data_location" value="cty.NilVal"
2024-12-30T16:03:02Z INFO Number of language-specific files num=0
2024-12-30T16:03:02Z INFO Detected config files num=1
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2024-12-30T16:03:02Z INFO [vuln] Vulnerability scanning is enabled
2024-12-30T16:03:02Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-30T16:03:02Z INFO [secret] Secret scanning is enabled
2024-12-30T16:03:02Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:03:02Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:03:03Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-30T16:03:03Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2024-12-30T16:03:03Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2024-12-30T16:03:03Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2024-12-30T16:03:03Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2024-12-30T16:03:03Z INFO Number of language-specific files num=0
2024-12-30T16:03:03Z INFO Detected config files num=1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-30 16:03:05,793 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2024-12-30 16:03:05,793 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2024-12-30 16:03:05,793 [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-12-30 16:03:05,793 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-12-30 16:03:05,793 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2625, Failed checks: 0, Skipped checks: 117


checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Trivy in terraform/environments/electronic-monitoring-data
2024-12-30T16:02:45Z	INFO	[vulndb] Need to update DB
2024-12-30T16:02:45Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-30T16:02:45Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-30T16:02:47Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-30T16:02:47Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-30T16:02:47Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-30T16:02:47Z	INFO	[misconfig] Need to update the built-in checks
2024-12-30T16:02:47Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-30T16:02:48Z	INFO	[secret] Secret scanning is enabled
2024-12-30T16:02:48Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:02:48Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:02:49Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-30T16:02:49Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:50Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-30T16:02:52Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2024-12-30T16:03:01Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2024-12-30T16:03:01Z	INFO	Number of language-specific files	num=0
2024-12-30T16:03:01Z	INFO	Detected config files	num=14
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
2024-12-30T16:03:01Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-30T16:03:01Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-30T16:03:01Z	INFO	[secret] Secret scanning is enabled
2024-12-30T16:03:01Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:03:01Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:03:02Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-30T16:03:02Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_locations, databases_to_share, destination_account_id"
2024-12-30T16:03:02Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2024-12-30T16:03:02Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_location_share" value="cty.NilVal"
2024-12-30T16:03:02Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data" value="cty.NilVal"
2024-12-30T16:03:02Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_resource.data_location" value="cty.NilVal"
2024-12-30T16:03:02Z	INFO	Number of language-specific files	num=0
2024-12-30T16:03:02Z	INFO	Detected config files	num=1
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2024-12-30T16:03:02Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-30T16:03:02Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-30T16:03:02Z	INFO	[secret] Secret scanning is enabled
2024-12-30T16:03:02Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-30T16:03:02Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-30T16:03:03Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-30T16:03:03Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2024-12-30T16:03:03Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2024-12-30T16:03:03Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2024-12-30T16:03:03Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2024-12-30T16:03:03Z	INFO	Number of language-specific files	num=0
2024-12-30T16:03:03Z	INFO	Detected config files	num=1
trivy_exitcode=0

@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-development December 30, 2024 16:03 — with GitHub Actions Error
@matt-heery matt-heery temporarily deployed to electronic-monitoring-data-test December 31, 2024 12:49 — with GitHub Actions Inactive
@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-test January 2, 2025 11:17 — with GitHub Actions Failure
@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-development January 2, 2025 11:17 — with GitHub Actions Error
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation


Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T11:17:55Z INFO [vulndb] Need to update DB
2025-01-02T11:17:55Z INFO [vulndb] Downloading vulnerability DB...
2025-01-02T11:17:55Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T11:17:57Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T11:17:57Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T11:17:57Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T11:17:57Z INFO [misconfig] Need to update the built-in checks
2025-01-02T11:17:57Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2025-01-02T11:17:57Z INFO [secret] Secret scanning is enabled
2025-01-02T11:17:57Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T11:17:57Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T11:17:59Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T11:17:59Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:02Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T11:18:10Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T11:18:10Z INFO Number of language-specific files num=0
2025-01-02T11:18:10Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
2025-01-02T11:18:10Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T11:18:10Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T11:18:10Z INFO [secret] Secret scanning is enabled
2025-01-02T11:18:10Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T11:18:10Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T11:18:11Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T11:18:11Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_locations, databases_to_share, destination_account_id"
2025-01-02T11:18:11Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T11:18:11Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_location_share" value="cty.NilVal"
2025-01-02T11:18:11Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data" value="cty.NilVal"
2025-01-02T11:18:11Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_resource.data_location" value="cty.NilVal"
2025-01-02T11:18:11Z INFO Number of language-specific files num=0
2025-01-02T11:18:11Z INFO Detected config files num=1
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T11:18:12Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T11:18:12Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T11:18:12Z INFO [secret] Secret scanning is enabled
2025-01-02T11:18:12Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T11:18:12Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T11:18:13Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T11:18:13Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T11:18:13Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T11:18:13Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T11:18:13Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T11:18:13Z INFO Number of language-specific files num=0
2025-01-02T11:18:13Z INFO Detected config files num=1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2025-01-02 11:18:15,438 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2025-01-02 11:18:15,438 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2025-01-02 11:18:15,438 [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)
2025-01-02 11:18:15,438 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2025-01-02 11:18:15,438 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2625, Failed checks: 0, Skipped checks: 117


checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T11:17:55Z	INFO	[vulndb] Need to update DB
2025-01-02T11:17:55Z	INFO	[vulndb] Downloading vulnerability DB...
2025-01-02T11:17:55Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T11:17:57Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T11:17:57Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T11:17:57Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T11:17:57Z	INFO	[misconfig] Need to update the built-in checks
2025-01-02T11:17:57Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2025-01-02T11:17:57Z	INFO	[secret] Secret scanning is enabled
2025-01-02T11:17:57Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T11:17:57Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T11:17:59Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T11:17:59Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:00Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:01Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T11:18:02Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T11:18:10Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T11:18:10Z	INFO	Number of language-specific files	num=0
2025-01-02T11:18:10Z	INFO	Detected config files	num=14
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/analytical-platform-lakeformation
2025-01-02T11:18:10Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T11:18:10Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T11:18:10Z	INFO	[secret] Secret scanning is enabled
2025-01-02T11:18:10Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T11:18:10Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T11:18:11Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T11:18:11Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_locations, databases_to_share, destination_account_id"
2025-01-02T11:18:11Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T11:18:11Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_location_share" value="cty.NilVal"
2025-01-02T11:18:11Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data" value="cty.NilVal"
2025-01-02T11:18:11Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_resource.data_location" value="cty.NilVal"
2025-01-02T11:18:11Z	INFO	Number of language-specific files	num=0
2025-01-02T11:18:11Z	INFO	Detected config files	num=1
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T11:18:12Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T11:18:12Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T11:18:12Z	INFO	[secret] Secret scanning is enabled
2025-01-02T11:18:12Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T11:18:12Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T11:18:13Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T11:18:13Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T11:18:13Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T11:18:13Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T11:18:13Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T11:18:13Z	INFO	Number of language-specific files	num=0
2025-01-02T11:18:13Z	INFO	Detected config files	num=1
trivy_exitcode=0

Copy link
Contributor

github-actions bot commented Jan 2, 2025

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation


Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T12:30:52Z INFO [vulndb] Need to update DB
2025-01-02T12:30:52Z INFO [vulndb] Downloading vulnerability DB...
2025-01-02T12:30:52Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:30:54Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:30:54Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T12:30:54Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T12:30:54Z INFO [misconfig] Need to update the built-in checks
2025-01-02T12:30:54Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2025-01-02T12:30:55Z INFO [secret] Secret scanning is enabled
2025-01-02T12:30:55Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:30:55Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:30:56Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T12:30:56Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T12:31:08Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T12:31:08Z INFO Number of language-specific files num=0
2025-01-02T12:31:08Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T12:31:08Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T12:31:08Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T12:31:08Z INFO [secret] Secret scanning is enabled
2025-01-02T12:31:08Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:31:08Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:31:09Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T12:31:09Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T12:31:09Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T12:31:09Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T12:31:09Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T12:31:09Z INFO Number of language-specific files num=0
2025-01-02T12:31:09Z INFO Detected config files num=1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2025-01-02 12:31:12,070 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:31:12,071 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:31:12,071 [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)
2025-01-02 12:31:12,071 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/terraform-aws-analytical-platform-lakeformation?ref=32525da937012178e430585ac5a00f05193f58eb:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:31:12,071 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2025-01-02 12:31:12,071 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2625, Failed checks: 0, Skipped checks: 119


checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T12:30:52Z	INFO	[vulndb] Need to update DB
2025-01-02T12:30:52Z	INFO	[vulndb] Downloading vulnerability DB...
2025-01-02T12:30:52Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:30:54Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:30:54Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T12:30:54Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T12:30:54Z	INFO	[misconfig] Need to update the built-in checks
2025-01-02T12:30:54Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2025-01-02T12:30:55Z	INFO	[secret] Secret scanning is enabled
2025-01-02T12:30:55Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:30:55Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:30:56Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T12:30:56Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:58Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:30:59Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T12:31:08Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T12:31:08Z	INFO	Number of language-specific files	num=0
2025-01-02T12:31:08Z	INFO	Detected config files	num=14
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T12:31:08Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T12:31:08Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T12:31:08Z	INFO	[secret] Secret scanning is enabled
2025-01-02T12:31:08Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:31:08Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:31:09Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T12:31:09Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T12:31:09Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T12:31:09Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T12:31:09Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T12:31:09Z	INFO	Number of language-specific files	num=0
2025-01-02T12:31:09Z	INFO	Detected config files	num=1
trivy_exitcode=0

Copy link
Contributor

github-actions bot commented Jan 2, 2025

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation


Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T12:32:38Z INFO [vulndb] Need to update DB
2025-01-02T12:32:38Z INFO [vulndb] Downloading vulnerability DB...
2025-01-02T12:32:38Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:32:41Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:32:41Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T12:32:41Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T12:32:41Z INFO [misconfig] Need to update the built-in checks
2025-01-02T12:32:41Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2025-01-02T12:32:41Z INFO [secret] Secret scanning is enabled
2025-01-02T12:32:41Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:32:41Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:32:42Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T12:32:42Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T12:32:54Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T12:32:54Z INFO Number of language-specific files num=0
2025-01-02T12:32:54Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T12:32:54Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T12:32:54Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T12:32:54Z INFO [secret] Secret scanning is enabled
2025-01-02T12:32:54Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:32:54Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:32:55Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T12:32:55Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T12:32:55Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T12:32:55Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T12:32:55Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T12:32:55Z INFO Number of language-specific files num=0
2025-01-02T12:32:55Z INFO Detected config files num=1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2025-01-02 12:32:57,571 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:32:57,571 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:32:57,571 [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)
2025-01-02 12:32:57,572 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/terraform-aws-analytical-platform-lakeformation?ref=32525da937012178e430585ac5a00f05193f58eb:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:32:57,572 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2025-01-02 12:32:57,572 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2625, Failed checks: 0, Skipped checks: 119


checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

CTFLint Scan Failed

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/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: terraform_unused_declarations
1 issue(s) found:

Warning: Missing version constraint for provider "random" in `required_providers` (terraform_required_providers)

  on terraform/environments/electronic-monitoring-data/modules/lakeformation/main.tf line 12:
  12: resource "random_id" "suffix" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.9.1/docs/rules/terraform_required_providers.md

tflint_exitcode=2

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T12:32:38Z	INFO	[vulndb] Need to update DB
2025-01-02T12:32:38Z	INFO	[vulndb] Downloading vulnerability DB...
2025-01-02T12:32:38Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:32:41Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:32:41Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T12:32:41Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T12:32:41Z	INFO	[misconfig] Need to update the built-in checks
2025-01-02T12:32:41Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2025-01-02T12:32:41Z	INFO	[secret] Secret scanning is enabled
2025-01-02T12:32:41Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:32:41Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:32:42Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T12:32:42Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:44Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:32:45Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T12:32:54Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T12:32:54Z	INFO	Number of language-specific files	num=0
2025-01-02T12:32:54Z	INFO	Detected config files	num=14
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T12:32:54Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T12:32:54Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T12:32:54Z	INFO	[secret] Secret scanning is enabled
2025-01-02T12:32:54Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:32:54Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:32:55Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T12:32:55Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T12:32:55Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T12:32:55Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T12:32:55Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T12:32:55Z	INFO	Number of language-specific files	num=0
2025-01-02T12:32:55Z	INFO	Detected config files	num=1
trivy_exitcode=0

@matt-heery matt-heery temporarily deployed to electronic-monitoring-data-development January 2, 2025 12:34 — with GitHub Actions Inactive
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation


Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T12:35:02Z INFO [vulndb] Need to update DB
2025-01-02T12:35:02Z INFO [vulndb] Downloading vulnerability DB...
2025-01-02T12:35:02Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:35:04Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:35:04Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T12:35:04Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T12:35:04Z INFO [misconfig] Need to update the built-in checks
2025-01-02T12:35:04Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2025-01-02T12:35:05Z INFO [secret] Secret scanning is enabled
2025-01-02T12:35:05Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:35:05Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:35:06Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T12:35:06Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T12:35:17Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T12:35:17Z INFO Number of language-specific files num=0
2025-01-02T12:35:17Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T12:35:17Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T12:35:17Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T12:35:17Z INFO [secret] Secret scanning is enabled
2025-01-02T12:35:17Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:35:17Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:35:18Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T12:35:18Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T12:35:18Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T12:35:18Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T12:35:18Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T12:35:19Z INFO Number of language-specific files num=0
2025-01-02T12:35:19Z INFO Detected config files num=1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2025-01-02 12:35:21,332 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:35:21,333 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:35:21,333 [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)
2025-01-02 12:35:21,333 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2025-01-02 12:35:21,333 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2625, Failed checks: 0, Skipped checks: 117


checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

CTFLint Scan Failed

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/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: terraform_unused_declarations
1 issue(s) found:

Warning: Missing version constraint for provider "random" in `required_providers` (terraform_required_providers)

  on terraform/environments/electronic-monitoring-data/modules/lakeformation/main.tf line 12:
  12: resource "random_id" "suffix" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.9.1/docs/rules/terraform_required_providers.md

tflint_exitcode=2

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T12:35:02Z	INFO	[vulndb] Need to update DB
2025-01-02T12:35:02Z	INFO	[vulndb] Downloading vulnerability DB...
2025-01-02T12:35:02Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:35:04Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:35:04Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T12:35:04Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T12:35:04Z	INFO	[misconfig] Need to update the built-in checks
2025-01-02T12:35:04Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [---------------------------------------------------------] 100.00% ? p/s 0s2025-01-02T12:35:05Z	INFO	[secret] Secret scanning is enabled
2025-01-02T12:35:05Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:35:05Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:35:06Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T12:35:06Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:07Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:08Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:35:09Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T12:35:17Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T12:35:17Z	INFO	Number of language-specific files	num=0
2025-01-02T12:35:17Z	INFO	Detected config files	num=14
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T12:35:17Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T12:35:17Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T12:35:17Z	INFO	[secret] Secret scanning is enabled
2025-01-02T12:35:17Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:35:17Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:35:18Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T12:35:18Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T12:35:18Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T12:35:18Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T12:35:18Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T12:35:19Z	INFO	Number of language-specific files	num=0
2025-01-02T12:35:19Z	INFO	Detected config files	num=1
trivy_exitcode=0

@matt-heery matt-heery had a problem deploying to electronic-monitoring-data-test January 2, 2025 12:40 — with GitHub Actions Failure
@matt-heery matt-heery temporarily deployed to electronic-monitoring-data-test January 2, 2025 12:45 — with GitHub Actions Inactive
@matt-heery matt-heery temporarily deployed to electronic-monitoring-data-development January 2, 2025 12:53 — with GitHub Actions Inactive
@matt-heery matt-heery temporarily deployed to electronic-monitoring-data-test January 2, 2025 12:53 — with GitHub Actions Inactive
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation


Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T12:53:14Z INFO [vulndb] Need to update DB
2025-01-02T12:53:14Z INFO [vulndb] Downloading vulnerability DB...
2025-01-02T12:53:14Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:53:16Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:53:16Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T12:53:16Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T12:53:16Z INFO [misconfig] Need to update the built-in checks
2025-01-02T12:53:16Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2025-01-02T12:53:16Z INFO [secret] Secret scanning is enabled
2025-01-02T12:53:16Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:53:16Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:53:17Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T12:53:17Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2025-01-02T12:53:18Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:18Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:18Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:18Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T12:53:29Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T12:53:29Z INFO Number of language-specific files num=0
2025-01-02T12:53:29Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T12:53:29Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T12:53:29Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T12:53:29Z INFO [secret] Secret scanning is enabled
2025-01-02T12:53:29Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:53:29Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:53:30Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T12:53:30Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T12:53:30Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T12:53:30Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T12:53:30Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T12:53:30Z INFO Number of language-specific files num=0
2025-01-02T12:53:30Z INFO Detected config files num=1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2025-01-02 12:53:33,136 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:53:33,136 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2025-01-02 12:53:33,137 [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)
2025-01-02 12:53:33,137 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2025-01-02 12:53:33,137 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2625, Failed checks: 0, Skipped checks: 117


checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T12:53:14Z	INFO	[vulndb] Need to update DB
2025-01-02T12:53:14Z	INFO	[vulndb] Downloading vulnerability DB...
2025-01-02T12:53:14Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:53:16Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T12:53:16Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T12:53:16Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T12:53:16Z	INFO	[misconfig] Need to update the built-in checks
2025-01-02T12:53:16Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2025-01-02T12:53:16Z	INFO	[secret] Secret scanning is enabled
2025-01-02T12:53:16Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:53:16Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:53:17Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T12:53:17Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2025-01-02T12:53:18Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:18Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:18Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:18Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:19Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T12:53:20Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T12:53:29Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T12:53:29Z	INFO	Number of language-specific files	num=0
2025-01-02T12:53:29Z	INFO	Detected config files	num=14
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T12:53:29Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T12:53:29Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T12:53:29Z	INFO	[secret] Secret scanning is enabled
2025-01-02T12:53:29Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T12:53:29Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T12:53:30Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T12:53:30Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T12:53:30Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T12:53:30Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T12:53:30Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T12:53:30Z	INFO	Number of language-specific files	num=0
2025-01-02T12:53:30Z	INFO	Detected config files	num=1
trivy_exitcode=0

Copy link
Contributor

github-actions bot commented Jan 2, 2025

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation


Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T14:21:43Z INFO [vulndb] Need to update DB
2025-01-02T14:21:43Z INFO [vulndb] Downloading vulnerability DB...
2025-01-02T14:21:43Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T14:21:46Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T14:21:46Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T14:21:46Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T14:21:46Z INFO [misconfig] Need to update the built-in checks
2025-01-02T14:21:46Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2025-01-02T14:21:47Z INFO [secret] Secret scanning is enabled
2025-01-02T14:21:47Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T14:21:47Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T14:21:48Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T14:21:48Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:52Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:53Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:53Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T14:22:03Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T14:22:03Z INFO Number of language-specific files num=0
2025-01-02T14:22:03Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T14:22:03Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T14:22:03Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T14:22:03Z INFO [secret] Secret scanning is enabled
2025-01-02T14:22:03Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T14:22:03Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T14:22:04Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T14:22:04Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T14:22:04Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T14:22:04Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T14:22:04Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T14:22:04Z INFO Number of language-specific files num=0
2025-01-02T14:22:04Z INFO Detected config files num=1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2025-01-02 14:22:07,137 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2025-01-02 14:22:07,137 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2025-01-02 14:22:07,138 [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)
2025-01-02 14:22:07,138 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2025-01-02 14:22:07,138 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2625, Failed checks: 0, Skipped checks: 117


checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T14:21:43Z	INFO	[vulndb] Need to update DB
2025-01-02T14:21:43Z	INFO	[vulndb] Downloading vulnerability DB...
2025-01-02T14:21:43Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T14:21:46Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T14:21:46Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T14:21:46Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T14:21:46Z	INFO	[misconfig] Need to update the built-in checks
2025-01-02T14:21:46Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2025-01-02T14:21:47Z	INFO	[secret] Secret scanning is enabled
2025-01-02T14:21:47Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T14:21:47Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T14:21:48Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T14:21:48Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:51Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:52Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:53Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:53Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:21:54Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T14:22:03Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T14:22:03Z	INFO	Number of language-specific files	num=0
2025-01-02T14:22:03Z	INFO	Detected config files	num=14
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T14:22:03Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T14:22:03Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T14:22:03Z	INFO	[secret] Secret scanning is enabled
2025-01-02T14:22:03Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T14:22:03Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T14:22:04Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T14:22:04Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T14:22:04Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T14:22:04Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T14:22:04Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T14:22:04Z	INFO	Number of language-specific files	num=0
2025-01-02T14:22:04Z	INFO	Detected config files	num=1
trivy_exitcode=0

@matt-heery matt-heery temporarily deployed to electronic-monitoring-data-test January 2, 2025 14:22 — with GitHub Actions Inactive
@matt-heery matt-heery temporarily deployed to electronic-monitoring-data-development January 2, 2025 14:23 — with GitHub Actions Inactive
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation


Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T14:23:04Z INFO [vulndb] Need to update DB
2025-01-02T14:23:04Z INFO [vulndb] Downloading vulnerability DB...
2025-01-02T14:23:04Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T14:23:06Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T14:23:06Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T14:23:06Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T14:23:06Z INFO [misconfig] Need to update the built-in checks
2025-01-02T14:23:06Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2025-01-02T14:23:06Z INFO [secret] Secret scanning is enabled
2025-01-02T14:23:06Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T14:23:06Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T14:23:08Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T14:23:08Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2025-01-02T14:23:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:09Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z INFO [terraform scanner] Scanning root module file_path="glue-job/Archived"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T14:23:20Z INFO [terraform executor] Ignore finding rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T14:23:20Z INFO Number of language-specific files num=0
2025-01-02T14:23:20Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T14:23:20Z INFO [vuln] Vulnerability scanning is enabled
2025-01-02T14:23:20Z INFO [misconfig] Misconfiguration scanning is enabled
2025-01-02T14:23:20Z INFO [secret] Secret scanning is enabled
2025-01-02T14:23:20Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T14:23:20Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T14:23:22Z INFO [terraform scanner] Scanning root module file_path="."
2025-01-02T14:23:22Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T14:23:22Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T14:23:22Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T14:23:22Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T14:23:22Z INFO Number of language-specific files num=0
2025-01-02T14:23:22Z INFO Detected config files num=1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Checkov in terraform/environments/electronic-monitoring-data
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2025-01-02 14:23:24,779 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3:None (for external modules, the --download-external-modules flag is required)
2025-01-02 14:23:24,779 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060:None (for external modules, the --download-external-modules flag is required)
2025-01-02 14:23:24,779 [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)
2025-01-02 14:23:24,780 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2025-01-02 14:23:24,780 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.0 (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 2625, Failed checks: 0, Skipped checks: 117


checkov_exitcode=0

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

Running Checkov in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39

checkov_exitcode=0

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/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running tflint in terraform/environments/electronic-monitoring-data
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

Running tflint in terraform/environments/electronic-monitoring-data/modules/lakeformation
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/electronic-monitoring-data
terraform/environments/electronic-monitoring-data/modules/lakeformation

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

Running Trivy in terraform/environments/electronic-monitoring-data
2025-01-02T14:23:04Z	INFO	[vulndb] Need to update DB
2025-01-02T14:23:04Z	INFO	[vulndb] Downloading vulnerability DB...
2025-01-02T14:23:04Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T14:23:06Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2025-01-02T14:23:06Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T14:23:06Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T14:23:06Z	INFO	[misconfig] Need to update the built-in checks
2025-01-02T14:23:06Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2025-01-02T14:23:06Z	INFO	[secret] Secret scanning is enabled
2025-01-02T14:23:06Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T14:23:06Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T14:23:08Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T14:23:08Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2025-01-02T14:23:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:09Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.api_gateway_authorizer.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.calculate_checksum.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.format_json_fms_data.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.aws_s3_object.user_public_keys" value="cty.NilVal"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.rds_bastion.data.aws_subnet.local_account" value="cty.NilVal"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rds_bastion.aws_autoscaling_group.bastion_linux_daily" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily.dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.rotate_iam_key.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:10Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.output_file_structure_as_json_from_zip.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-fms-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-general-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:11Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-general-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-ho-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-ho-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.s3-mdss-specials-landing-bucket.module.kms_key.aws_kms_grant.this" value="cty.NilVal"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.process_landing_bucket_files.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-mdss-specials-landing-bucket.module.this-bucket.data.aws_iam_policy_document.bucket_policy_v2" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.bucket_policy_v2.dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.s3-p1-export-bucket.module.push_lambda.aws_lambda_function.this" err="1 error occurred:\n\t* invalid for-each in aws_lambda_function.this.dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2025-01-02T14:23:12Z	INFO	[terraform scanner] Scanning root module	file_path="glue-job/Archived"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-logging" range="s3.tf:1133-1152"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-versioning" range="s3.tf:1133-1152"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="s3.tf:1133-1152"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=f759060/main.tf:153-163"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=95ed3c3/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="s3.tf:1133-1152"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:36"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-sns-topic-encryption-use-cmk" range="s3_sns.tf:91"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-iam-no-user-attached-policies" range="modules/landing_bucket_iam_user_access/main.tf:2-10"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:295-300"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="modules/api_step_function/main.tf:421-425"
2025-01-02T14:23:20Z	INFO	[terraform executor] Ignore finding	rule="aws-ssm-secret-use-customer-key" range="analytical_platform_share.tf:50-68"
2025-01-02T14:23:20Z	INFO	Number of language-specific files	num=0
2025-01-02T14:23:20Z	INFO	Detected config files	num=14
trivy_exitcode=0

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

Running Trivy in terraform/environments/electronic-monitoring-data/modules/lakeformation
2025-01-02T14:23:20Z	INFO	[vuln] Vulnerability scanning is enabled
2025-01-02T14:23:20Z	INFO	[misconfig] Misconfiguration scanning is enabled
2025-01-02T14:23:20Z	INFO	[secret] Secret scanning is enabled
2025-01-02T14:23:20Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2025-01-02T14:23:20Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2025-01-02T14:23:22Z	INFO	[terraform scanner] Scanning root module	file_path="."
2025-01-02T14:23:22Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="data_bucket_lf_resource, data_engineer_role_arn, database_name, role_arn, table_filters"
2025-01-02T14:23:22Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_data_cells_filter.data_filter" value="cty.NilVal"
2025-01-02T14:23:22Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.data_engineering_table_permissions" value="cty.NilVal"
2025-01-02T14:23:22Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_lakeformation_permissions.share_filtered_data_with_role" value="cty.NilVal"
2025-01-02T14:23:22Z	INFO	Number of language-specific files	num=0
2025-01-02T14:23:22Z	INFO	Detected config files	num=1
trivy_exitcode=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environments-repository Used to exclude PRs from this repo in our Slack PR update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant