AWS Bedrock AgentCore Gateway or Runtime Exposed via Public Resource Policy

Last updated 6 days ago on 2026-11-26
Created 6 days ago on 2026-11-26

About

Identifies a successful PutResourcePolicy call that attaches a resource-based policy granting any principal or any AWS account access to an Amazon Bedrock AgentCore Gateway or Runtime. A Gateway is the integration point between an agent and external tools, and a Runtime hosts the deployed agent itself, and either can be configured without an authorizer, so a public resource policy on one of them makes every tool or agent the resource exposes invocable by any AWS principal with no authentication, the same exposure class as a public S3 bucket.
Tags
Domain: CloudDomain: GenAIData Source: AWSData Source: AWS CloudTrailData Source: Amazon Web ServicesUse Case: Identity and Access AuditTactic: Initial AccessRule Type: ES|QLPlatform: AWSService: AWS BedrockMitre Atlas: AML.T0012Language: esql
Severity
high
Risk Score
73
MITRE ATT&CK™

Initial Access (TA0001)(external, opens in a new tab or window)

False Positive Examples
A deliberately public demo, prototype, or shared-tooling Gateway or Runtime created by a known platform or CI/CD principal. Validate the caller, the resource's `authorizerType`, and whether public invocation was an explicit, reviewed design decision rather than a misconfiguration. A policy statement with a wildcard principal that is actually scoped down by a `Condition` block (for example `aws:PrincipalOrgID`), which is not public despite the wildcard. Review the full policy document for a restricting `Condition` before treating the match as a true public exposure.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

aws(external, opens in a new tab or window)

Query
text code block:
from logs-aws.cloudtrail-* metadata _id, _version, _index | where event.dataset == "aws.cloudtrail" and event.outcome == "success" and event.provider == "bedrock-agentcore.amazonaws.com" and event.action == "PutResourcePolicy" and aws.cloudtrail.request_parameters is not null | eval Esql.is_gateway_or_runtime = aws.cloudtrail.request_parameters RLIKE """.*resourceArn=[^,]*(gateway|runtime).*""" | eval Esql.is_public_principal = aws.cloudtrail.request_parameters RLIKE """.*\"Principal\":\s*\"\*\".*""" or aws.cloudtrail.request_parameters RLIKE """.*\"Principal\":\s*\{\"AWS\":\s*\"\*\"\}.*""" | eval Esql.is_allow_effect = aws.cloudtrail.request_parameters RLIKE """.*\"Effect\":\s*\"Allow\".*""" | where Esql.is_gateway_or_runtime and Esql.is_public_principal and Esql.is_allow_effect | keep _id, _version, _index, @timestamp, event.action, event.provider, event.outcome, aws.cloudtrail.user_identity.arn, aws.cloudtrail.user_identity.type, aws.cloudtrail.user_identity.access_key_id, user.name, user_agent.original, source.ip, source.geo.country_name, cloud.account.id, cloud.region, data_stream.namespace, aws.cloudtrail.request_id, aws.cloudtrail.request_parameters

Install detection rules in Elastic Security

Detect AWS Bedrock AgentCore Gateway or Runtime Exposed via Public Resource Policy in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).