From 3598514cb4df6352ebfb5d379f06d9074da1a3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20De=20la=20Torre=20Vico?= Date: Wed, 10 Sep 2025 17:46:11 +0200 Subject: [PATCH] chore(aws/config): adapt metadata to new standarized format (#8641) Co-authored-by: HugoPBrito --- prowler/CHANGELOG.md | 2 ++ ...recorder_all_regions_enabled.metadata.json | 32 +++++++++++------- ...order_using_aws_service_role.metadata.json | 33 +++++++++++-------- 3 files changed, 42 insertions(+), 25 deletions(-) diff --git a/prowler/CHANGELOG.md b/prowler/CHANGELOG.md index 7d296de940..ac48ae2a1e 100644 --- a/prowler/CHANGELOG.md +++ b/prowler/CHANGELOG.md @@ -10,6 +10,8 @@ All notable changes to the **Prowler SDK** are documented in this file. ### Changed - Update AWS Neptune service metadata to new format [(#8494)](https://github.com/prowler-cloud/prowler/pull/8494) +### Changed +- Update AWS Config service metadata to new format [(#8641)](https://github.com/prowler-cloud/prowler/pull/8641) ### Fixed ## [v5.12.1] (Prowler v5.12.1) diff --git a/prowler/providers/aws/services/config/config_recorder_all_regions_enabled/config_recorder_all_regions_enabled.metadata.json b/prowler/providers/aws/services/config/config_recorder_all_regions_enabled/config_recorder_all_regions_enabled.metadata.json index 84ff0ee78d..59a7f0a923 100644 --- a/prowler/providers/aws/services/config/config_recorder_all_regions_enabled/config_recorder_all_regions_enabled.metadata.json +++ b/prowler/providers/aws/services/config/config_recorder_all_regions_enabled/config_recorder_all_regions_enabled.metadata.json @@ -1,31 +1,39 @@ { "Provider": "aws", "CheckID": "config_recorder_all_regions_enabled", - "CheckTitle": "Ensure AWS Config is enabled in all regions.", + "CheckTitle": "AWS Config recorder is enabled and not in failure state or disabled", "CheckType": [ - "Logging and Monitoring" + "Software and Configuration Checks/AWS Security Best Practices", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices", + "Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark" ], "ServiceName": "config", "SubServiceName": "", - "ResourceIdTemplate": "arn:partition:access-recorder:region:account-id:recorder/resource-id", + "ResourceIdTemplate": "", "Severity": "medium", "ResourceType": "Other", - "Description": "Ensure AWS Config is enabled in all regions.", - "Risk": "The AWS configuration item history captured by AWS Config enables security analysis, resource change tracking and compliance auditing.", - "RelatedUrl": "https://aws.amazon.com/blogs/mt/aws-config-best-practices/", + "Description": "**AWS accounts** have **AWS Config recorders** active and healthy in each Region. It identifies Regions with no recorder, a disabled recorder, or a recorder in a failure state.", + "Risk": "**Gaps in Config recording** create **blind spots**. Changes in unmonitored Regions aren't captured, weakening **integrity** and **auditability**. Adversaries can alter resources or stage assets unnoticed, enabling misconfigurations and delaying **incident response**.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://repost.aws/es/questions/QUGcgeerhcTamRkwgdwh_tLQ/enable-aws-config", + "https://www.tenable.com/audits/items/CIS_Amazon_Web_Services_Foundations_v1.5.0_L2.audit:6a5136528bd329139e5969f8f1e5ffbc", + "https://aws.amazon.com/blogs/mt/aws-config-best-practices/" + ], "Remediation": { "Code": { - "CLI": "aws configservice subscribe --s3-bucket --sns-topic --iam-role ", - "NativeIaC": "", - "Other": "https://docs.prowler.com/checks/aws/logging-policies/logging_5-enable-aws-config-regions", - "Terraform": "https://docs.prowler.com/checks/aws/logging-policies/logging_5-enable-aws-config-regions#terraform" + "CLI": "", + "NativeIaC": "```yaml\nResources:\n example_resource_recorder:\n Type: AWS::Config::ConfigurationRecorder\n Properties:\n Name: example_resource\n RoleARN: !Sub arn:aws:iam::${AWS::AccountId}:role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig\n\n example_resource_channel:\n Type: AWS::Config::DeliveryChannel\n Properties:\n S3BucketName: example_resource\n\n example_resource_status:\n Type: AWS::Config::ConfigurationRecorderStatus\n Properties:\n Name: example_resource\n Recording: true # This line fixes the security issue\n DependsOn:\n - example_resource_channel\n```", + "Other": "1. In the AWS Console, go to Config\n2. Click Set up AWS Config (or Settings)\n3. Select a resource recording option (any) and choose an existing S3 bucket for delivery\n4. Keep the default AWSServiceRoleForConfig role\n5. Click Confirm/Turn on to start recording\n6. Verify on the Settings page that Status shows Recording and not Failure", + "Terraform": "```hcl\nresource \"aws_iam_service_linked_role\" \"example_resource\" {\n aws_service_name = \"config.amazonaws.com\"\n}\n\nresource \"aws_config_configuration_recorder\" \"example_resource\" {\n name = \"example_resource\"\n role_arn = aws_iam_service_linked_role.example_resource.arn\n}\n\nresource \"aws_config_delivery_channel\" \"example_resource\" {\n s3_bucket_name = \"example_resource\"\n}\n\nresource \"aws_config_configuration_recorder_status\" \"example_resource\" {\n name = aws_config_configuration_recorder.example_resource.name\n is_recording = true # This line fixes the security issue\n depends_on = [aws_config_delivery_channel.example_resource]\n}\n```" }, "Recommendation": { - "Text": "It is recommended to enable AWS Config in all regions.", - "Url": "https://aws.amazon.com/blogs/mt/aws-config-best-practices/" + "Text": "Enable **AWS Config** in every Region with continuous recording and maintain healthy recorder status.", + "Url": "https://hub.prowler.com/check/config_recorder_all_regions_enabled" } }, "Categories": [ + "logging", "forensics-ready" ], "DependsOn": [], diff --git a/prowler/providers/aws/services/config/config_recorder_using_aws_service_role/config_recorder_using_aws_service_role.metadata.json b/prowler/providers/aws/services/config/config_recorder_using_aws_service_role/config_recorder_using_aws_service_role.metadata.json index 021161be45..51681e2f7a 100644 --- a/prowler/providers/aws/services/config/config_recorder_using_aws_service_role/config_recorder_using_aws_service_role.metadata.json +++ b/prowler/providers/aws/services/config/config_recorder_using_aws_service_role/config_recorder_using_aws_service_role.metadata.json @@ -1,31 +1,38 @@ { "Provider": "aws", "CheckID": "config_recorder_using_aws_service_role", - "CheckTitle": "Ensure Config Recorder is using service-linked AWS Config role", + "CheckTitle": "AWS Config recorder uses the AWSServiceRoleForConfig service-linked role", "CheckType": [ - "Software and Configuration Checks/AWS Security Best Practices/AWS Foundational Security Best Practices" + "Software and Configuration Checks/AWS Security Best Practices", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices" ], "ServiceName": "config", "SubServiceName": "", - "ResourceIdTemplate": "arn:partition:access-recorder:region:account-id:recorder/resource-id", + "ResourceIdTemplate": "", "Severity": "medium", "ResourceType": "Other", - "Description": "AWS Config uses an IAM role to access other AWS services. This role should be AWSServiceRoleForConfig, not a custom role. Using AWSServiceRoleForConfig ensures that the Config recorder has the necessary permissions to record configuration changes and that the role is managed by AWS, reducing the risk of misconfiguration.", - "Risk": "If the Config recorder is not using AWSServiceRoleForConfig, it may not have the necessary permissions to record configuration changes, which could lead in not following the principle of least privilege, which could lead to misconfiguration and potential security vulnerabilities.", - "RelatedUrl": "https://docs.aws.amazon.com/config/latest/developerguide/using-service-linked-roles.html", + "Description": "**AWS Config recorders** are evaluated for use of the service‑linked IAM role `AWSServiceRoleForConfig` linked to `config.amazonaws.com` rather than a custom role.\n\nThe evaluation inspects active recorders and their role ARN to confirm the AWS‑managed service‑linked role is in use.", + "Risk": "Using a custom or incorrect role can break recording or create blind spots, undermining the **integrity** and **availability** of configuration history. Over‑privileged roles weaken **least privilege**, increasing risk of unauthorized access, stealthy changes, and delayed incident response.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://docs.aws.amazon.com/securityhub/latest/userguide/config-controls.html#config-1", + "https://docs.aws.amazon.com/config/latest/developerguide/using-service-linked-roles.html" + ], "Remediation": { "Code": { - "CLI": "aws configservice put-configuration-recorder --configuration-recorder- name=,roleARN=arn::iam:::role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig", - "NativeIaC": "", - "Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/config-controls.html#config-1", - "Terraform": "" + "CLI": "aws configservice put-configuration-recorder --configuration-recorder name=,roleARN=arn::iam:::role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig", + "NativeIaC": "```yaml\nResources:\n example_resource:\n Type: AWS::Config::ConfigurationRecorder\n Properties:\n Name: example_resource\n RoleARN: arn::iam:::role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig # This line fixes the security issue\n```", + "Other": "1. Open the AWS Console and go to AWS Config\n2. Choose Settings (or Recording) and click Edit\n3. For IAM role, select Use service-linked role (AWSServiceRoleForConfig)\n4. Save changes", + "Terraform": "```hcl\nresource \"aws_config_configuration_recorder\" \"example_resource\" {\n name = \"example_resource\"\n role_arn = \"arn::iam:::role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig\" # This line fixes the security issue\n}\n```" }, "Recommendation": { - "Text": "Use service-linked role AWSServiceRoleForConfig for AWS Config recorders.", - "Url": "https://docs.aws.amazon.com/config/latest/developerguide/using-service-linked-roles.html" + "Text": "Use the AWS‑managed service‑linked role `AWSServiceRoleForConfig` for all recorders to enforce **least privilege** and consistent trust.\n\nAvoid custom roles; restrict who can modify the recorder or role; monitor for drift and ensure recording remains enabled as part of **defense in depth**.", + "Url": "https://hub.prowler.com/check/config_recorder_using_aws_service_role" } }, - "Categories": [], + "Categories": [ + "identity-access" + ], "DependsOn": [], "RelatedTo": [], "Notes": ""