prowler-cloud 5.13.1__py3-none-any.whl → 5.14.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. dashboard/__main__.py +2 -1
  2. dashboard/compliance/c5_azure.py +43 -0
  3. dashboard/compliance/fedramp_20x_ksi_low_aws.py +46 -0
  4. dashboard/compliance/fedramp_20x_ksi_low_azure.py +46 -0
  5. dashboard/compliance/fedramp_20x_ksi_low_gcp.py +46 -0
  6. dashboard/compliance/hipaa_gcp.py +25 -0
  7. dashboard/compliance/nist_csf_2_0_aws.py +24 -0
  8. dashboard/compliance/prowler_threatscore_kubernetes.py +28 -0
  9. prowler/AGENTS.md +366 -0
  10. prowler/CHANGELOG.md +85 -2
  11. prowler/__main__.py +54 -7
  12. prowler/compliance/aws/ens_rd2022_aws.json +1 -1
  13. prowler/compliance/aws/fedramp_20x_ksi_low_aws.json +347 -0
  14. prowler/compliance/aws/nis2_aws.json +1 -1
  15. prowler/compliance/aws/nist_csf_2.0_aws.json +1781 -0
  16. prowler/compliance/azure/c5_azure.json +9471 -0
  17. prowler/compliance/azure/ens_rd2022_azure.json +1 -1
  18. prowler/compliance/azure/fedramp_20x_ksi_low_azure.json +358 -0
  19. prowler/compliance/azure/nis2_azure.json +1 -1
  20. prowler/compliance/gcp/c5_gcp.json +9401 -0
  21. prowler/compliance/gcp/ens_rd2022_gcp.json +1 -1
  22. prowler/compliance/gcp/fedramp_20x_ksi_low_gcp.json +293 -0
  23. prowler/compliance/gcp/hipaa_gcp.json +415 -0
  24. prowler/compliance/gcp/nis2_gcp.json +1 -1
  25. prowler/compliance/github/cis_1.0_github.json +6 -2
  26. prowler/compliance/kubernetes/prowler_threatscore_kubernetes.json +1269 -0
  27. prowler/compliance/m365/prowler_threatscore_m365.json +6 -6
  28. prowler/compliance/{oci/cis_3.0_oci.json → oraclecloud/cis_3.0_oraclecloud.json} +1 -1
  29. prowler/config/config.py +59 -5
  30. prowler/config/config.yaml +3 -0
  31. prowler/lib/check/check.py +1 -9
  32. prowler/lib/check/checks_loader.py +65 -1
  33. prowler/lib/check/models.py +12 -2
  34. prowler/lib/check/utils.py +1 -7
  35. prowler/lib/cli/parser.py +17 -7
  36. prowler/lib/mutelist/mutelist.py +15 -7
  37. prowler/lib/outputs/compliance/c5/c5_azure.py +92 -0
  38. prowler/lib/outputs/compliance/c5/c5_gcp.py +92 -0
  39. prowler/lib/outputs/compliance/c5/models.py +54 -0
  40. prowler/lib/outputs/compliance/cis/{cis_oci.py → cis_oraclecloud.py} +7 -7
  41. prowler/lib/outputs/compliance/cis/models.py +3 -3
  42. prowler/lib/outputs/compliance/prowler_threatscore/models.py +29 -0
  43. prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_kubernetes.py +98 -0
  44. prowler/lib/outputs/finding.py +16 -5
  45. prowler/lib/outputs/html/html.py +10 -8
  46. prowler/lib/outputs/outputs.py +1 -1
  47. prowler/lib/outputs/summary_table.py +1 -1
  48. prowler/lib/powershell/powershell.py +12 -11
  49. prowler/lib/scan/scan.py +105 -24
  50. prowler/lib/utils/utils.py +1 -1
  51. prowler/providers/aws/aws_regions_by_service.json +73 -15
  52. prowler/providers/aws/lib/quick_inventory/quick_inventory.py +1 -1
  53. prowler/providers/aws/lib/security_hub/security_hub.py +1 -1
  54. prowler/providers/aws/services/account/account_service.py +1 -1
  55. prowler/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes.metadata.json +1 -3
  56. prowler/providers/aws/services/cloudwatch/cloudwatch_alarm_actions_alarm_state_configured/cloudwatch_alarm_actions_alarm_state_configured.metadata.json +23 -12
  57. prowler/providers/aws/services/cloudwatch/cloudwatch_alarm_actions_enabled/cloudwatch_alarm_actions_enabled.metadata.json +21 -12
  58. prowler/providers/aws/services/cloudwatch/cloudwatch_changes_to_network_acls_alarm_configured/cloudwatch_changes_to_network_acls_alarm_configured.metadata.json +23 -12
  59. prowler/providers/aws/services/cloudwatch/cloudwatch_changes_to_network_gateways_alarm_configured/cloudwatch_changes_to_network_gateways_alarm_configured.metadata.json +24 -12
  60. prowler/providers/aws/services/cloudwatch/cloudwatch_changes_to_network_route_tables_alarm_configured/cloudwatch_changes_to_network_route_tables_alarm_configured.metadata.json +21 -12
  61. prowler/providers/aws/services/cloudwatch/cloudwatch_changes_to_vpcs_alarm_configured/cloudwatch_changes_to_vpcs_alarm_configured.metadata.json +17 -11
  62. prowler/providers/aws/services/cloudwatch/cloudwatch_cross_account_sharing_disabled/cloudwatch_cross_account_sharing_disabled.metadata.json +20 -12
  63. prowler/providers/aws/services/cloudwatch/cloudwatch_log_group_kms_encryption_enabled/cloudwatch_log_group_kms_encryption_enabled.metadata.json +22 -13
  64. prowler/providers/aws/services/cloudwatch/cloudwatch_log_group_no_secrets_in_logs/cloudwatch_log_group_no_secrets_in_logs.metadata.json +22 -17
  65. prowler/providers/aws/services/cloudwatch/cloudwatch_log_group_not_publicly_accessible/cloudwatch_log_group_not_publicly_accessible.metadata.json +18 -12
  66. prowler/providers/aws/services/cloudwatch/cloudwatch_log_group_retention_policy_specific_days_enabled/cloudwatch_log_group_retention_policy_specific_days_enabled.metadata.json +27 -13
  67. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_and_alarm_for_aws_config_configuration_changes_enabled/cloudwatch_log_metric_filter_and_alarm_for_aws_config_configuration_changes_enabled.metadata.json +20 -12
  68. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_and_alarm_for_cloudtrail_configuration_changes_enabled/cloudwatch_log_metric_filter_and_alarm_for_cloudtrail_configuration_changes_enabled.metadata.json +22 -12
  69. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_authentication_failures/cloudwatch_log_metric_filter_authentication_failures.metadata.json +25 -12
  70. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_aws_organizations_changes/cloudwatch_log_metric_filter_aws_organizations_changes.metadata.json +23 -12
  71. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_disable_or_scheduled_deletion_of_kms_cmk/cloudwatch_log_metric_filter_disable_or_scheduled_deletion_of_kms_cmk.metadata.json +17 -12
  72. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_for_s3_bucket_policy_changes/cloudwatch_log_metric_filter_for_s3_bucket_policy_changes.metadata.json +21 -12
  73. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_policy_changes/cloudwatch_log_metric_filter_policy_changes.metadata.json +21 -12
  74. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_root_usage/cloudwatch_log_metric_filter_root_usage.metadata.json +27 -12
  75. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_security_group_changes/cloudwatch_log_metric_filter_security_group_changes.metadata.json +22 -12
  76. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_sign_in_without_mfa/cloudwatch_log_metric_filter_sign_in_without_mfa.metadata.json +26 -12
  77. prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_unauthorized_api_calls/cloudwatch_log_metric_filter_unauthorized_api_calls.metadata.json +25 -12
  78. prowler/providers/aws/services/codeartifact/codeartifact_packages_external_public_publishing_disabled/codeartifact_packages_external_public_publishing_disabled.metadata.json +20 -11
  79. prowler/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled.metadata.json +22 -12
  80. prowler/providers/aws/services/codebuild/codebuild_project_no_secrets_in_variables/codebuild_project_no_secrets_in_variables.metadata.json +28 -12
  81. prowler/providers/aws/services/codebuild/codebuild_project_not_publicly_accessible/codebuild_project_not_publicly_accessible.metadata.json +22 -12
  82. prowler/providers/aws/services/codebuild/codebuild_project_older_90_days/codebuild_project_older_90_days.metadata.json +15 -10
  83. prowler/providers/aws/services/codebuild/codebuild_project_s3_logs_encrypted/codebuild_project_s3_logs_encrypted.metadata.json +19 -11
  84. prowler/providers/aws/services/codebuild/codebuild_project_source_repo_url_no_sensitive_credentials/codebuild_project_source_repo_url_no_sensitive_credentials.metadata.json +21 -12
  85. prowler/providers/aws/services/codebuild/codebuild_project_user_controlled_buildspec/codebuild_project_user_controlled_buildspec.metadata.json +19 -12
  86. prowler/providers/aws/services/codebuild/codebuild_project_uses_allowed_github_organizations/codebuild_project_uses_allowed_github_organizations.metadata.json +24 -13
  87. prowler/providers/aws/services/codebuild/codebuild_report_group_export_encrypted/codebuild_report_group_export_encrypted.metadata.json +35 -13
  88. prowler/providers/aws/services/codepipeline/__init__.py +0 -0
  89. prowler/providers/aws/services/codepipeline/codepipeline_client.py +6 -0
  90. prowler/providers/aws/services/codepipeline/codepipeline_project_repo_private/__init__.py +0 -0
  91. prowler/providers/aws/services/codepipeline/codepipeline_project_repo_private/codepipeline_project_repo_private.metadata.json +30 -0
  92. prowler/providers/aws/services/codepipeline/codepipeline_project_repo_private/codepipeline_project_repo_private.py +95 -0
  93. prowler/providers/aws/services/codepipeline/codepipeline_service.py +164 -0
  94. prowler/providers/aws/services/directconnect/directconnect_connection_redundancy/directconnect_connection_redundancy.metadata.json +18 -12
  95. prowler/providers/aws/services/directconnect/directconnect_virtual_interface_redundancy/directconnect_virtual_interface_redundancy.metadata.json +18 -12
  96. prowler/providers/aws/services/documentdb/documentdb_cluster_backup_enabled/documentdb_cluster_backup_enabled.metadata.json +24 -13
  97. prowler/providers/aws/services/documentdb/documentdb_cluster_cloudwatch_log_export/documentdb_cluster_cloudwatch_log_export.metadata.json +23 -13
  98. prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection.metadata.json +24 -13
  99. prowler/providers/aws/services/documentdb/documentdb_cluster_multi_az_enabled/documentdb_cluster_multi_az_enabled.metadata.json +19 -13
  100. prowler/providers/aws/services/documentdb/documentdb_cluster_public_snapshot/documentdb_cluster_public_snapshot.metadata.json +20 -10
  101. prowler/providers/aws/services/documentdb/documentdb_cluster_storage_encrypted/documentdb_cluster_storage_encrypted.metadata.json +26 -13
  102. prowler/providers/aws/services/drs/drs_job_exist/drs_job_exist.metadata.json +20 -10
  103. prowler/providers/aws/services/dynamodb/dynamodb_accelerator_cluster_encryption_enabled/dynamodb_accelerator_cluster_encryption_enabled.metadata.json +18 -11
  104. prowler/providers/aws/services/dynamodb/dynamodb_accelerator_cluster_in_transit_encryption_enabled/dynamodb_accelerator_cluster_in_transit_encryption_enabled.metadata.json +16 -11
  105. prowler/providers/aws/services/dynamodb/dynamodb_accelerator_cluster_multi_az/dynamodb_accelerator_cluster_multi_az.metadata.json +21 -13
  106. prowler/providers/aws/services/dynamodb/dynamodb_table_autoscaling_enabled/dynamodb_table_autoscaling_enabled.metadata.json +20 -12
  107. prowler/providers/aws/services/dynamodb/dynamodb_table_cross_account_access/dynamodb_table_cross_account_access.metadata.json +17 -10
  108. prowler/providers/aws/services/dynamodb/dynamodb_table_deletion_protection_enabled/dynamodb_table_deletion_protection_enabled.metadata.json +21 -13
  109. prowler/providers/aws/services/dynamodb/dynamodb_table_protected_by_backup_plan/dynamodb_table_protected_by_backup_plan.metadata.json +18 -12
  110. prowler/providers/aws/services/dynamodb/dynamodb_tables_kms_cmk_encryption_enabled/dynamodb_tables_kms_cmk_encryption_enabled.metadata.json +18 -12
  111. prowler/providers/aws/services/dynamodb/dynamodb_tables_pitr_enabled/dynamodb_tables_pitr_enabled.metadata.json +19 -12
  112. prowler/providers/aws/services/ecr/ecr_registry_scan_images_on_push_enabled/ecr_registry_scan_images_on_push_enabled.metadata.json +16 -11
  113. prowler/providers/aws/services/ecr/ecr_repositories_lifecycle_policy_enabled/ecr_repositories_lifecycle_policy_enabled.metadata.json +22 -13
  114. prowler/providers/aws/services/ecr/ecr_repositories_not_publicly_accessible/ecr_repositories_not_publicly_accessible.metadata.json +19 -13
  115. prowler/providers/aws/services/ecr/ecr_repositories_scan_images_on_push_enabled/ecr_repositories_scan_images_on_push_enabled.metadata.json +21 -13
  116. prowler/providers/aws/services/ecr/ecr_repositories_scan_vulnerabilities_in_latest_image/ecr_repositories_scan_vulnerabilities_in_latest_image.metadata.json +22 -12
  117. prowler/providers/aws/services/ecr/ecr_repositories_tag_immutability/ecr_repositories_tag_immutability.metadata.json +20 -12
  118. prowler/providers/aws/services/ecs/ecs_cluster_container_insights_enabled/ecs_cluster_container_insights_enabled.metadata.json +21 -11
  119. prowler/providers/aws/services/ecs/ecs_service_fargate_latest_platform_version/ecs_service_fargate_latest_platform_version.metadata.json +20 -11
  120. prowler/providers/aws/services/ecs/ecs_service_no_assign_public_ip/ecs_service_no_assign_public_ip.metadata.json +18 -12
  121. prowler/providers/aws/services/ecs/ecs_task_definitions_containers_readonly_access/ecs_task_definitions_containers_readonly_access.metadata.json +20 -13
  122. prowler/providers/aws/services/ecs/ecs_task_definitions_host_namespace_not_shared/ecs_task_definitions_host_namespace_not_shared.metadata.json +21 -13
  123. prowler/providers/aws/services/ecs/ecs_task_definitions_host_networking_mode_users/ecs_task_definitions_host_networking_mode_users.metadata.json +26 -13
  124. prowler/providers/aws/services/ecs/ecs_task_definitions_logging_block_mode/ecs_task_definitions_logging_block_mode.metadata.json +19 -12
  125. prowler/providers/aws/services/ecs/ecs_task_definitions_logging_enabled/ecs_task_definitions_logging_enabled.metadata.json +18 -12
  126. prowler/providers/aws/services/ecs/ecs_task_definitions_no_environment_secrets/ecs_task_definitions_no_environment_secrets.metadata.json +16 -12
  127. prowler/providers/aws/services/ecs/ecs_task_definitions_no_privileged_containers/ecs_task_definitions_no_privileged_containers.metadata.json +21 -14
  128. prowler/providers/aws/services/ecs/ecs_task_set_no_assign_public_ip/ecs_task_set_no_assign_public_ip.metadata.json +19 -13
  129. prowler/providers/aws/services/eks/eks_cluster_deletion_protection_enabled/eks_cluster_deletion_protection_enabled.metadata.json +20 -13
  130. prowler/providers/aws/services/eks/eks_cluster_kms_cmk_encryption_in_secrets_enabled/eks_cluster_kms_cmk_encryption_in_secrets_enabled.metadata.json +20 -13
  131. prowler/providers/aws/services/eks/eks_cluster_network_policy_enabled/eks_cluster_network_policy_enabled.metadata.json +20 -14
  132. prowler/providers/aws/services/eks/eks_cluster_not_publicly_accessible/eks_cluster_not_publicly_accessible.metadata.json +22 -13
  133. prowler/providers/aws/services/eks/eks_cluster_private_nodes_enabled/eks_cluster_private_nodes_enabled.metadata.json +19 -13
  134. prowler/providers/aws/services/eks/eks_cluster_uses_a_supported_version/eks_cluster_uses_a_supported_version.metadata.json +21 -12
  135. prowler/providers/aws/services/eks/eks_control_plane_logging_all_types_enabled/eks_control_plane_logging_all_types_enabled.metadata.json +20 -13
  136. prowler/providers/aws/services/elasticache/elasticache_cluster_uses_public_subnet/elasticache_cluster_uses_public_subnet.metadata.json +20 -12
  137. prowler/providers/aws/services/elasticache/elasticache_redis_cluster_auto_minor_version_upgrades/elasticache_redis_cluster_auto_minor_version_upgrades.metadata.json +21 -12
  138. prowler/providers/aws/services/elasticache/elasticache_redis_cluster_automatic_failover_enabled/elasticache_redis_cluster_automatic_failover_enabled.metadata.json +20 -13
  139. prowler/providers/aws/services/elasticache/elasticache_redis_cluster_backup_enabled/elasticache_redis_cluster_backup_enabled.metadata.json +23 -13
  140. prowler/providers/aws/services/elasticache/elasticache_redis_cluster_in_transit_encryption_enabled/elasticache_redis_cluster_in_transit_encryption_enabled.metadata.json +21 -12
  141. prowler/providers/aws/services/elasticache/elasticache_redis_cluster_multi_az_enabled/elasticache_redis_cluster_multi_az_enabled.metadata.json +22 -14
  142. prowler/providers/aws/services/elasticache/elasticache_redis_cluster_rest_encryption_enabled/elasticache_redis_cluster_rest_encryption_enabled.metadata.json +20 -11
  143. prowler/providers/aws/services/elasticache/elasticache_redis_replication_group_auth_enabled/elasticache_redis_replication_group_auth_enabled.metadata.json +23 -13
  144. prowler/providers/aws/services/elasticbeanstalk/elasticbeanstalk_environment_cloudwatch_logging_enabled/elasticbeanstalk_environment_cloudwatch_logging_enabled.metadata.json +18 -12
  145. prowler/providers/aws/services/elasticbeanstalk/elasticbeanstalk_environment_enhanced_health_reporting/elasticbeanstalk_environment_enhanced_health_reporting.metadata.json +17 -12
  146. prowler/providers/aws/services/elasticbeanstalk/elasticbeanstalk_environment_managed_updates_enabled/elasticbeanstalk_environment_managed_updates_enabled.metadata.json +17 -11
  147. prowler/providers/aws/services/elb/elb_connection_draining_enabled/elb_connection_draining_enabled.metadata.json +22 -13
  148. prowler/providers/aws/services/elb/elb_cross_zone_load_balancing_enabled/elb_cross_zone_load_balancing_enabled.metadata.json +24 -13
  149. prowler/providers/aws/services/elb/elb_desync_mitigation_mode/elb_desync_mitigation_mode.metadata.json +20 -11
  150. prowler/providers/aws/services/elb/elb_insecure_ssl_ciphers/elb_insecure_ssl_ciphers.metadata.json +20 -10
  151. prowler/providers/aws/services/elb/elb_internet_facing/elb_internet_facing.metadata.json +20 -11
  152. prowler/providers/aws/services/elb/elb_is_in_multiple_az/elb_is_in_multiple_az.metadata.json +20 -12
  153. prowler/providers/aws/services/elb/elb_logging_enabled/elb_logging_enabled.metadata.json +19 -12
  154. prowler/providers/aws/services/elb/elb_ssl_listeners/elb_ssl_listeners.metadata.json +19 -11
  155. prowler/providers/aws/services/elb/elb_ssl_listeners_use_acm_certificate/elb_ssl_listeners_use_acm_certificate.metadata.json +17 -12
  156. prowler/providers/aws/services/elbv2/elbv2_cross_zone_load_balancing_enabled/elbv2_cross_zone_load_balancing_enabled.metadata.json +21 -13
  157. prowler/providers/aws/services/elbv2/elbv2_deletion_protection/elbv2_deletion_protection.metadata.json +19 -11
  158. prowler/providers/aws/services/elbv2/elbv2_desync_mitigation_mode/elbv2_desync_mitigation_mode.metadata.json +21 -12
  159. prowler/providers/aws/services/elbv2/elbv2_insecure_ssl_ciphers/elbv2_insecure_ssl_ciphers.metadata.json +18 -11
  160. prowler/providers/aws/services/elbv2/elbv2_internet_facing/elbv2_internet_facing.metadata.json +17 -10
  161. prowler/providers/aws/services/elbv2/elbv2_is_in_multiple_az/elbv2_is_in_multiple_az.metadata.json +22 -13
  162. prowler/providers/aws/services/elbv2/elbv2_listeners_underneath/elbv2_listeners_underneath.metadata.json +18 -12
  163. prowler/providers/aws/services/elbv2/elbv2_logging_enabled/elbv2_logging_enabled.metadata.json +17 -12
  164. prowler/providers/aws/services/elbv2/elbv2_nlb_tls_termination_enabled/elbv2_nlb_tls_termination_enabled.metadata.json +18 -11
  165. prowler/providers/aws/services/elbv2/elbv2_ssl_listeners/elbv2_ssl_listeners.metadata.json +18 -12
  166. prowler/providers/aws/services/elbv2/elbv2_waf_acl_attached/elbv2_waf_acl_attached.metadata.json +16 -11
  167. prowler/providers/aws/services/emr/emr_cluster_account_public_block_enabled/emr_cluster_account_public_block_enabled.metadata.json +21 -13
  168. prowler/providers/aws/services/emr/emr_cluster_master_nodes_no_public_ip/emr_cluster_master_nodes_no_public_ip.metadata.json +24 -11
  169. prowler/providers/aws/services/emr/emr_cluster_publicly_accesible/emr_cluster_publicly_accesible.metadata.json +18 -11
  170. prowler/providers/aws/services/eventbridge/eventbridge_bus_cross_account_access/eventbridge_bus_cross_account_access.metadata.json +26 -13
  171. prowler/providers/aws/services/eventbridge/eventbridge_bus_exposed/eventbridge_bus_exposed.metadata.json +21 -11
  172. prowler/providers/aws/services/eventbridge/eventbridge_global_endpoint_event_replication_enabled/eventbridge_global_endpoint_event_replication_enabled.metadata.json +24 -13
  173. prowler/providers/aws/services/eventbridge/eventbridge_schema_registry_cross_account_access/eventbridge_schema_registry_cross_account_access.metadata.json +26 -14
  174. prowler/providers/aws/services/firehose/firehose_stream_encrypted_at_rest/firehose_stream_encrypted_at_rest.metadata.json +26 -15
  175. prowler/providers/aws/services/firehose/firehose_stream_encrypted_at_rest/firehose_stream_encrypted_at_rest.py +15 -16
  176. prowler/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant.metadata.json +23 -11
  177. prowler/providers/aws/services/fsx/fsx_file_system_copy_tags_to_backups_enabled/fsx_file_system_copy_tags_to_backups_enabled.metadata.json +19 -12
  178. prowler/providers/aws/services/fsx/fsx_file_system_copy_tags_to_volumes_enabled/fsx_file_system_copy_tags_to_volumes_enabled.metadata.json +17 -12
  179. prowler/providers/aws/services/fsx/fsx_windows_file_system_multi_az_enabled/fsx_windows_file_system_multi_az_enabled.metadata.json +22 -13
  180. prowler/providers/aws/services/glacier/glacier_vaults_policy_public_access/glacier_vaults_policy_public_access.metadata.json +21 -12
  181. prowler/providers/aws/services/iam/lib/policy.py +24 -16
  182. prowler/providers/aws/services/kinesis/kinesis_stream_data_retention_period/kinesis_stream_data_retention_period.metadata.json +21 -13
  183. prowler/providers/aws/services/kinesis/kinesis_stream_encrypted_at_rest/kinesis_stream_encrypted_at_rest.metadata.json +22 -13
  184. prowler/providers/azure/services/cosmosdb/cosmosdb_service.py +7 -2
  185. prowler/providers/azure/services/defender/defender_service.py +4 -2
  186. prowler/providers/azure/services/postgresql/postgresql_flexible_server_entra_id_authentication_enabled/__init__.py +0 -0
  187. prowler/providers/azure/services/postgresql/postgresql_flexible_server_entra_id_authentication_enabled/postgresql_flexible_server_entra_id_authentication_enabled.metadata.json +36 -0
  188. prowler/providers/azure/services/postgresql/postgresql_flexible_server_entra_id_authentication_enabled/postgresql_flexible_server_entra_id_authentication_enabled.py +43 -0
  189. prowler/providers/azure/services/postgresql/postgresql_service.py +66 -9
  190. prowler/providers/azure/services/storage/storage_service.py +13 -4
  191. prowler/providers/azure/services/vm/vm_service.py +4 -7
  192. prowler/providers/common/arguments.py +19 -16
  193. prowler/providers/common/provider.py +2 -18
  194. prowler/providers/gcp/services/artifacts/artifacts_container_analysis_enabled/artifacts_container_analysis_enabled.metadata.json +16 -15
  195. prowler/providers/gcp/services/cloudresourcemanager/cloudresourcemanager_service.py +30 -4
  196. prowler/providers/gcp/services/cloudstorage/cloudstorage_audit_logs_enabled/__init__.py +0 -0
  197. prowler/providers/gcp/services/cloudstorage/cloudstorage_audit_logs_enabled/cloudstorage_audit_logs_enabled.metadata.json +36 -0
  198. prowler/providers/gcp/services/cloudstorage/cloudstorage_audit_logs_enabled/cloudstorage_audit_logs_enabled.py +61 -0
  199. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_log_retention_policy_lock/cloudstorage_bucket_log_retention_policy_lock.metadata.json +12 -9
  200. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_log_retention_policy_lock/cloudstorage_bucket_log_retention_policy_lock.py +10 -3
  201. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_logging_enabled/__init__.py +0 -0
  202. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_logging_enabled/cloudstorage_bucket_logging_enabled.metadata.json +36 -0
  203. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_logging_enabled/cloudstorage_bucket_logging_enabled.py +40 -0
  204. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_soft_delete_enabled/__init__.py +0 -0
  205. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_soft_delete_enabled/cloudstorage_bucket_soft_delete_enabled.metadata.json +36 -0
  206. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_soft_delete_enabled/cloudstorage_bucket_soft_delete_enabled.py +31 -0
  207. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_sufficient_retention_period/__init__.py +0 -0
  208. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_sufficient_retention_period/cloudstorage_bucket_sufficient_retention_period.metadata.json +35 -0
  209. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_sufficient_retention_period/cloudstorage_bucket_sufficient_retention_period.py +55 -0
  210. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_versioning_enabled/__init__.py +0 -0
  211. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_versioning_enabled/cloudstorage_bucket_versioning_enabled.metadata.json +36 -0
  212. prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_versioning_enabled/cloudstorage_bucket_versioning_enabled.py +30 -0
  213. prowler/providers/gcp/services/cloudstorage/cloudstorage_service.py +48 -2
  214. prowler/providers/github/services/organization/organization_default_repository_permission_strict/__init__.py +0 -0
  215. prowler/providers/github/services/organization/organization_default_repository_permission_strict/organization_default_repository_permission_strict.metadata.json +35 -0
  216. prowler/providers/github/services/organization/organization_default_repository_permission_strict/organization_default_repository_permission_strict.py +36 -0
  217. prowler/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required.metadata.json +14 -8
  218. prowler/providers/github/services/organization/organization_repository_creation_limited/__init__.py +0 -0
  219. prowler/providers/github/services/organization/organization_repository_creation_limited/organization_repository_creation_limited.metadata.json +30 -0
  220. prowler/providers/github/services/organization/organization_repository_creation_limited/organization_repository_creation_limited.py +106 -0
  221. prowler/providers/github/services/organization/organization_service.py +84 -10
  222. prowler/providers/iac/iac_provider.py +279 -55
  223. prowler/providers/kubernetes/services/etcd/etcd_client_cert_auth/etcd_client_cert_auth.metadata.json +18 -13
  224. prowler/providers/kubernetes/services/etcd/etcd_no_auto_tls/etcd_no_auto_tls.metadata.json +16 -11
  225. prowler/providers/kubernetes/services/etcd/etcd_no_peer_auto_tls/etcd_no_peer_auto_tls.metadata.json +16 -11
  226. prowler/providers/kubernetes/services/etcd/etcd_peer_client_cert_auth/etcd_peer_client_cert_auth.metadata.json +18 -13
  227. prowler/providers/kubernetes/services/etcd/etcd_peer_tls_config/etcd_peer_tls_config.metadata.json +16 -12
  228. prowler/providers/kubernetes/services/etcd/etcd_tls_encryption/etcd_tls_encryption.metadata.json +16 -11
  229. prowler/providers/kubernetes/services/etcd/etcd_unique_ca/etcd_unique_ca.metadata.json +16 -10
  230. prowler/providers/m365/lib/powershell/m365_powershell.py +80 -93
  231. prowler/providers/m365/m365_provider.py +1 -6
  232. prowler/providers/mongodbatlas/exceptions/exceptions.py +16 -0
  233. prowler/providers/mongodbatlas/mongodbatlas_provider.py +15 -3
  234. prowler/providers/mongodbatlas/services/projects/projects_auditing_enabled/projects_auditing_enabled.metadata.json +20 -9
  235. prowler/providers/mongodbatlas/services/projects/projects_network_access_list_exposed_to_internet/projects_network_access_list_exposed_to_internet.metadata.json +14 -9
  236. prowler/providers/oraclecloud/lib/arguments/arguments.py +4 -13
  237. prowler/providers/oraclecloud/lib/service/service.py +3 -3
  238. prowler/providers/oraclecloud/{oci_provider.py → oraclecloud_provider.py} +15 -15
  239. prowler/providers/oraclecloud/services/analytics/analytics_instance_access_restricted/analytics_instance_access_restricted.metadata.json +20 -16
  240. prowler/providers/oraclecloud/services/audit/audit_log_retention_period_365_days/audit_log_retention_period_365_days.metadata.json +17 -17
  241. prowler/providers/oraclecloud/services/blockstorage/blockstorage_block_volume_encrypted_with_cmk/blockstorage_block_volume_encrypted_with_cmk.metadata.json +17 -19
  242. prowler/providers/oraclecloud/services/blockstorage/blockstorage_boot_volume_encrypted_with_cmk/blockstorage_boot_volume_encrypted_with_cmk.metadata.json +18 -18
  243. prowler/providers/oraclecloud/services/cloudguard/cloudguard_enabled/cloudguard_enabled.metadata.json +17 -18
  244. prowler/providers/oraclecloud/services/compute/compute_instance_in_transit_encryption_enabled/compute_instance_in_transit_encryption_enabled.metadata.json +1 -1
  245. prowler/providers/oraclecloud/services/compute/compute_instance_legacy_metadata_endpoint_disabled/compute_instance_legacy_metadata_endpoint_disabled.metadata.json +1 -1
  246. prowler/providers/oraclecloud/services/compute/compute_instance_secure_boot_enabled/compute_instance_secure_boot_enabled.metadata.json +1 -1
  247. prowler/providers/oraclecloud/services/database/database_autonomous_database_access_restricted/database_autonomous_database_access_restricted.metadata.json +1 -1
  248. prowler/providers/oraclecloud/services/events/events_notification_topic_and_subscription_exists/events_notification_topic_and_subscription_exists.metadata.json +1 -1
  249. prowler/providers/oraclecloud/services/events/events_rule_cloudguard_problems/events_rule_cloudguard_problems.metadata.json +1 -1
  250. prowler/providers/oraclecloud/services/events/events_rule_iam_group_changes/events_rule_iam_group_changes.metadata.json +1 -1
  251. prowler/providers/oraclecloud/services/events/events_rule_iam_policy_changes/events_rule_iam_policy_changes.metadata.json +1 -1
  252. prowler/providers/oraclecloud/services/events/events_rule_identity_provider_changes/events_rule_identity_provider_changes.metadata.json +1 -1
  253. prowler/providers/oraclecloud/services/events/events_rule_idp_group_mapping_changes/events_rule_idp_group_mapping_changes.metadata.json +1 -1
  254. prowler/providers/oraclecloud/services/events/events_rule_local_user_authentication/events_rule_local_user_authentication.metadata.json +1 -1
  255. prowler/providers/oraclecloud/services/events/events_rule_network_gateway_changes/events_rule_network_gateway_changes.metadata.json +1 -1
  256. prowler/providers/oraclecloud/services/events/events_rule_network_security_group_changes/events_rule_network_security_group_changes.metadata.json +1 -1
  257. prowler/providers/oraclecloud/services/events/events_rule_route_table_changes/events_rule_route_table_changes.metadata.json +1 -1
  258. prowler/providers/oraclecloud/services/events/events_rule_security_list_changes/events_rule_security_list_changes.metadata.json +1 -1
  259. prowler/providers/oraclecloud/services/events/events_rule_user_changes/events_rule_user_changes.metadata.json +1 -1
  260. prowler/providers/oraclecloud/services/events/events_rule_vcn_changes/events_rule_vcn_changes.metadata.json +1 -1
  261. prowler/providers/oraclecloud/services/filestorage/filestorage_file_system_encrypted_with_cmk/filestorage_file_system_encrypted_with_cmk.metadata.json +1 -1
  262. prowler/providers/oraclecloud/services/identity/identity_iam_admins_cannot_update_tenancy_admins/identity_iam_admins_cannot_update_tenancy_admins.metadata.json +1 -1
  263. prowler/providers/oraclecloud/services/identity/identity_instance_principal_used/identity_instance_principal_used.metadata.json +1 -1
  264. prowler/providers/oraclecloud/services/identity/identity_no_resources_in_root_compartment/identity_no_resources_in_root_compartment.metadata.json +1 -1
  265. prowler/providers/oraclecloud/services/identity/identity_non_root_compartment_exists/identity_non_root_compartment_exists.metadata.json +1 -1
  266. prowler/providers/oraclecloud/services/identity/identity_password_policy_expires_within_365_days/identity_password_policy_expires_within_365_days.metadata.json +1 -1
  267. prowler/providers/oraclecloud/services/identity/identity_password_policy_minimum_length_14/identity_password_policy_minimum_length_14.metadata.json +1 -1
  268. prowler/providers/oraclecloud/services/identity/identity_password_policy_prevents_reuse/identity_password_policy_prevents_reuse.metadata.json +1 -1
  269. prowler/providers/oraclecloud/services/identity/identity_service_level_admins_exist/identity_service_level_admins_exist.metadata.json +1 -1
  270. prowler/providers/oraclecloud/services/identity/identity_tenancy_admin_permissions_limited/identity_tenancy_admin_permissions_limited.metadata.json +1 -1
  271. prowler/providers/oraclecloud/services/identity/identity_tenancy_admin_users_no_api_keys/identity_tenancy_admin_users_no_api_keys.metadata.json +1 -1
  272. prowler/providers/oraclecloud/services/identity/identity_user_api_keys_rotated_90_days/identity_user_api_keys_rotated_90_days.metadata.json +1 -1
  273. prowler/providers/oraclecloud/services/identity/identity_user_auth_tokens_rotated_90_days/identity_user_auth_tokens_rotated_90_days.metadata.json +1 -1
  274. prowler/providers/oraclecloud/services/identity/identity_user_customer_secret_keys_rotated_90_days/identity_user_customer_secret_keys_rotated_90_days.metadata.json +1 -1
  275. prowler/providers/oraclecloud/services/identity/identity_user_db_passwords_rotated_90_days/identity_user_db_passwords_rotated_90_days.metadata.json +1 -1
  276. prowler/providers/oraclecloud/services/identity/identity_user_mfa_enabled_console_access/identity_user_mfa_enabled_console_access.metadata.json +1 -1
  277. prowler/providers/oraclecloud/services/identity/identity_user_valid_email_address/identity_user_valid_email_address.metadata.json +1 -1
  278. prowler/providers/oraclecloud/services/integration/integration_instance_access_restricted/integration_instance_access_restricted.metadata.json +1 -1
  279. prowler/providers/oraclecloud/services/kms/kms_key_rotation_enabled/kms_key_rotation_enabled.metadata.json +1 -1
  280. prowler/providers/oraclecloud/services/network/network_default_security_list_restricts_traffic/network_default_security_list_restricts_traffic.metadata.json +1 -1
  281. prowler/providers/oraclecloud/services/network/network_security_group_ingress_from_internet_to_rdp_port/network_security_group_ingress_from_internet_to_rdp_port.metadata.json +1 -1
  282. prowler/providers/oraclecloud/services/network/network_security_group_ingress_from_internet_to_ssh_port/network_security_group_ingress_from_internet_to_ssh_port.metadata.json +1 -1
  283. prowler/providers/oraclecloud/services/network/network_security_list_ingress_from_internet_to_rdp_port/network_security_list_ingress_from_internet_to_rdp_port.metadata.json +1 -1
  284. prowler/providers/oraclecloud/services/network/network_security_list_ingress_from_internet_to_ssh_port/network_security_list_ingress_from_internet_to_ssh_port.metadata.json +1 -1
  285. prowler/providers/oraclecloud/services/network/network_vcn_subnet_flow_logs_enabled/network_vcn_subnet_flow_logs_enabled.metadata.json +1 -1
  286. prowler/providers/oraclecloud/services/objectstorage/objectstorage_bucket_encrypted_with_cmk/objectstorage_bucket_encrypted_with_cmk.metadata.json +1 -1
  287. prowler/providers/oraclecloud/services/objectstorage/objectstorage_bucket_logging_enabled/objectstorage_bucket_logging_enabled.metadata.json +1 -1
  288. prowler/providers/oraclecloud/services/objectstorage/objectstorage_bucket_not_publicly_accessible/objectstorage_bucket_not_publicly_accessible.metadata.json +1 -1
  289. prowler/providers/oraclecloud/services/objectstorage/objectstorage_bucket_versioning_enabled/objectstorage_bucket_versioning_enabled.metadata.json +1 -1
  290. {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.0.dist-info}/METADATA +17 -16
  291. {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.0.dist-info}/RECORD +295 -246
  292. /prowler/compliance/{oci → oraclecloud}/__init__.py +0 -0
  293. {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.0.dist-info}/LICENSE +0 -0
  294. {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.0.dist-info}/WHEEL +0 -0
  295. {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.0.dist-info}/entry_points.txt +0 -0
