Skip to content

Commit f4081f9

Browse files
puchy22MrCloudSec
andauthored
chore(aws): enhance metadata for eventbridge service (#9003)
Co-authored-by: Sergio Garcia <hello@mistercloudsec.com>
1 parent 374496e commit f4081f9

File tree

5 files changed

+98
-51
lines changed

5 files changed

+98
-51
lines changed

prowler/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
7171
- Update AWS CloudFront service metadata to new format [(#8829)](https://github.com/prowler-cloud/prowler/pull/8829)
7272
- Deprecate user authentication for M365 provider [(#8865)](https://github.com/prowler-cloud/prowler/pull/8865)
7373
- Update AWS EFS service metadata to new format [(#8889)](https://github.com/prowler-cloud/prowler/pull/8889)
74+
- Update AWS EventBridge service metadata to new format [(#9003)](https://github.com/prowler-cloud/prowler/pull/9003)
7475
- Update AWS Firehose service metadata to new format [(#9004)](https://github.com/prowler-cloud/prowler/pull/9004)
7576
- Update AWS FMS service metadata to new format [(#9005)](https://github.com/prowler-cloud/prowler/pull/9005)
7677
- Update AWS FSx service metadata to new format [(#9006)](https://github.com/prowler-cloud/prowler/pull/9006)

prowler/providers/aws/services/eventbridge/eventbridge_bus_cross_account_access/eventbridge_bus_cross_account_access.metadata.json

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
11
{
22
"Provider": "aws",
33
"CheckID": "eventbridge_bus_cross_account_access",
4-
"CheckTitle": "Ensure that AWS EventBridge event buses do not allow unknown cross-account access for delivery of events.",
5-
"CheckType": [],
4+
"CheckTitle": "AWS EventBridge event bus does not allow cross-account access",
5+
"CheckType": [
6+
"Software and Configuration Checks/AWS Security Best Practices",
7+
"Industry and Regulatory Standards/AWS Foundational Security Best Practices",
8+
"TTPs/Initial Access/Unauthorized Access",
9+
"Effects/Data Exposure"
10+
],
611
"ServiceName": "eventbridge",
7-
"SubServiceName": "eventbus",
8-
"ResourceIdTemplate": "arn:partition:events:region:account-id:event-bus/resource-id",
12+
"SubServiceName": "",
13+
"ResourceIdTemplate": "",
914
"Severity": "high",
1015
"ResourceType": "AwsEventsEventbus",
11-
"Description": "Ensure that AWS EventBridge event buses do not allow unknown cross-account access for delivery of events.",
12-
"Risk": "If an AWS EventBridge event bus allows unknown cross-account access for delivery of events, it can lead to unauthorized access to the event bus and its events.",
13-
"RelatedUrl": "https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CWE_GettingStarted.html",
16+
"Description": "**EventBridge event bus** has a **resource policy** that grants **cross-account event delivery** to principals outside the account, including broad or public access.\n\nFocus is on buses whose policies permit external accounts to send events.",
17+
"Risk": "**Cross-account event injection** can erode **integrity** and **availability**. Spoofed events may trigger rules and invoke downstream targets, causing unintended actions, data exposure via targets, lateral movement through over-privileged roles, and cost or service disruption from event floods.",
18+
"RelatedUrl": "",
19+
"AdditionalURLs": [
20+
"https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/CloudWatchEvents/event-bus-cross-account-access.html",
21+
"https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CWE_GettingStarted.html",
22+
"https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html"
23+
],
1424
"Remediation": {
1525
"Code": {
1626
"CLI": "aws events remove-permission --event-bus-name <event_bus_name> --statement-id <statement_id>",
17-
"NativeIaC": "",
18-
"Other": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/CloudWatchEvents/event-bus-cross-account-access.html",
19-
"Terraform": ""
27+
"NativeIaC": "```yaml\n# CloudFormation: restrict EventBridge event bus to same account only\nResources:\n <example_resource_name>:\n Type: AWS::Events::EventBusPolicy\n Properties:\n StatementId: <example_resource_id>\n Action: events:PutEvents\n Principal: !Ref AWS::AccountId # Critical: allows only this AWS account, blocking cross-account access\n EventBusName: <example_resource_name>\n```",
28+
"Other": "1. In the AWS Console, go to Amazon EventBridge > Event buses\n2. Select the event bus (<event_bus_name>)\n3. Open the Permissions tab and click Edit\n4. Remove any statements that grant access to other accounts, an organization, or \"*\"\n5. Save changes",
29+
"Terraform": "```hcl\n# Terraform: restrict EventBridge event bus to same account only\nresource \"aws_cloudwatch_event_permission\" \"<example_resource_name>\" {\n statement_id = \"<example_resource_id>\"\n action = \"events:PutEvents\"\n principal = \"<example_resource_id>\" # Critical: set to your own AWS account ID to block cross-account access\n event_bus_name = \"<example_resource_name>\"\n}\n```"
2030
},
2131
"Recommendation": {
22-
"Text": "To remediate this issue, remove the unknown cross-account access for delivery of events from the AWS EventBridge event bus.",
23-
"Url": "https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html"
32+
"Text": "Apply **least privilege** on the event bus resource policy: allow only specific account IDs or org scope (e.g., `aws:PrincipalOrgID`) and avoid wildcard `Principal` or `*`.\n\nConstrain rules to trusted senders using the `account` field and vetted sources, and add monitoring/throttling for **defense in depth**.",
33+
"Url": "https://hub.prowler.com/check/eventbridge_bus_cross_account_access"
2434
}
2535
},
26-
"Categories": [],
36+
"Categories": [
37+
"identity-access",
38+
"trust-boundaries"
39+
],
2740
"DependsOn": [],
2841
"RelatedTo": [],
2942
"Notes": ""

prowler/providers/aws/services/eventbridge/eventbridge_bus_exposed/eventbridge_bus_exposed.metadata.json

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
{
22
"Provider": "aws",
33
"CheckID": "eventbridge_bus_exposed",
4-
"CheckTitle": "Ensure that your AWS EventBridge event bus is not exposed to everyone",
5-
"CheckType": [],
4+
"CheckTitle": "AWS EventBridge event bus policy does not allow public access",
5+
"CheckType": [
6+
"Software and Configuration Checks/AWS Security Best Practices/Network Reachability",
7+
"Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices",
8+
"TTPs/Initial Access/Unauthorized Access"
9+
],
610
"ServiceName": "eventbridge",
711
"SubServiceName": "",
8-
"ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id",
12+
"ResourceIdTemplate": "",
913
"Severity": "high",
1014
"ResourceType": "AwsEventsEventbus",
11-
"Description": "Ensure that your AWS EventBridge event bus is not exposed to everyone.",
12-
"Risk": "If your AWS EventBridge event bus is exposed to everyone, unauthorized users can access your event bus and potentially view or modify your events.",
13-
"RelatedUrl": "https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CWE_GettingStarted.html",
15+
"Description": "EventBridge event bus resource policy is evaluated for **public access**, such as a `Principal: \"*\"` or overly broad conditions that allow any AWS account to publish events or manage rules on the bus.",
16+
"Risk": "Publicly accessible event buses enable **event injection** and unauthorized rule changes, undermining **integrity** and enabling **lateral movement**. Attackers can trigger downstream targets, causing **data exposure**, service disruption, and unexpected **costs** through high-volume events.",
17+
"RelatedUrl": "",
18+
"AdditionalURLs": [
19+
"https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html",
20+
"https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CWE_GettingStarted.html",
21+
"https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/CloudWatchEvents/event-bus-exposed.html",
22+
"https://aws.amazon.com/blogs/compute/simplifying-cross-account-access-with-amazon-eventbridge-resource-policies/"
23+
],
1424
"Remediation": {
1525
"Code": {
1626
"CLI": "aws events remove-permission --event-bus-name <event_bus_name> --statement-id <statement_id>",
17-
"NativeIaC": "",
18-
"Other": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/CloudWatchEvents/event-bus-exposed.html",
19-
"Terraform": ""
27+
"NativeIaC": "```yaml\n# CloudFormation: restrict EventBridge event bus access to a specific account (not public)\nResources:\n <example_resource_name>:\n Type: AWS::Events::EventBusPolicy\n Properties:\n StatementId: AllowSpecificAccount\n Action: events:PutEvents\n Principal: arn:aws:iam::<example_account_id>:root # CRITICAL: limit access to a specific AWS account to prevent public access\n # Omitting EventBusName applies this to the default event bus\n```",
28+
"Other": "1. Open the AWS Console and go to EventBridge > Event buses\n2. Select the target event bus and open the Permissions tab\n3. Click Edit policy\n4. Remove any statement where Principal is \"*\" or AWS is \"*\"\n5. If needed, add a statement allowing only your trusted account ID as Principal (arn:aws:iam::<ACCOUNT_ID>:root)\n6. Save changes",
29+
"Terraform": "```hcl\nresource \"aws_cloudwatch_event_bus_policy\" \"<example_resource_name>\" {\n # CRITICAL: Principal is a specific AWS account, not \"*\", preventing public access\n policy = <<POLICY\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Sid\": \"AllowSpecificAccount\",\n \"Effect\": \"Allow\",\n \"Principal\": {\"AWS\": \"arn:aws:iam::<example_account_id>:root\"},\n \"Action\": \"events:PutEvents\",\n \"Resource\": \"arn:aws:events:<example_region>:<example_account_id>:event-bus/default\"\n }]\n}\nPOLICY\n}\n```"
2030
},
2131
"Recommendation": {
22-
"Text": "To restrict access to your AWS EventBridge event bus, remove the permission that allows everyone to access it.",
23-
"Url": "https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html"
32+
"Text": "Apply **least privilege** resource policies: limit principals to specific accounts or your organization, and constrain actions and event attributes (e.g., `source`, `detail-type`). Avoid `Principal: \"*\"`.\n\nUse **defense in depth** with rule patterns that include the expected `account`. Monitor policy changes and bus activity.",
33+
"Url": "https://hub.prowler.com/check/eventbridge_bus_exposed"
2434
}
2535
},
2636
"Categories": [

prowler/providers/aws/services/eventbridge/eventbridge_global_endpoint_event_replication_enabled/eventbridge_global_endpoint_event_replication_enabled.metadata.json

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,43 @@
11
{
22
"Provider": "aws",
33
"CheckID": "eventbridge_global_endpoint_event_replication_enabled",
4-
"CheckTitle": "Check if EventBridge global endpoints have event replication enabled.",
4+
"CheckTitle": "EventBridge global endpoint has event replication enabled",
55
"CheckType": [
6-
"Software and Configuration Checks/Vulnerabilities"
6+
"Software and Configuration Checks/AWS Security Best Practices",
7+
"Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices"
78
],
89
"ServiceName": "eventbridge",
910
"SubServiceName": "",
10-
"ResourceIdTemplate": "arn:aws:events:{region}:{account-id}:endpoint/{endpoint-id}",
11+
"ResourceIdTemplate": "",
1112
"Severity": "medium",
1213
"ResourceType": "AwsEventsEndpoint",
13-
"Description": "Check if event replication is enabled for an Amazon EventBridge global endpoint. The control fails if event replication isn't enabled.",
14-
"Risk": "Without event replication, automatic failover in case of Regional failure may not work as expected, increasing the risk of service disruption.",
15-
"RelatedUrl": "https://docs.aws.amazon.com/config/latest/developerguide/global-endpoint-event-replication-enabled.html",
14+
"Description": "**EventBridge global endpoints** are configured with **event replication** `ENABLED` (not `DISABLED`) so custom events are replicated to both the primary and secondary Regions.",
15+
"Risk": "**No event replication** degrades **availability** and increases **RPO** during Regional outages.\n- Events can be lost or delayed if the primary Region fails\n- Automatic recovery to the primary may not occur, prolonging failover\n- Cross-Region inconsistency can affect data integrity",
16+
"RelatedUrl": "",
17+
"AdditionalURLs": [
18+
"https://docs.aws.amazon.com/securityhub/latest/userguide/eventbridge-controls.html#eventbridge-4",
19+
"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html",
20+
"https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_Endpoint.html",
21+
"https://docs.aws.amazon.com/config/latest/developerguide/global-endpoint-event-replication-enabled.html",
22+
"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-ge-create-endpoint.html",
23+
"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-ge-best-practices.html",
24+
"https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateEndpoint.html",
25+
"https://aws.amazon.com/blogs/compute/introducing-global-endpoints-for-amazon-eventbridge/"
26+
],
1627
"Remediation": {
1728
"Code": {
18-
"CLI": "aws events update-endpoint --name <endpoint-name> --event-replication-enabled",
19-
"NativeIaC": "",
20-
"Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/eventbridge-controls.html#eventbridge-4",
21-
"Terraform": ""
29+
"CLI": "aws events update-endpoint --name <endpoint-name> --replication-config State=ENABLED --role-arn <role-arn>",
30+
"NativeIaC": "```yaml\n# CloudFormation: Enable event replication on an EventBridge global endpoint\nResources:\n Endpoint:\n Type: AWS::Events::Endpoint\n Properties:\n Name: <example_resource_name>\n EventBuses:\n - EventBusArn: arn:aws:events:us-east-1:<example_resource_id>:event-bus/<example_resource_name>\n - EventBusArn: arn:aws:events:us-west-2:<example_resource_id>:event-bus/<example_resource_name>\n RoutingConfig:\n FailoverConfig:\n Primary:\n HealthCheck: arn:aws:route53:::healthcheck/<example_resource_id>\n Secondary:\n Route: us-west-2\n ReplicationConfig:\n State: ENABLED # Critical: enables event replication\n RoleArn: arn:aws:iam::<example_resource_id>:role/<example_resource_name> # Critical: role used by replication\n```",
31+
"Other": "1. In the AWS Console, open Amazon EventBridge and go to Global endpoints\n2. Select the endpoint and choose Edit\n3. Under Event replication, check Event replication enabled\n4. For Execution role, select an existing role or create a new one\n5. Save changes",
32+
"Terraform": "```hcl\n# Terraform (awscc): Enable event replication on an EventBridge global endpoint\nresource \"awscc_events_endpoint\" \"example\" {\n name = \"<example_resource_name>\"\n\n event_buses = [\n { event_bus_arn = \"arn:aws:events:us-east-1:<example_resource_id>:event-bus/<example_resource_name>\" },\n { event_bus_arn = \"arn:aws:events:us-west-2:<example_resource_id>:event-bus/<example_resource_name>\" }\n ]\n\n routing_config = {\n failover_config = {\n primary = { health_check = \"arn:aws:route53:::healthcheck/<example_resource_id>\" }\n secondary = { route = \"us-west-2\" }\n }\n }\n\n replication_config = { state = \"ENABLED\" } # Critical: enables event replication\n role_arn = \"arn:aws:iam::<example_resource_id>:role/<example_resource_name>\" # Critical: role used by replication\n}\n```"
2233
},
2334
"Recommendation": {
24-
"Text": "Enable event replication for your EventBridge global endpoints to ensure failover and regional fault tolerance.",
25-
"Url": "https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html"
35+
"Text": "Turn on **event replication** for global endpoints to ensure Regional resilience. Keep event buses, rules, and targets aligned across Regions. Use a dedicated IAM role with **least privilege** for replication. Design consumers for **idempotency** with unique IDs. Regularly test failover and monitor health as part of **defense in depth**.",
36+
"Url": "https://hub.prowler.com/check/eventbridge_global_endpoint_event_replication_enabled"
2637
}
2738
},
2839
"Categories": [
29-
"redundancy"
40+
"resilience"
3041
],
3142
"DependsOn": [],
3243
"RelatedTo": [],

0 commit comments

Comments
 (0)