prowler-cloud 5.13.1__py3-none-any.whl → 5.14.1__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.
- dashboard/__main__.py +2 -1
- dashboard/compliance/c5_azure.py +43 -0
- dashboard/compliance/fedramp_20x_ksi_low_aws.py +46 -0
- dashboard/compliance/fedramp_20x_ksi_low_azure.py +46 -0
- dashboard/compliance/fedramp_20x_ksi_low_gcp.py +46 -0
- dashboard/compliance/hipaa_gcp.py +25 -0
- dashboard/compliance/nist_csf_2_0_aws.py +24 -0
- dashboard/compliance/prowler_threatscore_kubernetes.py +28 -0
- prowler/AGENTS.md +366 -0
- prowler/CHANGELOG.md +93 -2
- prowler/__main__.py +54 -7
- prowler/compliance/aws/ens_rd2022_aws.json +1 -1
- prowler/compliance/aws/fedramp_20x_ksi_low_aws.json +347 -0
- prowler/compliance/aws/nis2_aws.json +1 -1
- prowler/compliance/aws/nist_csf_2.0_aws.json +1781 -0
- prowler/compliance/azure/c5_azure.json +9471 -0
- prowler/compliance/azure/ens_rd2022_azure.json +1 -1
- prowler/compliance/azure/fedramp_20x_ksi_low_azure.json +358 -0
- prowler/compliance/azure/nis2_azure.json +1 -1
- prowler/compliance/gcp/c5_gcp.json +9401 -0
- prowler/compliance/gcp/ens_rd2022_gcp.json +1 -1
- prowler/compliance/gcp/fedramp_20x_ksi_low_gcp.json +293 -0
- prowler/compliance/gcp/hipaa_gcp.json +415 -0
- prowler/compliance/gcp/nis2_gcp.json +1 -1
- prowler/compliance/github/cis_1.0_github.json +6 -2
- prowler/compliance/kubernetes/prowler_threatscore_kubernetes.json +1269 -0
- prowler/compliance/m365/prowler_threatscore_m365.json +6 -6
- prowler/compliance/{oci/cis_3.0_oci.json → oraclecloud/cis_3.0_oraclecloud.json} +1 -1
- prowler/config/config.py +59 -5
- prowler/config/config.yaml +3 -0
- prowler/lib/check/check.py +1 -9
- prowler/lib/check/checks_loader.py +65 -1
- prowler/lib/check/models.py +12 -2
- prowler/lib/check/utils.py +1 -7
- prowler/lib/cli/parser.py +17 -7
- prowler/lib/mutelist/mutelist.py +15 -7
- prowler/lib/outputs/compliance/c5/c5_azure.py +92 -0
- prowler/lib/outputs/compliance/c5/c5_gcp.py +92 -0
- prowler/lib/outputs/compliance/c5/models.py +54 -0
- prowler/lib/outputs/compliance/cis/{cis_oci.py → cis_oraclecloud.py} +7 -7
- prowler/lib/outputs/compliance/cis/models.py +3 -3
- prowler/lib/outputs/compliance/prowler_threatscore/models.py +29 -0
- prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_kubernetes.py +98 -0
- prowler/lib/outputs/finding.py +16 -5
- prowler/lib/outputs/html/html.py +10 -8
- prowler/lib/outputs/outputs.py +1 -1
- prowler/lib/outputs/summary_table.py +1 -1
- prowler/lib/powershell/powershell.py +12 -11
- prowler/lib/scan/scan.py +105 -24
- prowler/lib/utils/utils.py +1 -1
- prowler/providers/aws/aws_regions_by_service.json +73 -15
- prowler/providers/aws/lib/quick_inventory/quick_inventory.py +1 -1
- prowler/providers/aws/lib/security_hub/security_hub.py +1 -1
- prowler/providers/aws/services/account/account_service.py +1 -1
- prowler/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes.metadata.json +1 -3
- prowler/providers/aws/services/cloudwatch/cloudwatch_alarm_actions_alarm_state_configured/cloudwatch_alarm_actions_alarm_state_configured.metadata.json +23 -12
- prowler/providers/aws/services/cloudwatch/cloudwatch_alarm_actions_enabled/cloudwatch_alarm_actions_enabled.metadata.json +21 -12
- prowler/providers/aws/services/cloudwatch/cloudwatch_changes_to_network_acls_alarm_configured/cloudwatch_changes_to_network_acls_alarm_configured.metadata.json +23 -12
- prowler/providers/aws/services/cloudwatch/cloudwatch_changes_to_network_gateways_alarm_configured/cloudwatch_changes_to_network_gateways_alarm_configured.metadata.json +24 -12
- 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
- prowler/providers/aws/services/cloudwatch/cloudwatch_changes_to_vpcs_alarm_configured/cloudwatch_changes_to_vpcs_alarm_configured.metadata.json +17 -11
- prowler/providers/aws/services/cloudwatch/cloudwatch_cross_account_sharing_disabled/cloudwatch_cross_account_sharing_disabled.metadata.json +20 -12
- prowler/providers/aws/services/cloudwatch/cloudwatch_log_group_kms_encryption_enabled/cloudwatch_log_group_kms_encryption_enabled.metadata.json +22 -13
- prowler/providers/aws/services/cloudwatch/cloudwatch_log_group_no_secrets_in_logs/cloudwatch_log_group_no_secrets_in_logs.metadata.json +22 -17
- prowler/providers/aws/services/cloudwatch/cloudwatch_log_group_not_publicly_accessible/cloudwatch_log_group_not_publicly_accessible.metadata.json +18 -12
- 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
- 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
- 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
- prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_authentication_failures/cloudwatch_log_metric_filter_authentication_failures.metadata.json +25 -12
- prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_aws_organizations_changes/cloudwatch_log_metric_filter_aws_organizations_changes.metadata.json +23 -12
- 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
- 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
- prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_policy_changes/cloudwatch_log_metric_filter_policy_changes.metadata.json +21 -12
- prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_root_usage/cloudwatch_log_metric_filter_root_usage.metadata.json +27 -12
- prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_security_group_changes/cloudwatch_log_metric_filter_security_group_changes.metadata.json +22 -12
- 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
- prowler/providers/aws/services/cloudwatch/cloudwatch_log_metric_filter_unauthorized_api_calls/cloudwatch_log_metric_filter_unauthorized_api_calls.metadata.json +25 -12
- prowler/providers/aws/services/codeartifact/codeartifact_packages_external_public_publishing_disabled/codeartifact_packages_external_public_publishing_disabled.metadata.json +20 -11
- prowler/providers/aws/services/codebuild/codebuild_project_logging_enabled/codebuild_project_logging_enabled.metadata.json +22 -12
- prowler/providers/aws/services/codebuild/codebuild_project_no_secrets_in_variables/codebuild_project_no_secrets_in_variables.metadata.json +28 -12
- prowler/providers/aws/services/codebuild/codebuild_project_not_publicly_accessible/codebuild_project_not_publicly_accessible.metadata.json +22 -12
- prowler/providers/aws/services/codebuild/codebuild_project_older_90_days/codebuild_project_older_90_days.metadata.json +15 -10
- prowler/providers/aws/services/codebuild/codebuild_project_s3_logs_encrypted/codebuild_project_s3_logs_encrypted.metadata.json +19 -11
- 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
- prowler/providers/aws/services/codebuild/codebuild_project_user_controlled_buildspec/codebuild_project_user_controlled_buildspec.metadata.json +19 -12
- prowler/providers/aws/services/codebuild/codebuild_project_uses_allowed_github_organizations/codebuild_project_uses_allowed_github_organizations.metadata.json +24 -13
- prowler/providers/aws/services/codebuild/codebuild_report_group_export_encrypted/codebuild_report_group_export_encrypted.metadata.json +35 -13
- prowler/providers/aws/services/codepipeline/__init__.py +0 -0
- prowler/providers/aws/services/codepipeline/codepipeline_client.py +6 -0
- prowler/providers/aws/services/codepipeline/codepipeline_project_repo_private/__init__.py +0 -0
- prowler/providers/aws/services/codepipeline/codepipeline_project_repo_private/codepipeline_project_repo_private.metadata.json +30 -0
- prowler/providers/aws/services/codepipeline/codepipeline_project_repo_private/codepipeline_project_repo_private.py +95 -0
- prowler/providers/aws/services/codepipeline/codepipeline_service.py +164 -0
- prowler/providers/aws/services/directconnect/directconnect_connection_redundancy/directconnect_connection_redundancy.metadata.json +18 -12
- prowler/providers/aws/services/directconnect/directconnect_virtual_interface_redundancy/directconnect_virtual_interface_redundancy.metadata.json +18 -12
- prowler/providers/aws/services/documentdb/documentdb_cluster_backup_enabled/documentdb_cluster_backup_enabled.metadata.json +24 -13
- prowler/providers/aws/services/documentdb/documentdb_cluster_cloudwatch_log_export/documentdb_cluster_cloudwatch_log_export.metadata.json +23 -13
- prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection.metadata.json +24 -13
- prowler/providers/aws/services/documentdb/documentdb_cluster_multi_az_enabled/documentdb_cluster_multi_az_enabled.metadata.json +19 -13
- prowler/providers/aws/services/documentdb/documentdb_cluster_public_snapshot/documentdb_cluster_public_snapshot.metadata.json +20 -10
- prowler/providers/aws/services/documentdb/documentdb_cluster_storage_encrypted/documentdb_cluster_storage_encrypted.metadata.json +26 -13
- prowler/providers/aws/services/drs/drs_job_exist/drs_job_exist.metadata.json +20 -10
- prowler/providers/aws/services/dynamodb/dynamodb_accelerator_cluster_encryption_enabled/dynamodb_accelerator_cluster_encryption_enabled.metadata.json +18 -11
- prowler/providers/aws/services/dynamodb/dynamodb_accelerator_cluster_in_transit_encryption_enabled/dynamodb_accelerator_cluster_in_transit_encryption_enabled.metadata.json +16 -11
- prowler/providers/aws/services/dynamodb/dynamodb_accelerator_cluster_multi_az/dynamodb_accelerator_cluster_multi_az.metadata.json +21 -13
- prowler/providers/aws/services/dynamodb/dynamodb_table_autoscaling_enabled/dynamodb_table_autoscaling_enabled.metadata.json +20 -12
- prowler/providers/aws/services/dynamodb/dynamodb_table_cross_account_access/dynamodb_table_cross_account_access.metadata.json +17 -10
- prowler/providers/aws/services/dynamodb/dynamodb_table_deletion_protection_enabled/dynamodb_table_deletion_protection_enabled.metadata.json +21 -13
- prowler/providers/aws/services/dynamodb/dynamodb_table_protected_by_backup_plan/dynamodb_table_protected_by_backup_plan.metadata.json +18 -12
- prowler/providers/aws/services/dynamodb/dynamodb_tables_kms_cmk_encryption_enabled/dynamodb_tables_kms_cmk_encryption_enabled.metadata.json +18 -12
- prowler/providers/aws/services/dynamodb/dynamodb_tables_pitr_enabled/dynamodb_tables_pitr_enabled.metadata.json +19 -12
- prowler/providers/aws/services/ecr/ecr_registry_scan_images_on_push_enabled/ecr_registry_scan_images_on_push_enabled.metadata.json +16 -11
- prowler/providers/aws/services/ecr/ecr_repositories_lifecycle_policy_enabled/ecr_repositories_lifecycle_policy_enabled.metadata.json +22 -13
- prowler/providers/aws/services/ecr/ecr_repositories_not_publicly_accessible/ecr_repositories_not_publicly_accessible.metadata.json +19 -13
- prowler/providers/aws/services/ecr/ecr_repositories_scan_images_on_push_enabled/ecr_repositories_scan_images_on_push_enabled.metadata.json +21 -13
- prowler/providers/aws/services/ecr/ecr_repositories_scan_vulnerabilities_in_latest_image/ecr_repositories_scan_vulnerabilities_in_latest_image.metadata.json +22 -12
- prowler/providers/aws/services/ecr/ecr_repositories_tag_immutability/ecr_repositories_tag_immutability.metadata.json +20 -12
- prowler/providers/aws/services/ecs/ecs_cluster_container_insights_enabled/ecs_cluster_container_insights_enabled.metadata.json +21 -11
- prowler/providers/aws/services/ecs/ecs_service_fargate_latest_platform_version/ecs_service_fargate_latest_platform_version.metadata.json +20 -11
- prowler/providers/aws/services/ecs/ecs_service_no_assign_public_ip/ecs_service_no_assign_public_ip.metadata.json +18 -12
- prowler/providers/aws/services/ecs/ecs_task_definitions_containers_readonly_access/ecs_task_definitions_containers_readonly_access.metadata.json +20 -13
- prowler/providers/aws/services/ecs/ecs_task_definitions_host_namespace_not_shared/ecs_task_definitions_host_namespace_not_shared.metadata.json +21 -13
- prowler/providers/aws/services/ecs/ecs_task_definitions_host_networking_mode_users/ecs_task_definitions_host_networking_mode_users.metadata.json +26 -13
- prowler/providers/aws/services/ecs/ecs_task_definitions_logging_block_mode/ecs_task_definitions_logging_block_mode.metadata.json +19 -12
- prowler/providers/aws/services/ecs/ecs_task_definitions_logging_enabled/ecs_task_definitions_logging_enabled.metadata.json +18 -12
- prowler/providers/aws/services/ecs/ecs_task_definitions_no_environment_secrets/ecs_task_definitions_no_environment_secrets.metadata.json +16 -12
- prowler/providers/aws/services/ecs/ecs_task_definitions_no_privileged_containers/ecs_task_definitions_no_privileged_containers.metadata.json +21 -14
- prowler/providers/aws/services/ecs/ecs_task_set_no_assign_public_ip/ecs_task_set_no_assign_public_ip.metadata.json +19 -13
- prowler/providers/aws/services/eks/eks_cluster_deletion_protection_enabled/eks_cluster_deletion_protection_enabled.metadata.json +20 -13
- 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
- prowler/providers/aws/services/eks/eks_cluster_network_policy_enabled/eks_cluster_network_policy_enabled.metadata.json +20 -14
- prowler/providers/aws/services/eks/eks_cluster_not_publicly_accessible/eks_cluster_not_publicly_accessible.metadata.json +22 -13
- prowler/providers/aws/services/eks/eks_cluster_private_nodes_enabled/eks_cluster_private_nodes_enabled.metadata.json +19 -13
- prowler/providers/aws/services/eks/eks_cluster_uses_a_supported_version/eks_cluster_uses_a_supported_version.metadata.json +21 -12
- prowler/providers/aws/services/eks/eks_control_plane_logging_all_types_enabled/eks_control_plane_logging_all_types_enabled.metadata.json +20 -13
- prowler/providers/aws/services/elasticache/elasticache_cluster_uses_public_subnet/elasticache_cluster_uses_public_subnet.metadata.json +20 -12
- prowler/providers/aws/services/elasticache/elasticache_redis_cluster_auto_minor_version_upgrades/elasticache_redis_cluster_auto_minor_version_upgrades.metadata.json +21 -12
- prowler/providers/aws/services/elasticache/elasticache_redis_cluster_automatic_failover_enabled/elasticache_redis_cluster_automatic_failover_enabled.metadata.json +20 -13
- prowler/providers/aws/services/elasticache/elasticache_redis_cluster_backup_enabled/elasticache_redis_cluster_backup_enabled.metadata.json +23 -13
- prowler/providers/aws/services/elasticache/elasticache_redis_cluster_in_transit_encryption_enabled/elasticache_redis_cluster_in_transit_encryption_enabled.metadata.json +21 -12
- prowler/providers/aws/services/elasticache/elasticache_redis_cluster_multi_az_enabled/elasticache_redis_cluster_multi_az_enabled.metadata.json +22 -14
- prowler/providers/aws/services/elasticache/elasticache_redis_cluster_rest_encryption_enabled/elasticache_redis_cluster_rest_encryption_enabled.metadata.json +20 -11
- prowler/providers/aws/services/elasticache/elasticache_redis_replication_group_auth_enabled/elasticache_redis_replication_group_auth_enabled.metadata.json +23 -13
- prowler/providers/aws/services/elasticbeanstalk/elasticbeanstalk_environment_cloudwatch_logging_enabled/elasticbeanstalk_environment_cloudwatch_logging_enabled.metadata.json +18 -12
- prowler/providers/aws/services/elasticbeanstalk/elasticbeanstalk_environment_enhanced_health_reporting/elasticbeanstalk_environment_enhanced_health_reporting.metadata.json +17 -12
- prowler/providers/aws/services/elasticbeanstalk/elasticbeanstalk_environment_managed_updates_enabled/elasticbeanstalk_environment_managed_updates_enabled.metadata.json +17 -11
- prowler/providers/aws/services/elb/elb_connection_draining_enabled/elb_connection_draining_enabled.metadata.json +22 -13
- prowler/providers/aws/services/elb/elb_cross_zone_load_balancing_enabled/elb_cross_zone_load_balancing_enabled.metadata.json +24 -13
- prowler/providers/aws/services/elb/elb_desync_mitigation_mode/elb_desync_mitigation_mode.metadata.json +20 -11
- prowler/providers/aws/services/elb/elb_insecure_ssl_ciphers/elb_insecure_ssl_ciphers.metadata.json +20 -10
- prowler/providers/aws/services/elb/elb_internet_facing/elb_internet_facing.metadata.json +20 -11
- prowler/providers/aws/services/elb/elb_is_in_multiple_az/elb_is_in_multiple_az.metadata.json +20 -12
- prowler/providers/aws/services/elb/elb_logging_enabled/elb_logging_enabled.metadata.json +19 -12
- prowler/providers/aws/services/elb/elb_ssl_listeners/elb_ssl_listeners.metadata.json +19 -11
- prowler/providers/aws/services/elb/elb_ssl_listeners_use_acm_certificate/elb_ssl_listeners_use_acm_certificate.metadata.json +17 -12
- prowler/providers/aws/services/elbv2/elbv2_cross_zone_load_balancing_enabled/elbv2_cross_zone_load_balancing_enabled.metadata.json +21 -13
- prowler/providers/aws/services/elbv2/elbv2_deletion_protection/elbv2_deletion_protection.metadata.json +19 -11
- prowler/providers/aws/services/elbv2/elbv2_desync_mitigation_mode/elbv2_desync_mitigation_mode.metadata.json +21 -12
- prowler/providers/aws/services/elbv2/elbv2_insecure_ssl_ciphers/elbv2_insecure_ssl_ciphers.metadata.json +18 -11
- prowler/providers/aws/services/elbv2/elbv2_internet_facing/elbv2_internet_facing.metadata.json +17 -10
- prowler/providers/aws/services/elbv2/elbv2_is_in_multiple_az/elbv2_is_in_multiple_az.metadata.json +22 -13
- prowler/providers/aws/services/elbv2/elbv2_listeners_underneath/elbv2_listeners_underneath.metadata.json +18 -12
- prowler/providers/aws/services/elbv2/elbv2_logging_enabled/elbv2_logging_enabled.metadata.json +17 -12
- prowler/providers/aws/services/elbv2/elbv2_nlb_tls_termination_enabled/elbv2_nlb_tls_termination_enabled.metadata.json +18 -11
- prowler/providers/aws/services/elbv2/elbv2_ssl_listeners/elbv2_ssl_listeners.metadata.json +18 -12
- prowler/providers/aws/services/elbv2/elbv2_waf_acl_attached/elbv2_waf_acl_attached.metadata.json +16 -11
- prowler/providers/aws/services/emr/emr_cluster_account_public_block_enabled/emr_cluster_account_public_block_enabled.metadata.json +21 -13
- prowler/providers/aws/services/emr/emr_cluster_master_nodes_no_public_ip/emr_cluster_master_nodes_no_public_ip.metadata.json +24 -11
- prowler/providers/aws/services/emr/emr_cluster_publicly_accesible/emr_cluster_publicly_accesible.metadata.json +18 -11
- prowler/providers/aws/services/eventbridge/eventbridge_bus_cross_account_access/eventbridge_bus_cross_account_access.metadata.json +26 -13
- prowler/providers/aws/services/eventbridge/eventbridge_bus_exposed/eventbridge_bus_exposed.metadata.json +21 -11
- prowler/providers/aws/services/eventbridge/eventbridge_global_endpoint_event_replication_enabled/eventbridge_global_endpoint_event_replication_enabled.metadata.json +24 -13
- prowler/providers/aws/services/eventbridge/eventbridge_schema_registry_cross_account_access/eventbridge_schema_registry_cross_account_access.metadata.json +26 -14
- prowler/providers/aws/services/firehose/firehose_stream_encrypted_at_rest/firehose_stream_encrypted_at_rest.metadata.json +26 -15
- prowler/providers/aws/services/firehose/firehose_stream_encrypted_at_rest/firehose_stream_encrypted_at_rest.py +15 -16
- prowler/providers/aws/services/fms/fms_policy_compliant/fms_policy_compliant.metadata.json +23 -11
- 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
- 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
- prowler/providers/aws/services/fsx/fsx_windows_file_system_multi_az_enabled/fsx_windows_file_system_multi_az_enabled.metadata.json +22 -13
- prowler/providers/aws/services/glacier/glacier_vaults_policy_public_access/glacier_vaults_policy_public_access.metadata.json +21 -12
- prowler/providers/aws/services/iam/lib/policy.py +24 -16
- prowler/providers/aws/services/kinesis/kinesis_stream_data_retention_period/kinesis_stream_data_retention_period.metadata.json +21 -13
- prowler/providers/aws/services/kinesis/kinesis_stream_encrypted_at_rest/kinesis_stream_encrypted_at_rest.metadata.json +22 -13
- prowler/providers/azure/services/cosmosdb/cosmosdb_service.py +7 -2
- prowler/providers/azure/services/defender/defender_service.py +4 -2
- prowler/providers/azure/services/postgresql/postgresql_flexible_server_entra_id_authentication_enabled/__init__.py +0 -0
- prowler/providers/azure/services/postgresql/postgresql_flexible_server_entra_id_authentication_enabled/postgresql_flexible_server_entra_id_authentication_enabled.metadata.json +36 -0
- prowler/providers/azure/services/postgresql/postgresql_flexible_server_entra_id_authentication_enabled/postgresql_flexible_server_entra_id_authentication_enabled.py +43 -0
- prowler/providers/azure/services/postgresql/postgresql_service.py +66 -9
- prowler/providers/azure/services/storage/storage_service.py +13 -4
- prowler/providers/azure/services/vm/vm_service.py +4 -7
- prowler/providers/common/arguments.py +19 -16
- prowler/providers/common/provider.py +2 -18
- prowler/providers/gcp/services/artifacts/artifacts_container_analysis_enabled/artifacts_container_analysis_enabled.metadata.json +16 -15
- prowler/providers/gcp/services/cloudresourcemanager/cloudresourcemanager_service.py +30 -4
- prowler/providers/gcp/services/cloudstorage/cloudstorage_audit_logs_enabled/__init__.py +0 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_audit_logs_enabled/cloudstorage_audit_logs_enabled.metadata.json +36 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_audit_logs_enabled/cloudstorage_audit_logs_enabled.py +61 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_log_retention_policy_lock/cloudstorage_bucket_log_retention_policy_lock.metadata.json +12 -9
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_log_retention_policy_lock/cloudstorage_bucket_log_retention_policy_lock.py +10 -3
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_logging_enabled/__init__.py +0 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_logging_enabled/cloudstorage_bucket_logging_enabled.metadata.json +36 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_logging_enabled/cloudstorage_bucket_logging_enabled.py +40 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_soft_delete_enabled/__init__.py +0 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_soft_delete_enabled/cloudstorage_bucket_soft_delete_enabled.metadata.json +36 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_soft_delete_enabled/cloudstorage_bucket_soft_delete_enabled.py +31 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_sufficient_retention_period/__init__.py +0 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_sufficient_retention_period/cloudstorage_bucket_sufficient_retention_period.metadata.json +35 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_sufficient_retention_period/cloudstorage_bucket_sufficient_retention_period.py +55 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_versioning_enabled/__init__.py +0 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_versioning_enabled/cloudstorage_bucket_versioning_enabled.metadata.json +36 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_bucket_versioning_enabled/cloudstorage_bucket_versioning_enabled.py +30 -0
- prowler/providers/gcp/services/cloudstorage/cloudstorage_service.py +48 -2
- prowler/providers/github/services/organization/organization_default_repository_permission_strict/__init__.py +0 -0
- prowler/providers/github/services/organization/organization_default_repository_permission_strict/organization_default_repository_permission_strict.metadata.json +35 -0
- prowler/providers/github/services/organization/organization_default_repository_permission_strict/organization_default_repository_permission_strict.py +36 -0
- prowler/providers/github/services/organization/organization_members_mfa_required/organization_members_mfa_required.metadata.json +14 -8
- prowler/providers/github/services/organization/organization_repository_creation_limited/__init__.py +0 -0
- prowler/providers/github/services/organization/organization_repository_creation_limited/organization_repository_creation_limited.metadata.json +30 -0
- prowler/providers/github/services/organization/organization_repository_creation_limited/organization_repository_creation_limited.py +106 -0
- prowler/providers/github/services/organization/organization_service.py +84 -10
- prowler/providers/iac/iac_provider.py +279 -55
- prowler/providers/kubernetes/services/etcd/etcd_client_cert_auth/etcd_client_cert_auth.metadata.json +18 -13
- prowler/providers/kubernetes/services/etcd/etcd_no_auto_tls/etcd_no_auto_tls.metadata.json +16 -11
- prowler/providers/kubernetes/services/etcd/etcd_no_peer_auto_tls/etcd_no_peer_auto_tls.metadata.json +16 -11
- prowler/providers/kubernetes/services/etcd/etcd_peer_client_cert_auth/etcd_peer_client_cert_auth.metadata.json +18 -13
- prowler/providers/kubernetes/services/etcd/etcd_peer_tls_config/etcd_peer_tls_config.metadata.json +16 -12
- prowler/providers/kubernetes/services/etcd/etcd_tls_encryption/etcd_tls_encryption.metadata.json +16 -11
- prowler/providers/kubernetes/services/etcd/etcd_unique_ca/etcd_unique_ca.metadata.json +16 -10
- prowler/providers/m365/lib/powershell/m365_powershell.py +80 -93
- prowler/providers/m365/m365_provider.py +1 -6
- prowler/providers/m365/services/exchange/exchange_mailbox_policy_additional_storage_restricted/exchange_mailbox_policy_additional_storage_restricted.py +17 -21
- prowler/providers/m365/services/exchange/exchange_service.py +18 -12
- prowler/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed.py +9 -7
- prowler/providers/mongodbatlas/exceptions/exceptions.py +16 -0
- prowler/providers/mongodbatlas/mongodbatlas_provider.py +15 -3
- prowler/providers/mongodbatlas/services/projects/projects_auditing_enabled/projects_auditing_enabled.metadata.json +20 -9
- prowler/providers/mongodbatlas/services/projects/projects_network_access_list_exposed_to_internet/projects_network_access_list_exposed_to_internet.metadata.json +14 -9
- prowler/providers/oraclecloud/lib/arguments/arguments.py +4 -13
- prowler/providers/oraclecloud/lib/service/service.py +3 -3
- prowler/providers/oraclecloud/{oci_provider.py → oraclecloud_provider.py} +15 -15
- prowler/providers/oraclecloud/services/analytics/analytics_instance_access_restricted/analytics_instance_access_restricted.metadata.json +20 -16
- prowler/providers/oraclecloud/services/audit/audit_log_retention_period_365_days/audit_log_retention_period_365_days.metadata.json +17 -17
- prowler/providers/oraclecloud/services/blockstorage/blockstorage_block_volume_encrypted_with_cmk/blockstorage_block_volume_encrypted_with_cmk.metadata.json +17 -19
- prowler/providers/oraclecloud/services/blockstorage/blockstorage_boot_volume_encrypted_with_cmk/blockstorage_boot_volume_encrypted_with_cmk.metadata.json +18 -18
- prowler/providers/oraclecloud/services/cloudguard/cloudguard_enabled/cloudguard_enabled.metadata.json +17 -18
- prowler/providers/oraclecloud/services/compute/compute_instance_in_transit_encryption_enabled/compute_instance_in_transit_encryption_enabled.metadata.json +1 -1
- prowler/providers/oraclecloud/services/compute/compute_instance_legacy_metadata_endpoint_disabled/compute_instance_legacy_metadata_endpoint_disabled.metadata.json +1 -1
- prowler/providers/oraclecloud/services/compute/compute_instance_secure_boot_enabled/compute_instance_secure_boot_enabled.metadata.json +1 -1
- prowler/providers/oraclecloud/services/database/database_autonomous_database_access_restricted/database_autonomous_database_access_restricted.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_notification_topic_and_subscription_exists/events_notification_topic_and_subscription_exists.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_cloudguard_problems/events_rule_cloudguard_problems.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_iam_group_changes/events_rule_iam_group_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_iam_policy_changes/events_rule_iam_policy_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_identity_provider_changes/events_rule_identity_provider_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_idp_group_mapping_changes/events_rule_idp_group_mapping_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_local_user_authentication/events_rule_local_user_authentication.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_network_gateway_changes/events_rule_network_gateway_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_network_security_group_changes/events_rule_network_security_group_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_route_table_changes/events_rule_route_table_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_security_list_changes/events_rule_security_list_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_user_changes/events_rule_user_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/events/events_rule_vcn_changes/events_rule_vcn_changes.metadata.json +1 -1
- prowler/providers/oraclecloud/services/filestorage/filestorage_file_system_encrypted_with_cmk/filestorage_file_system_encrypted_with_cmk.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_iam_admins_cannot_update_tenancy_admins/identity_iam_admins_cannot_update_tenancy_admins.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_instance_principal_used/identity_instance_principal_used.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_no_resources_in_root_compartment/identity_no_resources_in_root_compartment.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_non_root_compartment_exists/identity_non_root_compartment_exists.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_password_policy_expires_within_365_days/identity_password_policy_expires_within_365_days.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_password_policy_minimum_length_14/identity_password_policy_minimum_length_14.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_password_policy_prevents_reuse/identity_password_policy_prevents_reuse.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_service_level_admins_exist/identity_service_level_admins_exist.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_tenancy_admin_permissions_limited/identity_tenancy_admin_permissions_limited.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_tenancy_admin_users_no_api_keys/identity_tenancy_admin_users_no_api_keys.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_user_api_keys_rotated_90_days/identity_user_api_keys_rotated_90_days.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_user_auth_tokens_rotated_90_days/identity_user_auth_tokens_rotated_90_days.metadata.json +1 -1
- 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
- prowler/providers/oraclecloud/services/identity/identity_user_db_passwords_rotated_90_days/identity_user_db_passwords_rotated_90_days.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_user_mfa_enabled_console_access/identity_user_mfa_enabled_console_access.metadata.json +1 -1
- prowler/providers/oraclecloud/services/identity/identity_user_valid_email_address/identity_user_valid_email_address.metadata.json +1 -1
- prowler/providers/oraclecloud/services/integration/integration_instance_access_restricted/integration_instance_access_restricted.metadata.json +1 -1
- prowler/providers/oraclecloud/services/kms/kms_key_rotation_enabled/kms_key_rotation_enabled.metadata.json +1 -1
- prowler/providers/oraclecloud/services/network/network_default_security_list_restricts_traffic/network_default_security_list_restricts_traffic.metadata.json +1 -1
- 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
- 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
- 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
- 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
- prowler/providers/oraclecloud/services/network/network_vcn_subnet_flow_logs_enabled/network_vcn_subnet_flow_logs_enabled.metadata.json +1 -1
- prowler/providers/oraclecloud/services/objectstorage/objectstorage_bucket_encrypted_with_cmk/objectstorage_bucket_encrypted_with_cmk.metadata.json +1 -1
- prowler/providers/oraclecloud/services/objectstorage/objectstorage_bucket_logging_enabled/objectstorage_bucket_logging_enabled.metadata.json +1 -1
- prowler/providers/oraclecloud/services/objectstorage/objectstorage_bucket_not_publicly_accessible/objectstorage_bucket_not_publicly_accessible.metadata.json +1 -1
- prowler/providers/oraclecloud/services/objectstorage/objectstorage_bucket_versioning_enabled/objectstorage_bucket_versioning_enabled.metadata.json +1 -1
- {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.1.dist-info}/METADATA +17 -16
- {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.1.dist-info}/RECORD +298 -249
- /prowler/compliance/{oci → oraclecloud}/__init__.py +0 -0
- {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.1.dist-info}/LICENSE +0 -0
- {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.1.dist-info}/WHEEL +0 -0
- {prowler_cloud-5.13.1.dist-info → prowler_cloud-5.14.1.dist-info}/entry_points.txt +0 -0
|
@@ -1024,7 +1024,7 @@
|
|
|
1024
1024
|
"Attributes": [
|
|
1025
1025
|
{
|
|
1026
1026
|
"Title": "AuditDisabled organizationally is set to False",
|
|
1027
|
-
"Section": "3. Logging and
|
|
1027
|
+
"Section": "3. Logging and Monitoring",
|
|
1028
1028
|
"SubSection": "3.1 Logging",
|
|
1029
1029
|
"AttributeDescription": "The setting “Mailbox auditing on by default” determines whether mailbox auditing is automatically enabled across all mailboxes in the organization, regardless of their individual auditing configuration. When this setting is configured as False, it enables auditing at the organization level, overriding the AuditEnabled property for individual mailboxes—even if it is explicitly set to False. With this setting enabled, default audit actions are automatically recorded for all mailboxes without requiring manual configuration. Conversely, disabling this setting (True) effectively turns off mailbox auditing across the organization and overrides any mailbox-level auditing settings. The consequences of disabling this setting include: • Mailbox auditing is completely disabled organization-wide. • No mailbox actions are logged, even if AuditEnabled is set to True for individual mailboxes. • New mailboxes do not inherit auditing, and setting AuditEnabled=True has no effect. • Bypass audit rules set via Set-MailboxAuditBypassAssociation are ignored. • Existing audit records remain in place until they expire based on the audit log retention policy. The recommended configuration is to set this value to False at the organization level to ensure auditing is enforced consistently.",
|
|
1030
1030
|
"AdditionalInformation": "Enforcing mailbox auditing by default ensures that audit logging cannot be unintentionally or maliciously disabled on individual mailboxes. This setting provides vital visibility for forensic investigations and incident response (IR) teams, allowing them to trace suspicious or malicious activity—such as unauthorized inbox access, message deletion, or rule manipulation—that may signal account compromise. Consistent auditing across all mailboxes is critical for detecting threat actor behaviors (TTPs) and correlating events across users. While organizations without Microsoft 365 E5 licenses are limited to 90 days of audit log retention, enabling this setting still significantly improves detection and accountability within that window.",
|
|
@@ -1042,7 +1042,7 @@
|
|
|
1042
1042
|
"Attributes": [
|
|
1043
1043
|
{
|
|
1044
1044
|
"Title": "Mailbox auditing for E3 users is Enabled",
|
|
1045
|
-
"Section": "3. Logging and
|
|
1045
|
+
"Section": "3. Logging and Monitoring",
|
|
1046
1046
|
"SubSection": "3.1 Logging",
|
|
1047
1047
|
"AttributeDescription": "As of January 2019, Microsoft enables mailbox audit logging by default across all organizations. This feature ensures that specific actions performed by mailbox owners, delegates, and administrators are automatically captured and recorded. These audit records can then be searched by administrators through the mailbox audit log in Microsoft 365. Each mailbox type—whether user, shared, resource, or public folder—can have tailored audit settings to track activities that are most relevant to the organization. While audit logging is enabled by default at the organizational level, it is important to explicitly configure the AuditEnabled property to True on all user mailboxes, and to expand the list of audited actions beyond the Microsoft defaults to meet specific visibility or compliance needs. Note: This recommendation is particularly relevant to users with Microsoft 365 E3 licenses, where audit actions differ slightly from the default configurations in E5.",
|
|
1048
1048
|
"AdditionalInformation": "Mailbox auditing plays a critical role in supporting both regulatory compliance and security monitoring. Whether investigating unauthorized configuration changes, potential account compromise, or insider threats, detailed mailbox audit logs provide essential evidence for security operations, forensic analysis, and general administrative oversight. While mailbox auditing is enabled by default for most user mailboxes, certain mailbox types—such as Resource Mailboxes, Public Folder Mailboxes, and the DiscoverySearch Mailbox—do not inherit the organizational auditing default. For these mailboxes, AuditEnabled must be manually set to True to ensure relevant activities are captured. Note: Organizations without Microsoft 365 E5 licenses are subject to a 90-day audit log retention limit, but enabling comprehensive mailbox auditing remains a best practice for operational readiness and incident response.",
|
|
@@ -1060,7 +1060,7 @@
|
|
|
1060
1060
|
"Attributes": [
|
|
1061
1061
|
{
|
|
1062
1062
|
"Title": "Mailbox auditing for E5 users is Enabled",
|
|
1063
|
-
"Section": "3. Logging and
|
|
1063
|
+
"Section": "3. Logging and Monitoring",
|
|
1064
1064
|
"SubSection": "3.1 Logging",
|
|
1065
1065
|
"AttributeDescription": "Since January 2019, mailbox audit logging has been enabled by default in all Microsoft 365 organizations. This feature ensures that specific actions performed by mailbox owners, delegates, and administrators are automatically captured and stored as audit records. These logs are accessible to administrators through the Microsoft 365 mailbox audit log, enabling visibility into key mailbox-level activity. Although logging is enabled by default, each mailbox—particularly user and shared mailboxes—can have custom audit actions assigned to capture the specific types of events deemed valuable by the organization. For environments with Microsoft 365 E5 licenses or the advanced auditing add-on, it is recommended to explicitly set AuditEnabled to True on all user mailboxes and to configure additional audit actions beyond Microsoft’s default settings for enhanced visibility. Note: This recommendation specifically applies to E5 or equivalent auditing-enabled license holders, as the available audit depth and event coverage differ from E3.",
|
|
1066
1066
|
"AdditionalInformation": "Mailbox audit logging is essential for supporting security investigations, regulatory compliance, and operational forensics in Microsoft 365. Whether you’re tracking unauthorized changes, detecting suspicious access, or conducting post-incident analysis, having a complete and accurate mailbox audit trail is critical. While audit logging is broadly applied by default, certain mailbox types bypass the organizational setting and require manual configuration to enable auditing. These include: • Resource Mailboxes • Public Folder Mailboxes • DiscoverySearch Mailboxes For these mailbox types, the AuditEnabled property must be explicitly set to True to ensure that audit events are captured. Important: Without advanced auditing (included in E5 or via add-on), mailbox audit logs are retained for only 90 days, limiting the historical window for investigations. Nonetheless, enabling detailed auditing remains a key best practice for maintaining strong visibility and compliance readiness.",
|
|
@@ -1078,7 +1078,7 @@
|
|
|
1078
1078
|
"Attributes": [
|
|
1079
1079
|
{
|
|
1080
1080
|
"Title": "AuditBypassEnabled is not enabled on mailboxes",
|
|
1081
|
-
"Section": "3. Logging and
|
|
1081
|
+
"Section": "3. Logging and Monitoring",
|
|
1082
1082
|
"SubSection": "3.1 Logging",
|
|
1083
1083
|
"AttributeDescription": "The AuditBypassEnabled setting in Microsoft 365 allows specific user or computer accounts to bypass mailbox audit logging, meaning that any actions they perform on mailboxes will not be recorded in the audit logs. This includes actions such as reading, deleting, moving, or modifying messages.",
|
|
1084
1084
|
"AdditionalInformation": "Allowing an account to bypass mailbox audit logging creates a blind spot in security monitoring. If the account is compromised, misused, or maliciously configured, it can access and interact with mailboxes without leaving any trace in the logs. This significantly undermines the organization’s ability to conduct forensic investigations, detect insider threats, or comply with audit requirements.",
|
|
@@ -1096,7 +1096,7 @@
|
|
|
1096
1096
|
"Attributes": [
|
|
1097
1097
|
{
|
|
1098
1098
|
"Title": "Microsoft 365 audit log search is Enabled ",
|
|
1099
|
-
"Section": "3. Logging and
|
|
1099
|
+
"Section": "3. Logging and Monitoring",
|
|
1100
1100
|
"SubSection": "3.2 Retention",
|
|
1101
1101
|
"AttributeDescription": "Audit log search in the Microsoft Purview compliance portal allows organizations to track and retain user and administrator activities across Microsoft 365 services. When enabled, audit events—such as sign-ins, file access, configuration changes, and other operational actions—are captured and stored for up to 90 days by default. While some organizations may choose to integrate auditing data with third-party Security Information and Event Management (SIEM) systems, audit log search in Microsoft Purview remains a critical native capability for centralized visibility and incident response. Although global administrators have the ability to disable audit log search, it is generally recommended to keep it enabled to maintain full visibility into user and system activity.",
|
|
1102
1102
|
"AdditionalInformation": "Activating audit log search provides essential forensic and compliance value. It enables organizations to detect anomalous behavior, investigate potential security incidents, and demonstrate adherence to regulatory and legal requirements. In addition, it supports operational monitoring, internal audits, and proactive threat detection. By retaining and centralizing audit data within the Microsoft 365 ecosystem, security and compliance teams gain faster access to actionable insights, reducing response times and strengthening the organization’s overall security posture.",
|
|
@@ -1114,7 +1114,7 @@
|
|
|
1114
1114
|
"Attributes": [
|
|
1115
1115
|
{
|
|
1116
1116
|
"Title": "Notifications for internal users sending malware is Enabled",
|
|
1117
|
-
"Section": "3. Logging and
|
|
1117
|
+
"Section": "3. Logging and Monitoring",
|
|
1118
1118
|
"SubSection": "3.3 Monitoring",
|
|
1119
1119
|
"AttributeDescription": "Exchange Online Protection (EOP) is Microsoft’s cloud-based email filtering service designed to safeguard organizations against spam, malware, and other email-borne threats. It is included by default in all Microsoft 365 tenants with Exchange Online mailboxes. EOP provides customizable anti-malware policies that allow administrators to define protection settings and configure alerts for detected malicious activity.",
|
|
1120
1120
|
"AdditionalInformation": "Enabling notifications for malware detections ensures that administrators are alerted when an internal user sends a message containing malware. Such incidents may signal a compromised user account or infected device, requiring immediate investigation to mitigate potential security breaches.",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"Framework": "CIS",
|
|
3
3
|
"Name": "CIS Oracle Cloud Infrastructure Foundations Benchmark v3.0.0",
|
|
4
4
|
"Version": "3.0",
|
|
5
|
-
"Provider": "
|
|
5
|
+
"Provider": "OracleCloud",
|
|
6
6
|
"Description": "The CIS Oracle Cloud Infrastructure Foundations Benchmark provides prescriptive guidance for configuring security options for Oracle Cloud Infrastructure with an emphasis on foundational, testable, and architecture agnostic settings.",
|
|
7
7
|
"Requirements": [
|
|
8
8
|
{
|
prowler/config/config.py
CHANGED
|
@@ -3,6 +3,7 @@ import pathlib
|
|
|
3
3
|
from datetime import datetime, timezone
|
|
4
4
|
from enum import Enum
|
|
5
5
|
from os import getcwd
|
|
6
|
+
from typing import Tuple
|
|
6
7
|
|
|
7
8
|
import requests
|
|
8
9
|
import yaml
|
|
@@ -10,11 +11,36 @@ from packaging import version
|
|
|
10
11
|
|
|
11
12
|
from prowler.lib.logger import logger
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
class _MutableTimestamp:
|
|
16
|
+
"""Lightweight proxy to keep timestamp references in sync across modules."""
|
|
17
|
+
|
|
18
|
+
def __init__(self, value: datetime) -> None:
|
|
19
|
+
self.value = value
|
|
20
|
+
|
|
21
|
+
def set(self, value: datetime) -> None:
|
|
22
|
+
self.value = value
|
|
23
|
+
|
|
24
|
+
def __getattr__(self, name):
|
|
25
|
+
return getattr(self.value, name)
|
|
26
|
+
|
|
27
|
+
def __str__(self) -> str: # pragma: no cover - trivial forwarder
|
|
28
|
+
return str(self.value)
|
|
29
|
+
|
|
30
|
+
def __repr__(self) -> str: # pragma: no cover - trivial forwarder
|
|
31
|
+
return repr(self.value)
|
|
32
|
+
|
|
33
|
+
def __eq__(self, other) -> bool:
|
|
34
|
+
if isinstance(other, _MutableTimestamp):
|
|
35
|
+
return self.value == other.value
|
|
36
|
+
return self.value == other
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
timestamp = _MutableTimestamp(datetime.today())
|
|
40
|
+
timestamp_utc = _MutableTimestamp(datetime.now(timezone.utc))
|
|
41
|
+
prowler_version = "5.14.1"
|
|
16
42
|
html_logo_url = "https://github.com/prowler-cloud/prowler/"
|
|
17
|
-
square_logo_img = "https://
|
|
43
|
+
square_logo_img = "https://raw.githubusercontent.com/prowler-cloud/prowler/dc7d2d5aeb92fdf12e8604f42ef6472cd3e8e889/docs/img/prowler-logo-black.png"
|
|
18
44
|
aws_logo = "https://user-images.githubusercontent.com/38561120/235953920-3e3fba08-0795-41dc-b480-9bea57db9f2e.png"
|
|
19
45
|
azure_logo = "https://user-images.githubusercontent.com/38561120/235927375-b23e2e0f-8932-49ec-b59c-d89f61c8041d.png"
|
|
20
46
|
gcp_logo = "https://user-images.githubusercontent.com/38561120/235928332-eb4accdc-c226-4391-8e97-6ca86a91cf50.png"
|
|
@@ -33,7 +59,7 @@ class Provider(str, Enum):
|
|
|
33
59
|
IAC = "iac"
|
|
34
60
|
NHN = "nhn"
|
|
35
61
|
MONGODBATLAS = "mongodbatlas"
|
|
36
|
-
|
|
62
|
+
ORACLECLOUD = "oraclecloud"
|
|
37
63
|
|
|
38
64
|
|
|
39
65
|
# Compliance
|
|
@@ -84,6 +110,34 @@ encoding_format_utf_8 = "utf-8"
|
|
|
84
110
|
available_output_formats = ["csv", "json-asff", "json-ocsf", "html"]
|
|
85
111
|
|
|
86
112
|
|
|
113
|
+
def set_output_timestamp(
|
|
114
|
+
new_timestamp: datetime,
|
|
115
|
+
) -> Tuple[datetime, datetime, str, str]:
|
|
116
|
+
"""
|
|
117
|
+
Override the global output timestamps so generated artifacts reflect a specific scan.
|
|
118
|
+
Returns the previous values so callers can restore them afterwards.
|
|
119
|
+
"""
|
|
120
|
+
global timestamp, timestamp_utc, output_file_timestamp, timestamp_iso
|
|
121
|
+
|
|
122
|
+
previous_values = (
|
|
123
|
+
timestamp.value,
|
|
124
|
+
timestamp_utc.value,
|
|
125
|
+
output_file_timestamp,
|
|
126
|
+
timestamp_iso,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
timestamp.set(new_timestamp)
|
|
130
|
+
timestamp_utc.set(
|
|
131
|
+
new_timestamp.astimezone(timezone.utc)
|
|
132
|
+
if new_timestamp.tzinfo
|
|
133
|
+
else new_timestamp.replace(tzinfo=timezone.utc)
|
|
134
|
+
)
|
|
135
|
+
output_file_timestamp = timestamp.strftime("%Y%m%d%H%M%S")
|
|
136
|
+
timestamp_iso = timestamp.isoformat(sep=" ", timespec="seconds")
|
|
137
|
+
|
|
138
|
+
return previous_values
|
|
139
|
+
|
|
140
|
+
|
|
87
141
|
def get_default_mute_file_path(provider: str):
|
|
88
142
|
"""
|
|
89
143
|
get_default_mute_file_path returns the default mute file path for the provider
|
prowler/config/config.yaml
CHANGED
|
@@ -511,6 +511,9 @@ gcp:
|
|
|
511
511
|
# gcp.iam_service_account_unused
|
|
512
512
|
# gcp.iam_sa_user_managed_key_unused
|
|
513
513
|
max_unused_account_days: 180
|
|
514
|
+
# GCP Storage Sufficient Retention Period
|
|
515
|
+
# gcp.cloudstorage_bucket_sufficient_retention_period
|
|
516
|
+
storage_min_retention_days: 90
|
|
514
517
|
|
|
515
518
|
# Kubernetes Configuration
|
|
516
519
|
kubernetes:
|
prowler/lib/check/check.py
CHANGED
|
@@ -518,16 +518,8 @@ def execute_checks(
|
|
|
518
518
|
)
|
|
519
519
|
try:
|
|
520
520
|
try:
|
|
521
|
-
# Map CLI provider names to directory names (for cases where they differ)
|
|
522
|
-
provider_directory_map = {
|
|
523
|
-
"oci": "oraclecloud", # oci SDK conflict avoidance
|
|
524
|
-
}
|
|
525
|
-
provider_directory = provider_directory_map.get(
|
|
526
|
-
global_provider.type, global_provider.type
|
|
527
|
-
)
|
|
528
|
-
|
|
529
521
|
# Import check module
|
|
530
|
-
check_module_path = f"prowler.providers.{
|
|
522
|
+
check_module_path = f"prowler.providers.{global_provider.type}.services.{service}.{check_name}.{check_name}"
|
|
531
523
|
lib = import_check(check_module_path)
|
|
532
524
|
# Recover functions from check
|
|
533
525
|
check_to_execute = getattr(lib, check_name)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
1
3
|
from colorama import Fore, Style
|
|
2
4
|
|
|
3
5
|
from prowler.lib.check.check import parse_checks_from_file
|
|
@@ -57,8 +59,24 @@ def load_checks_to_execute(
|
|
|
57
59
|
|
|
58
60
|
# Handle if there are checks passed using -c/--checks
|
|
59
61
|
if check_list:
|
|
62
|
+
# Validate that all checks exist
|
|
63
|
+
available_checks = set(bulk_checks_metadata.keys())
|
|
64
|
+
available_checks.update(check_aliases.keys())
|
|
65
|
+
invalid_checks = []
|
|
60
66
|
for check_name in check_list:
|
|
61
|
-
|
|
67
|
+
if check_name not in available_checks:
|
|
68
|
+
invalid_checks.append(check_name)
|
|
69
|
+
else:
|
|
70
|
+
checks_to_execute.add(check_name)
|
|
71
|
+
|
|
72
|
+
if invalid_checks:
|
|
73
|
+
logger.critical(
|
|
74
|
+
f"Invalid check(s) specified: {', '.join(invalid_checks)}"
|
|
75
|
+
)
|
|
76
|
+
logger.critical(
|
|
77
|
+
f"Please provide valid check names. Use 'prowler {provider} --list-checks' to see available checks."
|
|
78
|
+
)
|
|
79
|
+
sys.exit(1)
|
|
62
80
|
|
|
63
81
|
# Handle if there are some severities passed using --severity
|
|
64
82
|
elif severities:
|
|
@@ -66,6 +84,23 @@ def load_checks_to_execute(
|
|
|
66
84
|
checks_to_execute.update(check_severities[severity])
|
|
67
85
|
|
|
68
86
|
if service_list:
|
|
87
|
+
# Validate that all services exist
|
|
88
|
+
available_services = set()
|
|
89
|
+
for metadata in bulk_checks_metadata.values():
|
|
90
|
+
available_services.add(metadata.ServiceName)
|
|
91
|
+
|
|
92
|
+
invalid_services = [
|
|
93
|
+
s for s in service_list if s not in available_services
|
|
94
|
+
]
|
|
95
|
+
if invalid_services:
|
|
96
|
+
logger.critical(
|
|
97
|
+
f"Invalid service(s) specified: {', '.join(invalid_services)}"
|
|
98
|
+
)
|
|
99
|
+
logger.critical(
|
|
100
|
+
f"Please provide valid service names. Use 'prowler {provider} --list-services' to see available services."
|
|
101
|
+
)
|
|
102
|
+
sys.exit(1)
|
|
103
|
+
|
|
69
104
|
checks_from_services = set()
|
|
70
105
|
for service in service_list:
|
|
71
106
|
service_checks = CheckMetadata.list(
|
|
@@ -81,6 +116,21 @@ def load_checks_to_execute(
|
|
|
81
116
|
|
|
82
117
|
# Handle if there are services passed using -s/--services
|
|
83
118
|
elif service_list:
|
|
119
|
+
# Validate that all services exist
|
|
120
|
+
available_services = set()
|
|
121
|
+
for metadata in bulk_checks_metadata.values():
|
|
122
|
+
available_services.add(metadata.ServiceName)
|
|
123
|
+
|
|
124
|
+
invalid_services = [s for s in service_list if s not in available_services]
|
|
125
|
+
if invalid_services:
|
|
126
|
+
logger.critical(
|
|
127
|
+
f"Invalid service(s) specified: {', '.join(invalid_services)}"
|
|
128
|
+
)
|
|
129
|
+
logger.critical(
|
|
130
|
+
f"Please provide valid service names. Use 'prowler {provider} --list-services' to see available services."
|
|
131
|
+
)
|
|
132
|
+
sys.exit(1)
|
|
133
|
+
|
|
84
134
|
for service in service_list:
|
|
85
135
|
checks_to_execute.update(
|
|
86
136
|
CheckMetadata.list(
|
|
@@ -103,6 +153,20 @@ def load_checks_to_execute(
|
|
|
103
153
|
|
|
104
154
|
# Handle if there are categories passed using --categories
|
|
105
155
|
elif categories:
|
|
156
|
+
# Validate that all categories exist
|
|
157
|
+
available_categories = set(check_categories.keys())
|
|
158
|
+
invalid_categories = [
|
|
159
|
+
c for c in categories if c not in available_categories
|
|
160
|
+
]
|
|
161
|
+
if invalid_categories:
|
|
162
|
+
logger.critical(
|
|
163
|
+
f"Invalid category(ies) specified: {', '.join(invalid_categories)}"
|
|
164
|
+
)
|
|
165
|
+
logger.critical(
|
|
166
|
+
f"Please provide valid category names. Use 'prowler {provider} --list-categories' to see available categories."
|
|
167
|
+
)
|
|
168
|
+
sys.exit(1)
|
|
169
|
+
|
|
106
170
|
for category in categories:
|
|
107
171
|
checks_to_execute.update(check_categories[category])
|
|
108
172
|
|
prowler/lib/check/models.py
CHANGED
|
@@ -457,7 +457,8 @@ class Check(ABC, CheckMetadata):
|
|
|
457
457
|
# Verify names consistency
|
|
458
458
|
check_id = self.CheckID
|
|
459
459
|
class_name = self.__class__.__name__
|
|
460
|
-
|
|
460
|
+
# os.path.basename handles Windows and POSIX paths reliably
|
|
461
|
+
file_name = os.path.basename(file_path)
|
|
461
462
|
|
|
462
463
|
errors = []
|
|
463
464
|
if check_id != class_name:
|
|
@@ -588,8 +589,17 @@ class Check_Report_GCP(Check_Report):
|
|
|
588
589
|
or getattr(resource, "name", None)
|
|
589
590
|
or ""
|
|
590
591
|
)
|
|
592
|
+
|
|
593
|
+
# Prefer the explicit resource_name argument, otherwise look for a name attribute on the resource
|
|
594
|
+
resource_name_candidate = resource_name or getattr(resource, "name", None)
|
|
595
|
+
if not resource_name_candidate and isinstance(resource, dict):
|
|
596
|
+
# Some callers pass a dict, so fall back to the dict entry if available
|
|
597
|
+
resource_name_candidate = resource.get("name")
|
|
598
|
+
if isinstance(resource_name_candidate, str):
|
|
599
|
+
# Trim whitespace so empty strings collapse to the default
|
|
600
|
+
resource_name_candidate = resource_name_candidate.strip()
|
|
591
601
|
self.resource_name = (
|
|
592
|
-
|
|
602
|
+
str(resource_name_candidate) if resource_name_candidate else "GCP Project"
|
|
593
603
|
)
|
|
594
604
|
self.project_id = project_id or getattr(resource, "project_id", "")
|
|
595
605
|
self.location = (
|
prowler/lib/check/utils.py
CHANGED
|
@@ -46,14 +46,8 @@ def recover_checks_from_provider(
|
|
|
46
46
|
|
|
47
47
|
# List all available modules in the selected provider and service
|
|
48
48
|
def list_modules(provider: str, service: str):
|
|
49
|
-
# Map CLI provider names to directory names (for cases where they differ)
|
|
50
|
-
provider_directory_map = {
|
|
51
|
-
"oci": "oraclecloud", # OCI SDK conflict avoidance
|
|
52
|
-
}
|
|
53
|
-
provider_directory = provider_directory_map.get(provider, provider)
|
|
54
|
-
|
|
55
49
|
# This module path requires the full path including "prowler."
|
|
56
|
-
module_path = f"prowler.providers.{
|
|
50
|
+
module_path = f"prowler.providers.{provider}.services"
|
|
57
51
|
if service:
|
|
58
52
|
module_path += f".{service}"
|
|
59
53
|
return walk_packages(
|
prowler/lib/cli/parser.py
CHANGED
|
@@ -15,6 +15,7 @@ from prowler.lib.check.models import Severity
|
|
|
15
15
|
from prowler.lib.outputs.common import Status
|
|
16
16
|
from prowler.providers.common.arguments import (
|
|
17
17
|
init_providers_parser,
|
|
18
|
+
validate_asff_usage,
|
|
18
19
|
validate_provider_arguments,
|
|
19
20
|
)
|
|
20
21
|
|
|
@@ -26,17 +27,17 @@ class ProwlerArgumentParser:
|
|
|
26
27
|
self.parser = argparse.ArgumentParser(
|
|
27
28
|
prog="prowler",
|
|
28
29
|
formatter_class=RawTextHelpFormatter,
|
|
29
|
-
usage="prowler [-h] [--version] {aws,azure,gcp,kubernetes,m365,github,nhn,mongodbatlas,
|
|
30
|
+
usage="prowler [-h] [--version] {aws,azure,gcp,kubernetes,m365,github,nhn,mongodbatlas,oraclecloud,dashboard,iac} ...",
|
|
30
31
|
epilog="""
|
|
31
32
|
Available Cloud Providers:
|
|
32
|
-
{aws,azure,gcp,kubernetes,m365,github,iac,llm,nhn,mongodbatlas,
|
|
33
|
+
{aws,azure,gcp,kubernetes,m365,github,iac,llm,nhn,mongodbatlas,oraclecloud}
|
|
33
34
|
aws AWS Provider
|
|
34
35
|
azure Azure Provider
|
|
35
36
|
gcp GCP Provider
|
|
36
37
|
kubernetes Kubernetes Provider
|
|
37
38
|
m365 Microsoft 365 Provider
|
|
38
39
|
github GitHub Provider
|
|
39
|
-
|
|
40
|
+
oraclecloud Oracle Cloud Infrastructure Provider
|
|
40
41
|
iac IaC Provider (Beta)
|
|
41
42
|
llm LLM Provider (Beta)
|
|
42
43
|
nhn NHN Provider (Unofficial)
|
|
@@ -113,6 +114,9 @@ Detailed documentation at https://docs.prowler.com
|
|
|
113
114
|
# Microsoft 365
|
|
114
115
|
elif sys.argv[1] == "microsoft365":
|
|
115
116
|
sys.argv[1] = "m365"
|
|
117
|
+
# Oracle Cloud Infrastructure
|
|
118
|
+
elif sys.argv[1] == "oci":
|
|
119
|
+
sys.argv[1] = "oraclecloud"
|
|
116
120
|
|
|
117
121
|
# Parse arguments
|
|
118
122
|
args = self.parser.parse_args()
|
|
@@ -132,6 +136,12 @@ Detailed documentation at https://docs.prowler.com
|
|
|
132
136
|
if not valid:
|
|
133
137
|
self.parser.error(f"{args.provider}: {message}")
|
|
134
138
|
|
|
139
|
+
asff_is_valid, asff_error = validate_asff_usage(
|
|
140
|
+
args.provider, getattr(args, "output_formats", None)
|
|
141
|
+
)
|
|
142
|
+
if not asff_is_valid:
|
|
143
|
+
self.parser.error(asff_error)
|
|
144
|
+
|
|
135
145
|
return args
|
|
136
146
|
|
|
137
147
|
def __set_default_provider__(self, args: list) -> list:
|
|
@@ -301,7 +311,7 @@ Detailed documentation at https://docs.prowler.com
|
|
|
301
311
|
"--checks-folder",
|
|
302
312
|
"-x",
|
|
303
313
|
nargs="?",
|
|
304
|
-
help="Specify external directory with custom checks (each check must have a folder with the required files, see more in https://docs.prowler.
|
|
314
|
+
help="Specify external directory with custom checks (each check must have a folder with the required files, see more in https://docs.prowler.com/user-guide/cli/tutorials/misc#custom-checks-in-prowler).",
|
|
305
315
|
)
|
|
306
316
|
|
|
307
317
|
def __init_list_checks_parser__(self):
|
|
@@ -354,7 +364,7 @@ Detailed documentation at https://docs.prowler.com
|
|
|
354
364
|
"--mutelist-file",
|
|
355
365
|
"-w",
|
|
356
366
|
nargs="?",
|
|
357
|
-
help="Path for mutelist YAML file. See example prowler/config/<provider>_mutelist.yaml for reference and format. For AWS provider, it also accepts AWS DynamoDB Table, Lambda ARNs or S3 URIs, see more in https://docs.prowler.
|
|
367
|
+
help="Path for mutelist YAML file. See example prowler/config/<provider>_mutelist.yaml for reference and format. For AWS provider, it also accepts AWS DynamoDB Table, Lambda ARNs or S3 URIs, see more in https://docs.prowler.com/user-guide/cli/tutorials/mutelist",
|
|
358
368
|
)
|
|
359
369
|
|
|
360
370
|
def __init_config_parser__(self):
|
|
@@ -381,7 +391,7 @@ Detailed documentation at https://docs.prowler.com
|
|
|
381
391
|
"--custom-checks-metadata-file",
|
|
382
392
|
nargs="?",
|
|
383
393
|
default=None,
|
|
384
|
-
help="Path for the custom checks metadata YAML file. See example prowler/config/custom_checks_metadata_example.yaml for reference and format. See more in https://docs.prowler.
|
|
394
|
+
help="Path for the custom checks metadata YAML file. See example prowler/config/custom_checks_metadata_example.yaml for reference and format. See more in https://docs.prowler.com/user-guide/cli/tutorials/custom-checks-metadata/",
|
|
385
395
|
)
|
|
386
396
|
|
|
387
397
|
def __init_third_party_integrations_parser__(self):
|
|
@@ -399,5 +409,5 @@ Detailed documentation at https://docs.prowler.com
|
|
|
399
409
|
third_party_subparser.add_argument(
|
|
400
410
|
"--slack",
|
|
401
411
|
action="store_true",
|
|
402
|
-
help="Send a summary of the execution with a Slack APP in your channel. Environment variables SLACK_API_TOKEN and SLACK_CHANNEL_NAME are required (see more in https://docs.prowler.
|
|
412
|
+
help="Send a summary of the execution with a Slack APP in your channel. Environment variables SLACK_API_TOKEN and SLACK_CHANNEL_NAME are required (see more in https://docs.prowler.com/user-guide/cli/tutorials/integrations#configuration-of-the-integration-with-slack/).",
|
|
403
413
|
)
|
prowler/lib/mutelist/mutelist.py
CHANGED
|
@@ -153,8 +153,10 @@ class Mutelist(ABC):
|
|
|
153
153
|
Check if the provided finding is muted for the audited account, check, region, resource and tags.
|
|
154
154
|
|
|
155
155
|
The Mutelist works in a way that each field is ANDed, so if a check is muted for an account, region, resource and tags, it will be muted.
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
|
|
157
|
+
Exceptions use AND logic across specified fields, with unspecified fields treated as wildcards (matching all values).
|
|
158
|
+
|
|
159
|
+
Tag matching uses AND logic when multiple tags are listed (all must match). OR logic is achieved using regex alternation (|) within a single tag pattern.
|
|
158
160
|
|
|
159
161
|
So, for the following Mutelist:
|
|
160
162
|
```
|
|
@@ -167,11 +169,16 @@ class Mutelist(ABC):
|
|
|
167
169
|
Resources:
|
|
168
170
|
- 'i-123456789'
|
|
169
171
|
Tags:
|
|
170
|
-
- 'Name=AdminInstance
|
|
172
|
+
- 'Name=AdminInstance|Environment=Prod'
|
|
171
173
|
Description: 'Field to describe why the findings associated with these values are muted'
|
|
172
174
|
```
|
|
173
175
|
The check `ec2_instance_detailed_monitoring_enabled` will be muted for all accounts and regions and for the resource_id 'i-123456789' with at least one of the tags 'Name=AdminInstance' or 'Environment=Prod'.
|
|
174
176
|
|
|
177
|
+
Note: The pipe (|) in the tag pattern provides OR logic via regex alternation. To require BOTH tags, use two separate tag entries:
|
|
178
|
+
Tags:
|
|
179
|
+
- 'Name=AdminInstance'
|
|
180
|
+
- 'Environment=Prod'
|
|
181
|
+
|
|
175
182
|
Args:
|
|
176
183
|
mutelist (dict): Dictionary containing information about muted checks for different accounts.
|
|
177
184
|
audited_account (str): The account being audited.
|
|
@@ -408,12 +415,13 @@ class Mutelist(ABC):
|
|
|
408
415
|
Args:
|
|
409
416
|
matched_items (list): List of items to be matched.
|
|
410
417
|
finding_items (str): String to search for matched items.
|
|
411
|
-
tag (bool): If True
|
|
412
|
-
-
|
|
413
|
-
-
|
|
418
|
+
tag (bool): If True, uses AND logic across multiple tags in the list.
|
|
419
|
+
- Multiple tags: ALL tags in matched_items must be present in finding_items (AND logic).
|
|
420
|
+
- Single tag with regex alternation (|): Matches if pattern is found (enables OR within pattern).
|
|
421
|
+
- For non-tags: Uses OR logic - returns True if ANY item matches.
|
|
414
422
|
|
|
415
423
|
Returns:
|
|
416
|
-
bool: True if
|
|
424
|
+
bool: For tags - True if ALL patterns match. For non-tags - True if ANY pattern matches.
|
|
417
425
|
"""
|
|
418
426
|
try:
|
|
419
427
|
is_item_matched = False
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from prowler.config.config import timestamp
|
|
2
|
+
from prowler.lib.check.compliance_models import Compliance
|
|
3
|
+
from prowler.lib.outputs.compliance.c5.models import AzureC5Model
|
|
4
|
+
from prowler.lib.outputs.compliance.compliance_output import ComplianceOutput
|
|
5
|
+
from prowler.lib.outputs.finding import Finding
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AzureC5(ComplianceOutput):
|
|
9
|
+
"""
|
|
10
|
+
This class represents the Azure C5 compliance output.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
- _data (list): A list to store transformed data from findings.
|
|
14
|
+
- _file_descriptor (TextIOWrapper): A file descriptor to write data to a file.
|
|
15
|
+
|
|
16
|
+
Methods:
|
|
17
|
+
- transform: Transforms findings into Azure C5 compliance format.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def transform(
|
|
21
|
+
self,
|
|
22
|
+
findings: list[Finding],
|
|
23
|
+
compliance: Compliance,
|
|
24
|
+
compliance_name: str,
|
|
25
|
+
) -> None:
|
|
26
|
+
"""
|
|
27
|
+
Transforms a list of findings into Azure C5 compliance format.
|
|
28
|
+
|
|
29
|
+
Parameters:
|
|
30
|
+
- findings (list): A list of findings.
|
|
31
|
+
- compliance (Compliance): A compliance model.
|
|
32
|
+
- compliance_name (str): The name of the compliance model.
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
- None
|
|
36
|
+
"""
|
|
37
|
+
for finding in findings:
|
|
38
|
+
# Get the compliance requirements for the finding
|
|
39
|
+
finding_requirements = finding.compliance.get(compliance_name, [])
|
|
40
|
+
for requirement in compliance.Requirements:
|
|
41
|
+
if requirement.Id in finding_requirements:
|
|
42
|
+
for attribute in requirement.Attributes:
|
|
43
|
+
compliance_row = AzureC5Model(
|
|
44
|
+
Provider=finding.provider,
|
|
45
|
+
Description=compliance.Description,
|
|
46
|
+
SubscriptionId=finding.account_uid,
|
|
47
|
+
Location=finding.region,
|
|
48
|
+
AssessmentDate=str(timestamp),
|
|
49
|
+
Requirements_Id=requirement.Id,
|
|
50
|
+
Requirements_Description=requirement.Description,
|
|
51
|
+
Requirements_Attributes_Section=attribute.Section,
|
|
52
|
+
Requirements_Attributes_SubSection=attribute.SubSection,
|
|
53
|
+
Requirements_Attributes_Type=attribute.Type,
|
|
54
|
+
Requirements_Attributes_AboutCriteria=attribute.AboutCriteria,
|
|
55
|
+
Requirements_Attributes_ComplementaryCriteria=attribute.ComplementaryCriteria,
|
|
56
|
+
Status=finding.status,
|
|
57
|
+
StatusExtended=finding.status_extended,
|
|
58
|
+
ResourceId=finding.resource_uid,
|
|
59
|
+
ResourceName=finding.resource_name,
|
|
60
|
+
CheckId=finding.check_id,
|
|
61
|
+
Muted=finding.muted,
|
|
62
|
+
Framework=compliance.Framework,
|
|
63
|
+
Name=compliance.Name,
|
|
64
|
+
)
|
|
65
|
+
self._data.append(compliance_row)
|
|
66
|
+
# Add manual requirements to the compliance output
|
|
67
|
+
for requirement in compliance.Requirements:
|
|
68
|
+
if not requirement.Checks:
|
|
69
|
+
for attribute in requirement.Attributes:
|
|
70
|
+
compliance_row = AzureC5Model(
|
|
71
|
+
Provider=compliance.Provider.lower(),
|
|
72
|
+
Description=compliance.Description,
|
|
73
|
+
SubscriptionId="",
|
|
74
|
+
Location="",
|
|
75
|
+
AssessmentDate=str(timestamp),
|
|
76
|
+
Requirements_Id=requirement.Id,
|
|
77
|
+
Requirements_Description=requirement.Description,
|
|
78
|
+
Requirements_Attributes_Section=attribute.Section,
|
|
79
|
+
Requirements_Attributes_SubSection=attribute.SubSection,
|
|
80
|
+
Requirements_Attributes_Type=attribute.Type,
|
|
81
|
+
Requirements_Attributes_AboutCriteria=attribute.AboutCriteria,
|
|
82
|
+
Requirements_Attributes_ComplementaryCriteria=attribute.ComplementaryCriteria,
|
|
83
|
+
Status="MANUAL",
|
|
84
|
+
StatusExtended="Manual check",
|
|
85
|
+
ResourceId="manual_check",
|
|
86
|
+
ResourceName="Manual check",
|
|
87
|
+
CheckId="manual",
|
|
88
|
+
Muted=False,
|
|
89
|
+
Framework=compliance.Framework,
|
|
90
|
+
Name=compliance.Name,
|
|
91
|
+
)
|
|
92
|
+
self._data.append(compliance_row)
|