@@ -1,31 +1,45 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "cloudwatch_log_metric_filter_sign_in_without_mfa",
4
- "CheckTitle": "Ensure a log metric filter and alarm exist for Management Console sign-in without MFA.",
4
+ "CheckTitle": "CloudWatch log metric filter and alarm exist for Management Console sign-in without MFA",
5
5
  "CheckType": [
6
- "Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
6
+ "Software and Configuration Checks/AWS Security Best Practices",
7
+ "Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark",
8
+ "TTPs/Initial Access",
9
+ "Unusual Behaviors/User"
7
10
  ],
8
11
  "ServiceName": "cloudwatch",
9
12
  "SubServiceName": "",
10
- "ResourceIdTemplate": "arn:partition:cloudwatch:region:account-id:certificate/resource-id",
13
+ "ResourceIdTemplate": "",
11
14
  "Severity": "medium",
12
15
  "ResourceType": "AwsCloudWatchAlarm",
13
- "Description": "Ensure a log metric filter and alarm exist for Management Console sign-in without MFA.",
14
- "Risk": "Monitoring unauthorized API calls will help reveal application errors and may reduce time to detect malicious activity.",
15
- "RelatedUrl": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html",
16
+ "Description": "**CloudTrail logs** in CloudWatch are assessed for a metric filter and alarm that detect console logins where `$.eventName = ConsoleLogin` and `$.additionalEventData.MFAUsed != \\\"Yes\\\"`.\n\nThis reflects whether alerting exists for sign-ins that occur without **MFA**.",
17
+ "Risk": "Without alerting on non-MFA console logins, successful use of stolen passwords can go **undetected**, enabling:\n- Unauthorized console access and IAM changes\n- Data exfiltration or deletion\n\nImpacts: loss of **confidentiality** and **integrity**, and potential **availability** disruption.",
18
+ "RelatedUrl": "",
19
+ "AdditionalURLs": [
20
+ "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html",
21
+ "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/CloudWatchLogs/console-sign-in-without-mfa.html",
22
+ "https://www.tenable.com/audits/items/CIS_Amazon_Web_Services_Foundations_v3.0.0_L1.audit:1957056ee174cc38502d5f5f1864333b",
23
+ "https://www.clouddefense.ai/compliance-rules/gdpr/data-protection/log-metric-filter-console-login-mfa",
24
+ "https://www.intelligentdiscovery.io/controls/cloudwatch/cloudwatch-alarm-no-mfa",
25
+ "https://support.icompaas.com/support/solutions/articles/62000083605-ensure-a-log-metric-filter-and-alarm-exist-for-management-console-sign-in-without-mfa"
26
+ ],
16
27
  "Remediation": {
17
28
  "Code": {
18
29
  "CLI": "",
19
- "NativeIaC": "",
20
- "Other": "https://docs.prowler.com/checks/aws/monitoring-policies/monitoring_2",
21
- "Terraform": "https://docs.prowler.com/checks/aws/monitoring-policies/monitoring_2#fix---buildtime"
30
+ "NativeIaC": "```yaml\n# CloudFormation: Create metric filter and alarm for console sign-in without MFA\nResources:\n NoMFAConsoleSigninMetricFilter:\n Type: AWS::Logs::MetricFilter\n Properties:\n LogGroupName: \"<example_resource_name>\"\n FilterPattern: '{ ($.eventName = \"ConsoleLogin\") && ($.additionalEventData.MFAUsed != \"Yes\") }' # CRITICAL: detects ConsoleLogin events without MFA\n MetricTransformations:\n - MetricName: \"<example_resource_name>\"\n MetricNamespace: \"<example_resource_name>\"\n MetricValue: \"1\" # CRITICAL: emits a metric on each match\n\n NoMFAConsoleSigninAlarm:\n Type: AWS::CloudWatch::Alarm\n Properties:\n MetricName: \"<example_resource_name>\" # CRITICAL: alarm uses the metric from the filter\n Namespace: \"<example_resource_name>\"\n ComparisonOperator: GreaterThanOrEqualToThreshold\n EvaluationPeriods: 1\n Period: 300\n Statistic: Sum\n Threshold: 1 # CRITICAL: alarm on first occurrence\n```",
31
+ "Other": "1. In AWS Console, go to CloudWatch > Logs > Log groups and open the CloudTrail log group\n2. Go to Metric filters > Create metric filter\n3. Set Filter pattern to: { ($.eventName = \"ConsoleLogin\") && ($.additionalEventData.MFAUsed != \"Yes\") }\n4. Next > set Filter name, Metric namespace, Metric name; set Metric value = 1; Create metric filter\n5. Select the new filter > Create alarm\n6. Set Statistic = Sum, Period = 5 minutes, Threshold type = Static, Threshold = 1, Whenever >= 1; Next\n7. Skip actions if not needed, Name the alarm, Create alarm",
32
+ "Terraform": "```hcl\n# Create metric filter for console sign-in without MFA\nresource \"aws_cloudwatch_log_metric_filter\" \"nomfa\" {\n name = \"<example_resource_name>\"\n log_group_name = \"<example_resource_name>\"\n pattern = \"{ ($.eventName = \\\"ConsoleLogin\\\") && ($.additionalEventData.MFAUsed != \\\"Yes\\\") }\" # CRITICAL: detects ConsoleLogin without MFA\n\n metric_transformation {\n name = \"<example_resource_name>\"\n namespace = \"<example_resource_name>\"\n value = \"1\" # CRITICAL: emits a count per match\n }\n}\n\n# Alarm on the emitted metric\nresource \"aws_cloudwatch_metric_alarm\" \"nomfa\" {\n alarm_name = \"<example_resource_name>\"\n metric_name = aws_cloudwatch_log_metric_filter.nomfa.metric_transformation[0].name # CRITICAL: ties alarm to the metric\n namespace = aws_cloudwatch_log_metric_filter.nomfa.metric_transformation[0].namespace\n comparison_operator = \"GreaterThanOrEqualToThreshold\"\n evaluation_periods = 1\n period = 300\n statistic = \"Sum\"\n threshold = 1 # CRITICAL: alarm on first event\n}\n```"
22
33
  },
23
34
  "Recommendation": {
24
- "Text": "It is recommended that a metric filter and alarm be established for unauthorized requests.",
25
- "Url": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html"
35
+ "Text": "Enforce **MFA** for all console-capable identities and maintain alerts for `ConsoleLogin` with `MFAUsed != \\\"Yes\\\"`.\n\nApply **least privilege**, route alarms to monitored channels, and tune for SSO to reduce noise. Test alarms regularly and review coverage as part of **defense in depth**.",
36
+ "Url": "https://hub.prowler.com/check/cloudwatch_log_metric_filter_sign_in_without_mfa"
26
37
  }
27
38
  },
