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

[DPR2-1576] Bump Expired Table lambda version #9104

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

stalwartstu
Copy link
Contributor

No description provided.

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

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/digital-prison-reporting


Running Trivy in terraform/environments/digital-prison-reporting
2024-12-17T10:38:08Z INFO [vulndb] Need to update DB
2024-12-17T10:38:08Z INFO [vulndb] Downloading vulnerability DB...
2024-12-17T10:38:08Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-17T10:38:10Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-17T10:38:10Z INFO [vuln] Vulnerability scanning is enabled
2024-12-17T10:38:10Z INFO [misconfig] Misconfiguration scanning is enabled
2024-12-17T10:38:10Z INFO [misconfig] Need to update the built-in checks
2024-12-17T10:38:10Z INFO [misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-17T10:38:10Z INFO [secret] Secret scanning is enabled
2024-12-17T10:38:10Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-17T10:38:10Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-17T10:38:12Z INFO [terraform scanner] Scanning root module file_path="."
2024-12-17T10:38:12Z 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-17T10:38:12Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_glue_connection.glue_dps_connection" value="cty.NilVal"
2024-12-17T10:38:12Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_iam_role_policy_attachment.redshift_spectrum" value="cty.NilVal"
2024-12-17T10:38:12Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_secretsmanager_secret.dps" value="cty.NilVal"
2024-12-17T10:38:12Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_secretsmanager_secret_version.dps" value="cty.NilVal"
2024-12-17T10:38:12Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="data.aws_secretsmanager_secret.dps" value="cty.NilVal"
2024-12-17T10:38:12Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="data.aws_secretsmanager_secret_version.dps" value="cty.NilVal"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.aws_s3_data_migrate.aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.datamart.aws_redshift_authentication_profile.this" value="cty.NilVal"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.datamart.aws_redshift_scheduled_action.this" value="cty.NilVal"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.datamart.aws_redshift_usage_limit.this" value="cty.NilVal"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datamart.aws_redshift_cluster.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_redshift_cluster.this[0].dynamic.logging block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datamart.aws_redshift_cluster.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_redshift_cluster.this[0].dynamic.logging block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.domain_builder_backend_Lambda.aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.domain_builder_cli_agent.aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.domain_builder_cli_agent.aws_security_group_rule.ingress_traffic" value="cty.NilVal"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.domain_builder_cli_agent.aws_autoscaling_group.bastion_linux_daily[0]" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily[0].dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.domain_builder_cli_agent.aws_autoscaling_group.bastion_linux_daily[0]" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily[0].dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-17T10:38:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.domain_builder_flyway_Lambda.aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-12-17T10:38:15Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.ec2_kinesis_agent.aws_security_group_rule.ingress_traffic_from_security_groups" value="cty.NilVal"
2024-12-17T10:38:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.ec2_kinesis_agent.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-17T10:38:15Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.ec2_kinesis_agent.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-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/dms-endpoints"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="bucket_name, env, project_id, source_app_password, source_app_username"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/dms-instance"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="env, name, project_id"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/dms-task"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="env, project_id"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/ingestion-jobs"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="env, glue_cdc_maintenance_window, jar_version, project_id, script_version"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/ingestion-pipeline"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="archive_job_trigger_name, data_ingestion_pipeline, dms_replication_task_arn, domain, glue_archive_job, glue_hive_table_creation_jobname, glue_maintenance_compaction_job, glue_maintenance_retention_job, glue_reporting_hub_batch_jobname, glue_reporting_hub_cdc_jobname, glue_s3_data_deletion_job, glue_s3_file_transfer_job, glue_s3_max_attempts, glue_s3_retry_max_wait_millis, glue_s3_retry_min_wait_millis, glue_stop_glue_instance_job, glue_switch_prisons_hive_data_location_job, glue_trigger_activation_job, pipeline_notification_lambda_function, replication_task_id, s3_curated_bucket_id, s3_curated_path, s3_glue_bucket_id, s3_raw_archive_bucket_id, s3_raw_bucket_id, s3_structured_bucket_id, s3_structured_path, s3_temp_reload_bucket_id, step_function_execution_role_arn, stop_dms_task_job"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/maintenance-pipeline"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="dms_replication_task_arn, domain, glue_maintenance_compaction_job, glue_maintenance_retention_job, glue_reporting_hub_cdc_jobname, glue_s3_max_attempts, glue_s3_retry_max_wait_millis, glue_s3_retry_min_wait_millis, glue_stop_glue_instance_job, glue_unprocessed_raw_files_check_job, maintenance_pipeline_name, processed_files_check_max_attempts, processed_files_check_wait_interval_seconds, replication_task_id, s3_curated_path, s3_glue_bucket_id, s3_structured_path, step_function_execution_role_arn, stop_dms_task_job"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/pipeline-lambda"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/reload-pipeline"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="archive_job_trigger_name, dms_replication_task_arn, domain, glue_archive_job, glue_create_reload_diff_job, glue_hive_table_creation_jobname, glue_maintenance_compaction_job, glue_maintenance_retention_job, glue_reporting_hub_batch_jobname, glue_reporting_hub_cdc_jobname, glue_s3_data_deletion_job, glue_s3_file_transfer_job, glue_s3_max_attempts, glue_s3_retry_max_wait_millis, glue_s3_retry_min_wait_millis, glue_stop_glue_instance_job, glue_switch_prisons_hive_data_location_job, glue_trigger_activation_job, glue_unprocessed_raw_files_check_job, pipeline_notification_lambda_function, processed_files_check_max_attempts, processed_files_check_wait_interval_seconds, reload_pipeline, replication_task_id, s3_curated_bucket_id, s3_curated_path, s3_glue_bucket_id, s3_raw_archive_bucket_id, s3_raw_bucket_id, s3_structured_bucket_id, s3_structured_path, s3_temp_reload_bucket_id, step_function_execution_role_arn, stop_dms_task_job"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/replay-pipeline"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="dms_replication_task_arn, glue_maintenance_compaction_job, glue_maintenance_retention_job, glue_s3_max_attempts, glue_s3_retry_max_wait_millis, glue_s3_retry_min_wait_millis, processed_files_check_max_attempts, processed_files_check_wait_interval_seconds, replication_task_id, s3_curated_path, s3_structured_path, step_function_execution_role_arn"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/start-cdc-pipeline"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="dms_replication_task_arn, domain, glue_reporting_hub_cdc_jobname, glue_stop_glue_instance_job, replication_task_id, s3_glue_bucket_id, start_cdc_pipeline, step_function_execution_role_arn, stop_dms_task_job"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/domains/stop-cdc-pipeline"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="glue_reporting_hub_cdc_jobname, glue_stop_glue_instance_job, glue_unprocessed_raw_files_check_job, processed_files_check_max_attempts, processed_files_check_wait_interval_seconds, replication_task_id, step_function_execution_role_arn, stop_cdc_pipeline, stop_dms_task_job"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/glue_connection"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="availability_zone, connection_url, description, name, password, security_groups, subnet, username"
2024-12-17T10:38:15Z INFO [terraform scanner] Scanning root module file_path="modules/pipeline_trigger"
2024-12-17T10:38:15Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="description, pipeline_name, schedule_expression, state_machine_arn, step_function_execution_role_arn"
2024-12-17T10:38:17Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="modules/ec2/main.tf:72"
2024-12-17T10:38:18Z INFO Number of language-specific files num=0
2024-12-17T10:38:18Z INFO Detected config files num=32
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/digital-prison-reporting

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

Running Checkov in terraform/environments/digital-prison-reporting
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-12-17 10:38:20,295 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-12-17 10:38:20,296 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-pagerduty-integration?ref=v2.0.0:None (for external modules, the --download-external-modules flag is required)
2024-12-17 10:38:53,603 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,613 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,624 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,635 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,646 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,655 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,665 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,674 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,684 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,693 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,703 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,713 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,723 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,733 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,757 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,767 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,778 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,789 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:53,800 [MainThread  ] [WARNI]  Error in evaluate_try of argument arn:aws:iam::var.account:policy/aws_iam_policy.additional-policy[0].name - invalid syntax (<string>, line 1)
2024-12-17 10:38:56,312 [MainThread  ] [WARNI]  Failed to find context for resource.aws_iam_role_policy_attachment.redshift_spectrum["arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/${aws_iam_policy.s3_read_write_policy.name}"]
2024-12-17 10:38:56,312 [MainThread  ] [WARNI]  Failed to find context for resource.aws_iam_role_policy_attachment.redshift_spectrum["arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/${aws_iam_policy.redshift_spectrum_policy.name}"]
2024-12-17 10:38:56,312 [MainThread  ] [WARNI]  Failed to find context for resource.aws_iam_role_policy_attachment.redshift_spectrum["arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/${aws_iam_policy.kms_read_access_policy.name}"]
terraform scan results:

Passed checks: 1581, Failed checks: 17, Skipped checks: 633

Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_application_tf_state.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:1417-1430
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_artifacts_store.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:964-988
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_curated_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:852-868
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_domain_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:890-905
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_domain_config_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:928-943
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_glue_job_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:781-796
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_raw_archive_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:799-814
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_raw_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:816-831
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_schema_registry_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:908-925
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_structured_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:834-849
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_temp_reload_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:871-887
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_violation_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:946-961
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_working_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /main.tf:991-1019
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_audit_logging_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /s3.tf:2-19
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_domain_preview_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /s3.tf:42-59
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_structured_historical_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /s3.tf:62-79
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_transfer_artifacts_bucket.aws_s3_bucket_lifecycle_configuration.lifecycle[0]
	File: /modules/s3_bucket/main.tf:34-105
	Calling File: /s3.tf:22-39
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/bc-aws-300

		Code lines for this resource are too many. Please use IDE of your choice to review the file.

checkov_exitcode=1

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/digital-prison-reporting

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

Running tflint in terraform/environments/digital-prison-reporting
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/digital-prison-reporting

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

Running Trivy in terraform/environments/digital-prison-reporting
2024-12-17T10:38:08Z	INFO	[vulndb] Need to update DB
2024-12-17T10:38:08Z	INFO	[vulndb] Downloading vulnerability DB...
2024-12-17T10:38:08Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-17T10:38:10Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-12-17T10:38:10Z	INFO	[vuln] Vulnerability scanning is enabled
2024-12-17T10:38:10Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-12-17T10:38:10Z	INFO	[misconfig] Need to update the built-in checks
2024-12-17T10:38:10Z	INFO	[misconfig] Downloading the built-in checks...
160.80 KiB / 160.80 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-12-17T10:38:10Z	INFO	[secret] Secret scanning is enabled
2024-12-17T10:38:10Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-12-17T10:38:10Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-12-17T10:38:12Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-12-17T10:38:12Z	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-17T10:38:12Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_glue_connection.glue_dps_connection" value="cty.NilVal"
2024-12-17T10:38:12Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_iam_role_policy_attachment.redshift_spectrum" value="cty.NilVal"
2024-12-17T10:38:12Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_secretsmanager_secret.dps" value="cty.NilVal"
2024-12-17T10:38:12Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_secretsmanager_secret_version.dps" value="cty.NilVal"
2024-12-17T10:38:12Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="data.aws_secretsmanager_secret.dps" value="cty.NilVal"
2024-12-17T10:38:12Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="data.aws_secretsmanager_secret_version.dps" value="cty.NilVal"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.aws_s3_data_migrate.aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.datamart.aws_redshift_authentication_profile.this" value="cty.NilVal"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.datamart.aws_redshift_scheduled_action.this" value="cty.NilVal"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.datamart.aws_redshift_usage_limit.this" value="cty.NilVal"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datamart.aws_redshift_cluster.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_redshift_cluster.this[0].dynamic.logging block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datamart.aws_redshift_cluster.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_redshift_cluster.this[0].dynamic.logging block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.domain_builder_backend_Lambda.aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.domain_builder_cli_agent.aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.domain_builder_cli_agent.aws_security_group_rule.ingress_traffic" value="cty.NilVal"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.domain_builder_cli_agent.aws_autoscaling_group.bastion_linux_daily[0]" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily[0].dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.domain_builder_cli_agent.aws_autoscaling_group.bastion_linux_daily[0]" err="1 error occurred:\n\t* invalid for-each in aws_autoscaling_group.bastion_linux_daily[0].dynamic.tag block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-12-17T10:38:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.domain_builder_flyway_Lambda.aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-12-17T10:38:15Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.ec2_kinesis_agent.aws_security_group_rule.ingress_traffic_from_security_groups" value="cty.NilVal"
2024-12-17T10:38:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.ec2_kinesis_agent.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-17T10:38:15Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.ec2_kinesis_agent.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-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/dms-endpoints"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="bucket_name, env, project_id, source_app_password, source_app_username"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/dms-instance"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="env, name, project_id"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/dms-task"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="env, project_id"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/ingestion-jobs"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="env, glue_cdc_maintenance_window, jar_version, project_id, script_version"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/ingestion-pipeline"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="archive_job_trigger_name, data_ingestion_pipeline, dms_replication_task_arn, domain, glue_archive_job, glue_hive_table_creation_jobname, glue_maintenance_compaction_job, glue_maintenance_retention_job, glue_reporting_hub_batch_jobname, glue_reporting_hub_cdc_jobname, glue_s3_data_deletion_job, glue_s3_file_transfer_job, glue_s3_max_attempts, glue_s3_retry_max_wait_millis, glue_s3_retry_min_wait_millis, glue_stop_glue_instance_job, glue_switch_prisons_hive_data_location_job, glue_trigger_activation_job, pipeline_notification_lambda_function, replication_task_id, s3_curated_bucket_id, s3_curated_path, s3_glue_bucket_id, s3_raw_archive_bucket_id, s3_raw_bucket_id, s3_structured_bucket_id, s3_structured_path, s3_temp_reload_bucket_id, step_function_execution_role_arn, stop_dms_task_job"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/maintenance-pipeline"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="dms_replication_task_arn, domain, glue_maintenance_compaction_job, glue_maintenance_retention_job, glue_reporting_hub_cdc_jobname, glue_s3_max_attempts, glue_s3_retry_max_wait_millis, glue_s3_retry_min_wait_millis, glue_stop_glue_instance_job, glue_unprocessed_raw_files_check_job, maintenance_pipeline_name, processed_files_check_max_attempts, processed_files_check_wait_interval_seconds, replication_task_id, s3_curated_path, s3_glue_bucket_id, s3_structured_path, step_function_execution_role_arn, stop_dms_task_job"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/pipeline-lambda"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/reload-pipeline"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="archive_job_trigger_name, dms_replication_task_arn, domain, glue_archive_job, glue_create_reload_diff_job, glue_hive_table_creation_jobname, glue_maintenance_compaction_job, glue_maintenance_retention_job, glue_reporting_hub_batch_jobname, glue_reporting_hub_cdc_jobname, glue_s3_data_deletion_job, glue_s3_file_transfer_job, glue_s3_max_attempts, glue_s3_retry_max_wait_millis, glue_s3_retry_min_wait_millis, glue_stop_glue_instance_job, glue_switch_prisons_hive_data_location_job, glue_trigger_activation_job, glue_unprocessed_raw_files_check_job, pipeline_notification_lambda_function, processed_files_check_max_attempts, processed_files_check_wait_interval_seconds, reload_pipeline, replication_task_id, s3_curated_bucket_id, s3_curated_path, s3_glue_bucket_id, s3_raw_archive_bucket_id, s3_raw_bucket_id, s3_structured_bucket_id, s3_structured_path, s3_temp_reload_bucket_id, step_function_execution_role_arn, stop_dms_task_job"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/replay-pipeline"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="dms_replication_task_arn, glue_maintenance_compaction_job, glue_maintenance_retention_job, glue_s3_max_attempts, glue_s3_retry_max_wait_millis, glue_s3_retry_min_wait_millis, processed_files_check_max_attempts, processed_files_check_wait_interval_seconds, replication_task_id, s3_curated_path, s3_structured_path, step_function_execution_role_arn"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/start-cdc-pipeline"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="dms_replication_task_arn, domain, glue_reporting_hub_cdc_jobname, glue_stop_glue_instance_job, replication_task_id, s3_glue_bucket_id, start_cdc_pipeline, step_function_execution_role_arn, stop_dms_task_job"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/domains/stop-cdc-pipeline"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="glue_reporting_hub_cdc_jobname, glue_stop_glue_instance_job, glue_unprocessed_raw_files_check_job, processed_files_check_max_attempts, processed_files_check_wait_interval_seconds, replication_task_id, step_function_execution_role_arn, stop_cdc_pipeline, stop_dms_task_job"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/glue_connection"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="availability_zone, connection_url, description, name, password, security_groups, subnet, username"
2024-12-17T10:38:15Z	INFO	[terraform scanner] Scanning root module	file_path="modules/pipeline_trigger"
2024-12-17T10:38:15Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="description, pipeline_name, schedule_expression, state_machine_arn, step_function_execution_role_arn"
2024-12-17T10:38:17Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="modules/ec2/main.tf:72"
2024-12-17T10:38:18Z	INFO	Number of language-specific files	num=0
2024-12-17T10:38:18Z	INFO	Detected config files	num=32
trivy_exitcode=0

@stalwartstu stalwartstu merged commit f9ad166 into main Dec 17, 2024
7 of 12 checks passed
@stalwartstu stalwartstu deleted the feature/DPR2-1576-batch-fix branch December 17, 2024 10:40
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.

2 participants