28
- "Categories": [],
39
+ "Categories": [
40
+ "logging",
41
+ "threat-detection"
42
+ ],
29
43
  "DependsOn": [],
30
44
  "RelatedTo": [],
31
45
  "Notes": "Logging and Monitoring"
@@ -1,31 +1,44 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "cloudwatch_log_metric_filter_unauthorized_api_calls",
4
- "CheckTitle": "Ensure a log metric filter and alarm exist for unauthorized API calls.",
4
+ "CheckTitle": "CloudWatch Logs metric filter and alarm exist for unauthorized API calls",
5
5
  "CheckType": [
6
- "Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
6
+ "Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark",
7
+ "Software and Configuration Checks/AWS Security Best Practices/Runtime Behavior Analysis",
8
+ "TTPs/Initial Access/Unauthorized Access"
7
9
  ],
8
10
  "ServiceName": "cloudwatch",
9
11
  "SubServiceName": "",
10
- "ResourceIdTemplate": "arn:partition:cloudwatch:region:account-id:certificate/resource-id",
12
+ "ResourceIdTemplate": "",
11
13
  "Severity": "medium",
12
14
  "ResourceType": "AwsCloudWatchAlarm",
13
- "Description": "Ensure a log metric filter and alarm exist for unauthorized API calls.",
14
- "Risk": "Monitoring unauthorized API calls will help reveal application errors and may reduce time to detect malicious activity.",
15
- "RelatedUrl": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html",
15
+ "Description": "**CloudWatch Logs** for CloudTrail include a metric filter that matches unauthorized API errors (`$.errorCode=\"*UnauthorizedOperation\"` or `$.errorCode=\"AccessDenied*\"`) and a linked alarm that triggers when events match the filter.",
16
+ "Risk": "Without alerting on **unauthorized API calls**, permission probing and failed access by compromised identities can go unnoticed. Attackers can enumerate services, pivot, and attempt privilege escalation, threatening data **confidentiality** and **integrity**.",
17
+ "RelatedUrl": "",
18
+ "AdditionalURLs": [
19
+ "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html",
20
+ "https://asecure.cloud/a/unauthorized_api_calls/",
21
+ "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/CloudWatchLogs/authorization-failures-alarm.html",
22
+ "https://www.tenable.com/policies/[type]/AC_AWS_0559",
23
+ "https://www.intelligentdiscovery.io/controls/cloudwatch/cloudwatch-unauthorized-api-calls",
24
+ "https://support.icompaas.com/support/solutions/articles/62000083561-ensure-a-log-metric-filter-and-alarm-exist-for-unauthorized-api-calls"
25
+ ],
16
26
  "Remediation": {
17
27
  "Code": {
18
28
  "CLI": "",
19
- "NativeIaC": "",
20
- "Other": "https://docs.prowler.com/checks/aws/monitoring-policies/monitoring_1",
21
- "Terraform": "https://docs.prowler.com/checks/aws/monitoring-policies/monitoring_1#fix---buildtime"
29
+ "NativeIaC": "```yaml\n# CloudFormation: Create metric filter and alarm for unauthorized API calls\nResources:\n MetricFilterUnauthorized:\n Type: AWS::Logs::MetricFilter\n Properties:\n LogGroupName: <example_resource_name>\n FilterPattern: '{($.errorCode = \"*UnauthorizedOperation\") || ($.errorCode = \"AccessDenied*\")}' # Critical: detects unauthorized/denied API calls\n MetricTransformations:\n - MetricName: unauthorized_api_calls_metric\n MetricNamespace: CISBenchmark\n MetricValue: \"1\"\n\n AlarmUnauthorized:\n Type: AWS::CloudWatch::Alarm\n Properties:\n ComparisonOperator: GreaterThanOrEqualToThreshold\n EvaluationPeriods: 1\n MetricName: unauthorized_api_calls_metric # Critical: alarm on the metric from the filter\n Namespace: CISBenchmark\n Period: 300\n Statistic: Sum\n Threshold: 1\n```",
30
+ "Other": "1. In the AWS Console, open CloudWatch > Logs > Log groups and select the CloudTrail log group\n2. Go to Metric filters > Create metric filter\n3. Set Filter pattern to: {($.errorCode = \"*UnauthorizedOperation\") || ($.errorCode = \"AccessDenied*\")}\n4. Name the metric unauthorized_api_calls_metric, set Namespace to CISBenchmark, Value to 1, then create\n5. Select the new metric filter and click Create alarm\n6. Set Statistic: Sum, Period: 5 minutes, Threshold type: Static, Threshold: 1, Evaluation periods: 1\n7. Create the alarm",
31
+ "Terraform": "```hcl\n# Terraform: Metric filter and alarm for unauthorized API calls\nresource \"aws_cloudwatch_log_metric_filter\" \"unauthorized\" {\n name = \"unauthorized_api_calls_metric\"\n log_group_name = \"<example_resource_name>\"\n pattern = \"{($.errorCode = \\\"*UnauthorizedOperation\\\") || ($.errorCode = \\\"AccessDenied*\\\")}\" # Critical: detects unauthorized/denied API calls\n\n metric_transformation {\n name = \"unauthorized_api_calls_metric\"\n namespace = \"CISBenchmark\"\n value = \"1\"\n }\n}\n\nresource \"aws_cloudwatch_metric_alarm\" \"unauthorized\" {\n comparison_operator = \"GreaterThanOrEqualToThreshold\"\n evaluation_periods = 1\n metric_name = \"unauthorized_api_calls_metric\" # Critical: alarm on the metric from the filter\n namespace = \"CISBenchmark\"\n period = 300\n statistic = \"Sum\"\n threshold = 1\n}\n```"
22
32
  },
23
33
  "Recommendation": {
24
- "Text": "It is recommended that a metric filter and alarm be established for unauthorized requests.",
25
- "Url": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html"
34
+ "Text": "Enable real-time **alerting** by adding a CloudWatch Logs metric filter for unauthorized errors (`*UnauthorizedOperation`, `AccessDenied*`) and associating it with an alarm that notifies responders.\n- Enforce **least privilege** to reduce noise\n- Integrate with IR tooling for **defense in depth**",
35
+ "Url": "https://hub.prowler.com/check/cloudwatch_log_metric_filter_unauthorized_api_calls"
26
36
  }
27
37
  },
28
- "Categories": [],
38
+ "Categories": [
39
+ "threat-detection",
40
+ "logging"
41
+ ],
29
42
  "DependsOn": [],
30
43
  "RelatedTo": [],
31
44
  "Notes": "Logging and Monitoring"
@@ -1,30 +1,39 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "codeartifact_packages_external_public_publishing_disabled",
4
- "CheckTitle": "Ensure CodeArtifact internal packages do not allow external public source publishing.",
5
- "CheckType": [],
4
+ "CheckTitle": "Internal CodeArtifact package does not allow publishing versions already present in external public sources",
5
+ "CheckType": [
6
+ "Software and Configuration Checks/AWS Security Best Practices",
7
+ "TTPs/Initial Access"
8
+ ],
6
9
  "ServiceName": "codeartifact",
7
10
  "SubServiceName": "",
8
- "ResourceIdTemplate": "arn:partition:codeartifact:region:account-id:repository/repository-name",
11
+ "ResourceIdTemplate": "",
9
12
  "Severity": "critical",
10
13
  "ResourceType": "Other",
11
- "Description": "Ensure CodeArtifact internal packages do not allow external public source publishing.",
12
- "Risk": "Allowing package versions of a package to be added both by direct publishing and ingesting from public repositories makes you vulnerable to a dependency substitution attack.",
13
- "RelatedUrl": "https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html",
14
+ "Description": "**AWS CodeArtifact packages** with an **internal or unknown origin** are evaluated for their **package origin controls**. The check identifies packages where the `upstream` setting allows ingesting versions from external or upstream repositories.",
15
+ "Risk": "Allowing upstream on internal packages enables **dependency confusion**: public repos can supply higher versions to builds, leading to malicious code execution and package tampering. This threatens **integrity**, exposes secrets and data (**confidentiality**), and may disrupt pipelines and services (**availability**).",
16
+ "RelatedUrl": "",
17
+ "AdditionalURLs": [
18
+ "https://noise.getoto.net/2022/07/15/tighten-your-package-security-with-codeartifact-package-origin-control-toolkit/",
19
+ "https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html",
20
+ "https://newstar.cloud/blog/improve-the-security-of-your-software-supply-chain-with-amazon-codeartifact-package-group-configuration/",
21
+ "https://zego.engineering/dependency-confusion-in-aws-codeartifact-86b9ff68963d"
22
+ ],
14
23
  "Remediation": {
15
24
  "Code": {
16
- "CLI": "aws codeartifact put-package-origin-configuration --package 'MyPackage' --namespace 'MyNamespace' --domain 'MyDomain' --repository 'MyRepository' --domain-owner 'MyOwnerAccount' --format 'MyFormat' --restrictions 'publish=ALLOW,upstream=BLOCK'",
25
+ "CLI": "aws codeartifact put-package-origin-configuration --domain <DOMAIN> --repository <REPOSITORY> --format <FORMAT> --package <PACKAGE_NAME> --restrictions publish=ALLOW,upstream=BLOCK",
17
26
  "NativeIaC": "",
18
- "Other": "",
27
+ "Other": "1. In the AWS Console, go to CodeArtifact > Repositories and select <REPOSITORY>\n2. In Packages, open the internal package <PACKAGE_NAME>\n3. Under Origin controls, choose Edit\n4. Set Upstream to Block (leave Publish as Allow if required)\n5. Save",
19
28
  "Terraform": ""
20
29
  },
21
30
  "Recommendation": {
22
- "Text": "Configure package origin controls on a package in a repository to limit how versions of that package can be added to the repository.",
23
- "Url": "https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html"
31
+ "Text": "Enforce **Package Origin Controls** so internal packages use `upstream=BLOCK` and only trusted publish paths. Apply **least privilege** with package groups and private namespaces, pin versions, and prefer private endpoints. Add artifact signing and CI isolation, and monitor package events for unexpected source changes.",
32
+ "Url": "https://hub.prowler.com/check/codeartifact_packages_external_public_publishing_disabled"
24
33
  }
25
34
  },
26
35
  "Categories": [
27
- "internet-exposed"
36
+ "software-supply-chain"
28
37
  ],
29
38
  "DependsOn": [],
30
39
  "RelatedTo": [],
@@ -1,26 +1,36 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "codebuild_project_logging_enabled",
4
- "CheckTitle": "Ensure that CodeBuild projects have S3 or CloudWatch logging enabled",
5
- "CheckType": [],
4
+ "CheckTitle": "CodeBuild project has CloudWatch Logs or S3 logging enabled",
5
+ "CheckType": [
6
+ "Software and Configuration Checks/AWS Security Best Practices",
7
+ "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices"
8
+ ],
6
9
  "ServiceName": "codebuild",
7
10
  "SubServiceName": "",
8
- "ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id",
11
+ "ResourceIdTemplate": "",
9
12
  "Severity": "medium",
10
13
  "ResourceType": "AwsCodeBuildProject",
11
- "Description": "Ensure that CodeBuild projects have S3 or CloudWatch logging enabled.",
12
- "Risk": "Without logging, tracking and investigating security incidents in CodeBuild projects becomes challenging, reducing confidence in threat detections.",
13
- "RelatedUrl": "https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console-logs",
14
+ "Description": "**CodeBuild projects** are assessed for **logging configuration** to Amazon **CloudWatch Logs** or **S3**, identifying when at least one destination is `enabled` for build logs and events.",
15
+ "Risk": "Absence of **build logging** creates blind spots for **integrity** and **accountability**. Attackers or misconfigurations can alter artifacts, exfiltrate data, or misuse credentials with little trace, hindering **forensics** and **incident response**. Missing telemetry impedes correlation with other alerts, risking source code and secret **confidentiality**.",
16
+ "RelatedUrl": "",
17
+ "AdditionalURLs": [
18
+ "https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console-logs",
19
+ "https://codefresh.io/learn/devops-tools/aws-codebuild-the-basics-and-a-quick-tutorial/",
20
+ "https://asecure.cloud/a/cfgrule_codebuild-project-logging-enabled/",
21
+ "https://support.icompaas.com/support/solutions/articles/62000233680-ensure-that-codebuild-projects-have-s3-or-cloudwatch-logging-enabled",
22
+ "https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-4"
23
+ ],
14
24
  "Remediation": {
15
25
  "Code": {
16
- "CLI": "aws codebuild update-project --name <project-name> --logs-config \"cloudWatchLogs={status=ENABLED},s3Logs={status=ENABLED\"}",
17
- "NativeIaC": "",
18
- "Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-4",
19
- "Terraform": ""
26
+ "CLI": "aws codebuild update-project --name <project-name> --logs-config \"cloudWatchLogs={status=ENABLED}\"",
27
+ "NativeIaC": "```yaml\n# CloudFormation: Enable logging on a CodeBuild project\nResources:\n <example_resource_name>:\n Type: AWS::CodeBuild::Project\n Properties:\n Name: <example_resource_name>\n ServiceRole: <example_resource_id>\n Artifacts:\n Type: NO_ARTIFACTS\n Environment:\n Type: LINUX_CONTAINER\n ComputeType: BUILD_GENERAL1_SMALL\n Image: aws/codebuild/standard:5.0\n Source:\n Type: NO_SOURCE\n LogsConfig:\n CloudWatchLogs:\n Status: ENABLED # Critical: Enables CloudWatch logging to pass the check\n```",
28
+ "Other": "1. In the AWS Console, go to CodeBuild > Build projects and open your project\n2. Under Logs, click Edit\n3. Check CloudWatch logs and save (or enable S3 logs instead)\n4. Confirm the project now shows logging enabled",
29
+ "Terraform": "```hcl\n# Terraform: Enable logging on a CodeBuild project\nresource \"aws_codebuild_project\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n service_role = \"<example_resource_id>\"\n\n artifacts { type = \"NO_ARTIFACTS\" }\n\n environment {\n compute_type = \"BUILD_GENERAL1_SMALL\"\n image = \"aws/codebuild/standard:5.0\"\n type = \"LINUX_CONTAINER\"\n }\n\n source { type = \"NO_SOURCE\" }\n\n logs_config {\n cloudwatch_logs {\n status = \"ENABLED\" # Critical: Enables CloudWatch logging to pass the check\n }\n }\n}\n```"
20
30
  },
21
31
  "Recommendation": {
22
- "Text": "Enable logging for CodeBuild projects to capture build events and logs for future analysis and incident response.",
23
- "Url": "https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console-logs"
32
+ "Text": "Enable a log destination for every project-**CloudWatch Logs** or **S3** (preferably both). Enforce **defense in depth**: encrypt logs, set retention, and restrict access on a least-privilege basis. Centralize and monitor logs, alert on anomalies, and avoid sensitive data in output. Use immutable retention to preserve **auditability**.",
33
+ "Url": "https://hub.prowler.com/check/codebuild_project_logging_enabled"
24
34
  }
25
35
  },
26
36
  "Categories": [
@@ -1,31 +1,47 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "codebuild_project_no_secrets_in_variables",
4
- "CheckTitle": "Ensure CodeBuild projects do not contain secrets on plaintext environment variables",
4
+ "CheckTitle": "CodeBuild project has no sensitive credentials in plaintext environment variables",
5
5
  "CheckType": [
6
- "Security Best Practices"
6
+ "Software and Configuration Checks/AWS Security Best Practices",
7
+ "TTPs/Credential Access",
8
+ "Effects/Data Exposure",
9
+ "Sensitive Data Identifications/Security"
7
10
  ],
8
11
  "ServiceName": "codebuild",
9
12
  "SubServiceName": "",
10
- "ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id",
13
+ "ResourceIdTemplate": "",
11
14
  "Severity": "critical",
12
15
  "ResourceType": "AwsCodeBuildProject",
13
- "Description": "This check ensures that AWS CodeBuild projects do not contain secrets in environment variables.",
14
- "Risk": "Using plaintext AWS credentials in CodeBuild project environment variables can expose these sensitive keys, leading to unauthorized access and potential security breaches.",
15
- "RelatedUrl": "https://docs.aws.amazon.com/codebuild/latest/userguide/how-to-create-project-console.html",
16
+ "Description": "**AWS CodeBuild projects** are inspected for **plaintext environment variables** (`PLAINTEXT`) that resemble **secrets** (keys, tokens, passwords).\n\nSuch values indicate sensitive data is stored directly in environment variables instead of being sourced securely.",
17
+ "Risk": "Plaintext secrets in environment variables reduce confidentiality: values can be viewed in consoles/CLI and may leak into build logs or public outputs. Compromised credentials enable unauthorized AWS actions, artifact tampering, and lateral movement, causing data exfiltration and CI/CD supply-chain compromise.",
18
+ "RelatedUrl": "",
19
+ "AdditionalURLs": [
20
+ "https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html",
21
+ "https://www.learnaws.org/2022/11/18/aws-codebuild-secrets-manager/",
22
+ "https://www.learnaws.org/2023/08/23/codebuild-env-vars/",
23
+ "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environmentvariable.html",
24
+ "https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html",
25
+ "https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-2",
26
+ "https://pasmichal.medium.com/how-to-handle-secrets-in-aws-codebuild-6e1b96013712",
27
+ "https://medium.com/@odofing/aws-codepipeline-how-to-securely-store-environment-variables-in-ssm-paramater-store-and-aws-9a96d7083b3c"
28
+ ],
16
29
  "Remediation": {
17
30
  "Code": {
18
31
  "CLI": "",
19
- "NativeIaC": "",
20
- "Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-2",
21
- "Terraform": ""
32
+ "NativeIaC": "```yaml\nResources:\n <example_resource_name>:\n Type: AWS::CodeBuild::Project\n Properties:\n Name: <example_resource_name>\n ServiceRole: <example_resource_arn>\n Source:\n Type: NO_SOURCE\n Artifacts:\n Type: NO_ARTIFACTS\n Environment:\n Type: LINUX_CONTAINER\n ComputeType: BUILD_GENERAL1_SMALL\n Image: aws/codebuild/standard:5.0\n EnvironmentVariables:\n - Name: <SENSITIVE_VAR_NAME>\n Type: SECRETS_MANAGER # CRITICAL: store secret in Secrets Manager to avoid PLAINTEXT\n Value: <example_secret_name> # Secret name or ARN (optionally include json-key)\n```",
33
+ "Other": "1. In AWS Console, go to CodeBuild > Build projects and open your project\n2. Click Edit in the Environment section\n3. Under Environment variables, for each sensitive variable with Type = Plaintext, change Type to Secrets Manager (or Parameter store)\n4. Select the secret (or parameter) that holds the value, then Save\n5. If the secret/parameter does not exist, create it in Secrets Manager or Systems Manager Parameter Store first, then repeat steps 3-4",
34
+ "Terraform": "```hcl\nresource \"aws_codebuild_project\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n service_role = \"<example_resource_arn>\"\n\n source {\n type = \"NO_SOURCE\"\n }\n\n artifacts {\n type = \"NO_ARTIFACTS\"\n }\n\n environment {\n compute_type = \"BUILD_GENERAL1_SMALL\"\n image = \"aws/codebuild/standard:5.0\"\n type = \"LINUX_CONTAINER\"\n\n environment_variable {\n name = \"<SENSITIVE_VAR_NAME>\"\n type = \"SECRETS_MANAGER\" # CRITICAL: use Secrets Manager so value isn't plaintext\n value = \"<example_secret_name>\"\n }\n }\n}\n```"
22
35
  },
23
36
  "Recommendation": {
24
- "Text": "Do not store secrets in plaintext environment variables. Use AWS Secrets Manager or AWS Systems Manager Parameter Store to securely store and retrieve sensitive information.",
25
- "Url": "https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html"
37
+ "Text": "Store secrets outside the build and reference them via **AWS Secrets Manager** or **AWS Systems Manager Parameter Store** instead of `PLAINTEXT` variables.\n- Enforce **least privilege** on the build role\n- Rotate secrets; prefer short-lived credentials\n- Avoid logging or exporting secret values and never embed them in artifacts",
38
+ "Url": "https://hub.prowler.com/check/codebuild_project_no_secrets_in_variables"
26
39
  }
27
40
  },
28
- "Categories": [],
41
+ "Categories": [
42
+ "secrets",
43
+ "ci-cd"
44
+ ],
29
45
  "DependsOn": [],
30
46
  "RelatedTo": [],
31
47
  "Notes": ""
@@ -1,29 +1,39 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "codebuild_project_not_publicly_accessible",
4
- "CheckTitle": "Ensure AWS CodeBuild projects are not public",
5
- "CheckType": [],
4
+ "CheckTitle": "CodeBuild project visibility is private",
5
+ "CheckType": [
6
+ "Software and Configuration Checks/AWS Security Best Practices",
7
+ "Effects/Data Exposure"
8
+ ],
6
9
  "ServiceName": "codebuild",
7
10
  "SubServiceName": "",
8
- "ResourceIdTemplate": "arn:aws:codebuild:region:account-id:project:project-name",
11
+ "ResourceIdTemplate": "",
9
12
  "Severity": "high",
10
13
  "ResourceType": "AwsCodeBuildProject",
11
- "Description": "Check for CodeBuild projects ensuring that the project visibility is appropriate",
12
- "Risk": "Public CodeBuild Project ensures all build logs and artifacts are available to the public. Environment variables, source code, and other sensitive information may have been output to the build logs and artifacts. You must be careful about what information is output to the build logs.",
14
+ "Description": "**AWS CodeBuild project visibility** is assessed to identify projects exposed to the public. Projects with `project_visibility` set to `PUBLIC_READ` (or not `PRIVATE`) allow anyone to access build results, logs, and artifacts.",
15
+ "Risk": "Public visibility degrades CIA:\n- Logs may leak secrets, tokens, and source details\n- Artifacts are downloadable, enabling tampering and supply-chain malware\n- Adversaries gain CI/CD insights for reconnaissance and lateral movement",
13
16
  "RelatedUrl": "",
17
+ "AdditionalURLs": [
18
+ "https://docs.aws.amazon.com/codebuild/latest/userguide/public-builds.html",
19
+ "https://docs.aws.amazon.com/cli/latest/reference/codebuild/update-project-visibility.html"
20
+ ],
14
21
  "Remediation": {
15
22
  "Code": {
16
- "NativeIaC": "",
17
- "Terraform": "",
18
- "CLI": "aws codebuild update-project --name <project-name> --project-visibility PRIVATE",
19
- "Other": ""
23
+ "CLI": "aws codebuild update-project-visibility --project-arn <PROJECT_ARN> --project-visibility PRIVATE",
24
+ "NativeIaC": "```yaml\nResources:\n <example_resource_name>:\n Type: AWS::CodeBuild::Project\n Properties:\n Name: <example_resource_name>\n ServiceRole: <example_role_arn>\n Artifacts:\n Type: NO_ARTIFACTS\n Environment:\n Type: LINUX_CONTAINER\n Image: aws/codebuild/standard:5.0\n ComputeType: BUILD_GENERAL1_SMALL\n Source:\n Type: NO_SOURCE\n Visibility: PRIVATE # Critical: makes the project private so builds aren't publicly accessible\n```",
25
+ "Other": "1. Open the AWS Console and go to CodeBuild\n2. Select your build project\n3. Click Edit\n4. Set Project visibility to Private\n5. Save changes",
26
+ "Terraform": "```hcl\nresource \"aws_codebuild_project\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n service_role = \"<example_role_arn>\"\n\n artifacts { type = \"NO_ARTIFACTS\" }\n\n environment {\n compute_type = \"BUILD_GENERAL1_SMALL\"\n image = \"aws/codebuild/standard:5.0\"\n type = \"LINUX_CONTAINER\"\n }\n\n source { type = \"NO_SOURCE\" }\n\n project_visibility = \"PRIVATE\" # Critical: ensures the project is not publicly accessible\n}\n```"
20
27
  },
21
28
  "Recommendation": {
22
- "Text": "Ensure that all CodeBuild projects are private to avoid fact gathering about builds from an Attacker.",
23
- "Url": "https://docs.aws.amazon.com/codebuild/latest/userguide/public-builds.html"
29
+ "Text": "Set visibility to `PRIVATE` and share only with trusted principals using narrowly scoped policies. Apply **least privilege** to logs and artifacts, keeping them private. Manage secrets via **Secrets Manager** or **Parameter Store**, avoid printing them, and validate artifacts (e.g., checksums).",
30
+ "Url": "https://hub.prowler.com/check/codebuild_project_not_publicly_accessible"
24
31
  }
25
32
  },
26
- "Categories": [],
33
+ "Categories": [
34
+ "internet-exposed",
35
+ "ci-cd"
36
+ ],
27
37
  "DependsOn": [],
28
38
  "RelatedTo": [],
29
39
  "Notes": ""
@@ -1,32 +1,37 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "codebuild_project_older_90_days",
4
- "CheckTitle": "Ensure CodeBuild Project has been invoked in the last 90 days",
4
+ "CheckTitle": "CodeBuild project has been invoked in the last 90 days",
5
5
  "CheckType": [
6
- "Software and Configuration Checks",
7
- "Industry and Regulatory Standards"
6
+ "Software and Configuration Checks/AWS Security Best Practices"
8
7
  ],
9
8
  "ServiceName": "codebuild",
10
9
  "SubServiceName": "",
11
- "ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id",
10
+ "ResourceIdTemplate": "",
12
11
  "Severity": "medium",
13
12
  "ResourceType": "AwsCodeBuildProject",
14
- "Description": "Ensure CodeBuild Project has been invoked in the last 90 days",
15
- "Risk": "Older CodeBuild projects can be checked to see if they are currently in use.",
13
+ "Description": "**AWS CodeBuild projects** are assessed for recent activity using the last build invocation timestamp. Projects not invoked within `90 days` or never built are treated as **inactive**.",
14
+ "Risk": "**Inactive projects** increase **attack surface**. Dormant webhooks or **source credentials** can be abused, and attached **IAM roles** may retain excessive permissions. Stale configs can expose **secrets** in env vars or logs, threatening build **integrity** and data **confidentiality**, while adding avoidable cost and operational sprawl.",
16
15
  "RelatedUrl": "",
16
+ "AdditionalURLs": [
17
+ "https://docs.aws.amazon.com/codebuild/latest/userguide/delete-project.html",
18
+ "https://support.icompaas.com/support/solutions/articles/62000233684-ensure-codebuild-project-has-been-invoked-in-the-last-90-days"
19
+ ],
17
20
  "Remediation": {
18
21
  "Code": {
19
22
  "CLI": "",
20
23
  "NativeIaC": "",
21
- "Other": "",
24
+ "Other": "1. Open the AWS Console and go to CodeBuild\n2. In Build projects, select the project\n3. Click Start build, then confirm Start build\n4. Wait for the build to start to update the last invoked time",
22
25
  "Terraform": ""
23
26
  },
24
27
  "Recommendation": {
25
- "Text": "Check if CodeBuild project are really in use and remove the stale ones",
26
- "Url": "https://docs.aws.amazon.com/codebuild/latest/userguide/delete-project.html"
28
+ "Text": "Implement lifecycle management: review projects idle over `90 days`, confirm ownership and need, then delete or archive. Revoke unused webhooks, tokens, and service roles; rotate any secrets. Enforce **least privilege**, tagging, and periodic audits to reduce **attack surface** and keep the build environment tidy and defensible.",
29
+ "Url": "https://hub.prowler.com/check/codebuild_project_older_90_days"
27
30
  }
28
31
  },
29
- "Categories": [],
32
+ "Categories": [
33
+ "ci-cd"
34
+ ],
30
35
  "DependsOn": [],
31
36
  "RelatedTo": [],
32
37
  "Notes": ""
@@ -1,28 +1,36 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "codebuild_project_s3_logs_encrypted",
4
- "CheckTitle": "Ensure S3 Logs for CodeBuild Projects are encrypted at rest.",
4
+ "CheckTitle": "CodeBuild project S3 logs are encrypted at rest",
5
5
  "CheckType": [
6
+ "Software and Configuration Checks/AWS Security Best Practices",
7
+ "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices",
6
8
  "Effects/Data Exposure"
7
9
  ],
8
10
  "ServiceName": "codebuild",
9
11
  "SubServiceName": "",
10
- "ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id",
12
+ "ResourceIdTemplate": "",
11
13
  "Severity": "low",
12
14
  "ResourceType": "AwsCodeBuildProject",
13
- "Description": "Ensure that the S3 logs for CodeBuild projects are encrypted at rest.",
14
- "Risk": "If the logs are not encrypted, sensitive information could be exposed to unauthorized users.",
15
- "RelatedUrl": "https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console-logs",
15
+ "Description": "**CodeBuild projects** with **S3 log delivery** are evaluated for **encryption at rest** on their S3 log objects. Only projects that write logs to S3 are in scope.",
16
+ "Risk": "Unencrypted build logs jeopardize **confidentiality**. Logs can include secrets, environment data, and error traces. If the bucket is misconfigured or storage is accessed, attackers can harvest credentials and map the pipeline, enabling **lateral movement** and build tampering that impacts **integrity**.",
17
+ "RelatedUrl": "",
18
+ "AdditionalURLs": [
19
+ "https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console-logs",
20
+ "https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-3",
21
+ "https://support.icompaas.com/support/solutions/articles/62000233685-ensure-s3-logs-for-codebuild-projects-are-encrypted-at-rest",
22
+ "https://hub.powerpipe.io/mods/turbot/steampipe-mod-aws-compliance/benchmarks/control.codebuild_project_s3_logs_encryption_enabled"
23
+ ],
16
24
  "Remediation": {
17
25
  "Code": {
18
- "CLI": "aws codebuild update-project --name <project-name> --logs-config \"s3Logs={status=ENABLED, location=<bucket-name>/<path>, encryptionDisabled=false\"}",
19
- "NativeIaC": "",
20
- "Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-3",
21
- "Terraform": ""
26
+ "CLI": "aws codebuild update-project --name <project-name> --logs-config s3Logs={status=ENABLED,location=<bucket-name>/<path>,encryptionDisabled=false}",
27
+ "NativeIaC": "```yaml\nResources:\n <example_resource_name>:\n Type: AWS::CodeBuild::Project\n Properties:\n Name: <example_resource_name>\n ServiceRole: <example_role_arn>\n Artifacts:\n Type: NO_ARTIFACTS\n Environment:\n Type: LINUX_CONTAINER\n ComputeType: BUILD_GENERAL1_SMALL\n Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0\n Source:\n Type: NO_SOURCE\n LogsConfig:\n S3Logs:\n Status: ENABLED\n Location: <bucket-name>/<path>\n EncryptionDisabled: false # Critical: ensures S3 logs are encrypted at rest\n```",
28
+ "Other": "1. Open the AWS CodeBuild console and select your project\n2. Choose Edit, then open the Logs section\n3. Under S3 logs, select Enabled and choose the Bucket/Path\n4. Ensure Disable S3 log encryption is unchecked (encryption enabled)\n5. Save changes",
29
+ "Terraform": "```hcl\nresource \"aws_codebuild_project\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n service_role = \"<example_role_arn>\"\n\n artifacts { type = \"NO_ARTIFACTS\" }\n\n environment {\n compute_type = \"BUILD_GENERAL1_SMALL\"\n image = \"aws/codebuild/amazonlinux2-x86_64-standard:5.0\"\n type = \"LINUX_CONTAINER\"\n }\n\n source { type = \"NO_SOURCE\" }\n\n logs_config {\n s3_logs {\n status = \"ENABLED\"\n location = \"<bucket-name>/<path>\"\n encryption_disabled = false # Critical: enables encryption for S3 logs\n }\n }\n}\n```"
22
30
  },
23
31
  "Recommendation": {
24
- "Text": "Ensure that the CodeBuild project's S3 logs are encrypted at rest by setting the `encryptionDisabled` parameter to `false` in the `s3Logs` configuration.",
25
- "Url": "https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console-logs"
32
+ "Text": "Enable encryption at rest for S3 logs on CodeBuild projects. Prefer `SSE-KMS` with customer-managed keys to control access and rotation. Enforce encryption via bucket policy, apply **least privilege** to log access, and monitor access patterns. *If needed*, segregate logs and keep them private.",
33
+ "Url": "https://hub.prowler.com/check/codebuild_project_s3_logs_encrypted"
26
34
  }
27
35
  },
28
36
  "Categories": [
@@ -1,31 +1,40 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "codebuild_project_source_repo_url_no_sensitive_credentials",
4
- "CheckTitle": "Ensure CodeBuild project source repository URLs do not contain sensitive credentials",
4
+ "CheckTitle": "CodeBuild project source repository URLs do not contain sensitive credentials",
5
5
  "CheckType": [
6
- "Security Best Practices"
6
+ "Software and Configuration Checks/AWS Security Best Practices",
7
+ "Sensitive Data Identifications/Passwords",
8
+ "Sensitive Data Identifications/Security",
9
+ "Effects/Data Exposure"
7
10
  ],
8
11
  "ServiceName": "codebuild",
9
12
  "SubServiceName": "",
10
- "ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id",
13
+ "ResourceIdTemplate": "",
11
14
  "Severity": "critical",
12
15
  "ResourceType": "AwsCodeBuildProject",
13
- "Description": "This check ensures an AWS CodeBuild project source repository URL doesn't contain personal access tokens or a user name and password. The check fails if the source repository URL contains personal access tokens or a user name and password.",
14
- "Risk": "Storing or transmitting sign-in credentials in clear text or including them in the source repository URL can lead to unintended data exposure or unauthorized access, potentially compromising the security of the system.",
15
- "RelatedUrl": "https://docs.aws.amazon.com/config/latest/developerguide/codebuild-project-source-repo-url-check.html",
16
+ "Description": "**AWS CodeBuild projects** with **Bitbucket sources** are assessed to confirm repository URLs do not embed credentials (for example, `x-token-auth:<token>@` or `user:password@`). The assessment includes both the primary source and all secondary sources.",
17
+ "Risk": "Credentials in URLs are **plainly exposed** in configs and logs, enabling unauthorized repo access. This can lead to:\n- **Source code theft** (C)\n- **Malicious commits/CI changes** (I)\n- **Supply-chain compromise** and lateral movement via token reuse",
18
+ "RelatedUrl": "",
19
+ "AdditionalURLs": [
20
+ "https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-1",
21
+ "https://docs.aws.amazon.com/config/latest/developerguide/codebuild-project-source-repo-url-check.html"
22
+ ],
16
23
  "Remediation": {
17
24
  "Code": {
18
25
  "CLI": "",
19
- "NativeIaC": "",
20
- "Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-1",
21
- "Terraform": ""
26
+ "NativeIaC": "```yaml\nResources:\n <example_resource_name>:\n Type: AWS::CodeBuild::Project\n Properties:\n Name: <example_resource_name>\n ServiceRole: <example_role_arn>\n Artifacts:\n Type: NO_ARTIFACTS\n Environment:\n Type: LINUX_CONTAINER\n Image: aws/codebuild/standard:5.0\n ComputeType: BUILD_GENERAL1_SMALL\n Source:\n Type: BITBUCKET\n Location: https://bitbucket.org/<example_owner>/<example_repo>.git # FIX: remove embedded credentials; keep only the repo URL\n # This removes tokens/user:pass from the URL, eliminating exposed secrets\n```",
27
+ "Other": "1. In the AWS Console, go to CodeBuild and open your project\n2. Click Edit > Source\n3. Replace the repository URL with only the Bitbucket path (no credentials):\n - https://bitbucket.org/<workspace>/<repo>.git\n4. If prompted for access, choose Connect using OAuth and authorize Bitbucket\n5. Save changes\n6. If you use Secondary sources, edit each one and remove any embedded credentials from their URLs",
28
+ "Terraform": "```hcl\nresource \"aws_codebuild_project\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n service_role = \"<example_role_arn>\"\n\n artifacts {\n type = \"NO_ARTIFACTS\"\n }\n\n environment {\n compute_type = \"BUILD_GENERAL1_SMALL\"\n image = \"aws/codebuild/standard:5.0\"\n type = \"LINUX_CONTAINER\"\n }\n\n source {\n type = \"BITBUCKET\"\n location = \"https://bitbucket.org/<example_owner>/<example_repo>.git\" # FIX: sanitized URL without credentials\n # Removing credentials from the URL prevents sensitive data exposure\n }\n}\n```"
22
29
  },
23
30
  "Recommendation": {
24
- "Text": "Update your CodeBuild project to use OAuth instead of personal access tokens or basic authentication in your repository URLs.",
25
- "Url": "https://docs.aws.amazon.com/codebuild/latest/userguide/use-case-based-samples.html"
31
+ "Text": "Use **OAuth/CodeStar Connections** or store tokens in **Secrets Manager/SSM**, never in the URL. Enforce **least privilege**, scope to needed repos, set short lifetimes, and rotate regularly. Audit configs and logs to remove leaked secrets. *Apply to primary and secondary sources.*",
32
+ "Url": "https://hub.prowler.com/check/codebuild_project_source_repo_url_no_sensitive_credentials"
26
33
  }
27
34
  },
28
- "Categories": [],
35
+ "Categories": [
36
+ "secrets"
37
+ ],
29
38
  "DependsOn": [],
30
39
  "RelatedTo": [],
31
40
  "Notes": ""
@@ -1,32 +1,39 @@
1
1
  {
2
2
  "Provider": "aws",
3
3
  "CheckID": "codebuild_project_user_controlled_buildspec",
4
- "CheckTitle": "Ensure CodeBuild Project uses a controlled buildspec",
4
+ "CheckTitle": "CodeBuild project does not use a user-controlled buildspec file",
5
5
  "CheckType": [
6
- "Software and Configuration Checks",
7
- "Industry and Regulatory Standards"
6
+ "Software and Configuration Checks/AWS Security Best Practices"
8
7
  ],
9
8
  "ServiceName": "codebuild",
10
9
  "SubServiceName": "",
11
- "ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id",
10
+ "ResourceIdTemplate": "",
12
11
  "Severity": "medium",
13
12
  "ResourceType": "AwsCodeBuildProject",
14
- "Description": "Ensure CodeBuild Project uses a controlled buildspec",
15
- "Risk": "The CodeBuild projects with user controlled buildspec",
13
+ "Description": "AWS CodeBuild projects are evaluated for use of a **user-controlled buildspec**, identified when the project references a repository file like `*.yml` or `*.yaml`. Projects using non file-based build instructions are treated as centrally managed.",
14
+ "Risk": "Repository-controlled buildspecs let unreviewed changes run in CI, endangering **integrity** (tampered artifacts), **confidentiality** (secret leakage), and **availability** (resource abuse). Attackers can weaponize PRs to execute code and pivot via the build role.",
16
15
  "RelatedUrl": "",
16
+ "AdditionalURLs": [
17
+ "https://docs.aws.amazon.com/codebuild/latest/userguide/security.html",
18
+ "https://support.icompaas.com/support/solutions/articles/62000229579-ensure-codebuild-project-with-an-user-controlled-buildspec",
19
+ "https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html"
20
+ ],
17
21
  "Remediation": {
18
22
  "Code": {
19
23
  "CLI": "",
20
- "NativeIaC": "",
21
- "Other": "",
22
- "Terraform": ""
24
+ "NativeIaC": "```yaml\nResources:\n <example_resource_name>:\n Type: AWS::CodeBuild::Project\n Properties:\n ServiceRole: <example_role_arn>\n Artifacts:\n Type: NO_ARTIFACTS\n Environment:\n Type: LINUX_CONTAINER\n ComputeType: BUILD_GENERAL1_SMALL\n Image: <IMAGE>\n Source:\n Type: CODEPIPELINE\n BuildSpec: | # Critical: Inline buildspec avoids using a user-controlled file path\n version: 0.2\n```",
25
+ "Other": "1. In the AWS Console, go to CodeBuild > Projects and open the target project\n2. Click Edit\n3. In Source, under Buildspec, select Insert build commands (not Use a buildspec file)\n4. Paste minimal inline YAML:\n ```\n version: 0.2\n ```\n5. Save",
26
+ "Terraform": "```hcl\nresource \"aws_codebuild_project\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n service_role = \"<example_role_arn>\"\n\n artifacts {\n type = \"NO_ARTIFACTS\"\n }\n\n environment {\n compute_type = \"BUILD_GENERAL1_SMALL\"\n image = \"<IMAGE>\"\n type = \"LINUX_CONTAINER\"\n }\n\n source {\n type = \"CODEPIPELINE\"\n buildspec = <<EOT\nversion: 0.2\nEOT\n # Critical: Inline buildspec avoids using a user-controlled buildspec file\n }\n}\n```"
23
27
  },
24
28
  "Recommendation": {
25
- "Text": "Use buildspec.yml from a trusted source which user cant interfere with",
26
- "Url": "https://docs.aws.amazon.com/codebuild/latest/userguide/security.html"
29
+ "Text": "Adopt a **centrally managed buildspec** that contributors cannot modify.\n- Enforce protected branches and required reviews for build instructions\n- Apply **least privilege** to the build role and minimize secrets\n- Separate duties for pipeline admins vs code authors\n\nUse vetted, versioned templates for defense in depth.",
30
+ "Url": "https://hub.prowler.com/check/codebuild_project_user_controlled_buildspec"
27
31
  }
28
32
  },
29
- "Categories": [],
33
+ "Categories": [
34
+ "software-supply-chain",
35
+ "ci-cd"
36
+ ],
30
37
  "DependsOn": [],
31
38
  "RelatedTo": [],
32
39
  "Notes": ""