You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building detection rules for the AgentCore privilege-escalation paths in BeyondTrust's research
(https://www.beyondtrust.com/blog/entry/aws-agentcore-privilege-escalation). The core technique: code or commands executed inside an AgentCore runtime or code interpreter read the execution-role credentials from the instance-metadata endpoint (169.254.169.254) and use them outside the resource.
I confirmed the exploit end-to-end in our AWS lab — the stolen credentials authenticate as the resource's execution role via sts:GetCallerIdentity. I want to detect this behavior using the telemetry the AgentCore integration provides.
Existing Features
0.7.0 exposes runtime_application_logs, gateway_application_logs, memory_application_logs, and metrics.
But runtime_application_logs only carries the OTel InvokeAgentRuntimeprompt records
(request_payload.prompt), the agent-invocation path. The actual exploit steps never reach any dataset:
Code Interpreter (InvokeCodeInterpreter): no dataset exists, even though it emits a structured APPLICATION_LOGS record (same delivery mechanism as runtime_application_logs) containing the executed code and its returned output.
Runtime command exec (InvokeAgentRuntimeCommand): emits no OTel record and the command lands only as raw stdout in the runtime -DEFAULT[runtime-logs] streams, which the vended APPLICATION_LOGS delivery does not carry.
So no field in any current dataset carries the executed code/command or its output, which is exactly where
the credential-harvesting behavior appears. With no data, there's no detection to write.
What did you see?
Nothing arrives at Elastic regarding the specific techniques.
tl;dr: This is a valid enhancement request: aws_bedrock_agentcore has Code Interpreter metrics but no Code Interpreter application-log dataset, and its existing runtime log dataset is specific to InvokeAgentRuntime, so it will not capture the executed code/command/output needed for these detections.
Recommendation
Add two new log data streams to packages/aws_bedrock_agentcore:
code_interpreter_application_logs for the structured vended APPLICATION_LOGS records emitted by InvokeCodeInterpreter.
runtime_command_logs for raw runtime command/stdout records from the runtime -DEFAULT[runtime-logs] CloudWatch streams.
Do not extend runtime_application_logs alone. Its pipeline currently assumes the Agent Runtime invoke shape and hard-codes the normalized operation to invoke_agent, which would either misclassify or drop Code Interpreter/command-specific content.
Findings
Current package state:
packages/aws_bedrock_agentcore/manifest.yml:4 is version 0.7.0.
packages/aws_bedrock_agentcore/manifest.yml:7 says the package covers Agent runtime, Gateway, Identity, Memory, Browser Tools, and Code Interpreter metrics/logs.
packages/aws_bedrock_agentcore/docs/README.md:20-21 documents only the metrics data stream in the top-level data-stream list, while the Logs section starts with Runtime Application Logs at packages/aws_bedrock_agentcore/docs/README.md:281-289.
Existing data streams on disk are only gateway_application_logs, memory_application_logs, metrics, and runtime_application_logs.
Code Interpreter is present in metrics/dashboards: packages/aws_bedrock_agentcore/data_stream/metrics/manifest.yml:1-6 defines the metrics stream, and the dashboard references InvokeCodeInterpreter, but there is no code_interpreter_application_logs data stream.
Why runtime_application_logs is not enough:
packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/manifest.yml:1-3 defines only aws_bedrock_agentcore.runtime_application_logs.
The runtime pipeline parses JSON into aws.bedrock_agentcore at packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:19-25.
It copies/flattens only body.request_payload and body.response_payload at packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:80-98.
It removes the remaining body at packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:101-104, so non-modeled body fields from another structured log shape would not be preserved unless the pipeline is changed.
It hard-codes aws.bedrock_agentcore.operation_name to invoke_agent at packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:142-145.
Runtime fields model prompt/request/response payloads, not code/command output: packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/fields/fields.yml:45-62.
The pipeline test fixture is an InvokeAgentRuntime record with body.request_payload.prompt: packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/_dev/test/pipeline/test-aws-bedrock-agentcore.log:1.
The sample output confirms the normalized dataset and operation are runtime-specific: packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/sample_event.json:54-68.
elastic-package is not installed in this workflow environment, so I could not run package pipeline tests here:
$ command -v elastic-package ||true# no output
Detailed Action Plan
Add packages/aws_bedrock_agentcore/data_stream/code_interpreter_application_logs/ by following the existing log data-stream layout from runtime_application_logs, gateway_application_logs, and memory_application_logs:
manifest.yml with dataset aws_bedrock_agentcore.code_interpreter_application_logs and both aws-cloudwatch and aws-s3 stream templates.
agent/stream/aws-cloudwatch.yml.hbs and agent/stream/aws-s3.yml.hbs, likely copied from runtime_application_logs unless Code Interpreter needs different default log-group guidance.
elasticsearch/ingest_pipeline/default.yml that parses the structured APPLICATION_LOGS JSON but sets an operation such as invoke_code_interpreter only when appropriate, rather than hard-coding invoke_agent.
fields/fields.yml for Code Interpreter identifiers and payload fields, including executed code/input and returned output/result fields based on real AWS sample payloads.
_dev/test/pipeline/*.log and *-expected.json fixtures covering at least code input, output, error output, request/session/resource identifiers, and large payload behavior.
Add packages/aws_bedrock_agentcore/data_stream/runtime_command_logs/ for raw runtime command logs:
Use the same AWS CloudWatch/S3 collection pattern, but configure docs and tests around runtime -DEFAULT[runtime-logs] streams instead of vended APPLICATION_LOGS streams.
Preserve event.original/message and map command execution content to fields useful for detections, for example command line, stdout, stderr, exit status if present, session/request/resource identifiers when extractable, cloud.account.id, cloud.region, and log.file.path/CloudWatch stream metadata.
Avoid lossy parsing: if command stdout is unstructured, keep the raw line searchable and only extract fields when the format is deterministic.
Update package docs and metadata:
Update packages/aws_bedrock_agentcore/docs/README.md:20-21 to list log data streams, not only metrics.
Add setup guidance near packages/aws_bedrock_agentcore/docs/README.md:38-47 for selecting the Code Interpreter APPLICATION_LOGS log group and runtime command log streams.
Add examples to the Logs section after packages/aws_bedrock_agentcore/docs/README.md:281-289 for the two new datasets.
Add a new top entry in packages/aws_bedrock_agentcore/changelog.yml for the enhancement.
Validate locally with package tests once implemented:
cd packages/aws_bedrock_agentcore
elastic-package test pipeline --data-streams code_interpreter_application_logs,runtime_command_logs,runtime_application_logs
elastic-package build
It copies/flattens only body.request_payload and body.response_payload at packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:80-98.
It removes the remaining body at packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:101-104, so non-modeled body fields from another structured log shape would not be preserved unless the pipeline is changed.
So, is the main requirement that we want other fields parsed/mapped from the body as well before dropping it ?
@miguel-sanchez-elastic is the PM and will review the ER. My understanding is that this is not a CVE or security incident. It's an ER to collect additional data with the integration.
I am the (new) PM of the area and I am getting familiar with this. Would you mind sharing who is the PM in your area? I'd like to talk with them to understand more about the need and urgency
Hi @agithomas , do you remember why we knew about this gap and we didn't do it? Was it to cut scope? complexity? other?
I'm adding @Mikaayenson to the thread. We need those new datasets to expand coverage for Amazon Bedrock AgentCore, you have one link based on BeyondTrust research that we can't cover now with the current datasets.
But runtime_application_logs only carries the OTel InvokeAgentRuntime prompt records
(request_payload.prompt), the agent-invocation path. The actual exploit steps never reach any dataset:
Code Interpreter (InvokeCodeInterpreter): no dataset exists, even though it emits a structured APPLICATION_LOGS record (same delivery mechanism as runtime_application_logs) containing the executed code and its returned output.
Runtime command exec (InvokeAgentRuntimeCommand): emits no OTel record and the command lands only as raw stdout in the runtime -DEFAULT [runtime-logs] streams, which the vended APPLICATION_LOGS delivery does not carry.
The implementation will need two new data streams, one for each log type: code_interpreter_application_logs for the InvokeCodeInterpreter vended APPLICATION_LOGS records, and a runtime_logs/runtime_container_logs data stream for the -DEFAULT [runtime-logs] streams that carry the InvokeAgentRuntimeCommand output.
Activity
github-actions commentedon Jul 2, 2026
tl;dr: This is a valid enhancement request:
aws_bedrock_agentcorehas Code Interpreter metrics but no Code Interpreter application-log dataset, and its existing runtime log dataset is specific toInvokeAgentRuntime, so it will not capture the executed code/command/output needed for these detections.Recommendation
Add two new log data streams to
packages/aws_bedrock_agentcore:code_interpreter_application_logsfor the structured vendedAPPLICATION_LOGSrecords emitted byInvokeCodeInterpreter.runtime_command_logsfor raw runtime command/stdout records from the runtime-DEFAULT[runtime-logs]CloudWatch streams.Do not extend
runtime_application_logsalone. Its pipeline currently assumes the Agent Runtime invoke shape and hard-codes the normalized operation toinvoke_agent, which would either misclassify or drop Code Interpreter/command-specific content.Findings
Current package state:
packages/aws_bedrock_agentcore/manifest.yml:4is version0.7.0.packages/aws_bedrock_agentcore/manifest.yml:7says the package covers Agent runtime, Gateway, Identity, Memory, Browser Tools, and Code Interpreter metrics/logs.packages/aws_bedrock_agentcore/docs/README.md:20-21documents only themetricsdata stream in the top-level data-stream list, while the Logs section starts with Runtime Application Logs atpackages/aws_bedrock_agentcore/docs/README.md:281-289.gateway_application_logs,memory_application_logs,metrics, andruntime_application_logs.packages/aws_bedrock_agentcore/data_stream/metrics/manifest.yml:1-6defines the metrics stream, and the dashboard referencesInvokeCodeInterpreter, but there is nocode_interpreter_application_logsdata stream.Why
runtime_application_logsis not enough:packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/manifest.yml:1-3defines onlyaws_bedrock_agentcore.runtime_application_logs.aws.bedrock_agentcoreatpackages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:19-25.body.request_payloadandbody.response_payloadatpackages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:80-98.bodyatpackages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:101-104, so non-modeled body fields from another structured log shape would not be preserved unless the pipeline is changed.aws.bedrock_agentcore.operation_nametoinvoke_agentatpackages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:142-145.packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/fields/fields.yml:45-62.InvokeAgentRuntimerecord withbody.request_payload.prompt:packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/_dev/test/pipeline/test-aws-bedrock-agentcore.log:1.packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/sample_event.json:54-68.Relevant prior package work:
packages/aws_bedrock_agentcore/changelog.yml:12-16showsruntime_application_logswas added in PR [amazon_bedrock_agentcore] addruntime_application_logsdata stream #15991.packages/aws_bedrock_agentcore/changelog.yml:7-11showsmemory_application_logswas added in PR [amazon_bedrock_agentcore] addmemory_application_logsdata stream #16588.packages/aws_bedrock_agentcore/changelog.yml:2-6showsgateway_application_logswas added in PR [amazon_bedrock_agentcore] addgateway_application_logsdata stream #15991 #16587.packages/aws_bedrock_agentcore/changelog.yml:28-31shows Code Interpreter support currently exists for metrics/dashboards via PR [Amazon Bedrock Agentcore] Add Agentcore browsertools and code interpreter metrics and dashboard #16577.Verification
I verified the package data streams and searched for the requested dataset/operation names:
elastic-packageis not installed in this workflow environment, so I could not run package pipeline tests here:Detailed Action Plan
Add
packages/aws_bedrock_agentcore/data_stream/code_interpreter_application_logs/by following the existing log data-stream layout fromruntime_application_logs,gateway_application_logs, andmemory_application_logs:manifest.ymlwith datasetaws_bedrock_agentcore.code_interpreter_application_logsand bothaws-cloudwatchandaws-s3stream templates.agent/stream/aws-cloudwatch.yml.hbsandagent/stream/aws-s3.yml.hbs, likely copied fromruntime_application_logsunless Code Interpreter needs different default log-group guidance.elasticsearch/ingest_pipeline/default.ymlthat parses the structured APPLICATION_LOGS JSON but sets an operation such asinvoke_code_interpreteronly when appropriate, rather than hard-codinginvoke_agent.fields/fields.ymlfor Code Interpreter identifiers and payload fields, including executed code/input and returned output/result fields based on real AWS sample payloads._dev/test/pipeline/*.logand*-expected.jsonfixtures covering at least code input, output, error output, request/session/resource identifiers, and large payload behavior.Add
packages/aws_bedrock_agentcore/data_stream/runtime_command_logs/for raw runtime command logs:-DEFAULT[runtime-logs]streams instead of vendedAPPLICATION_LOGSstreams.event.original/messageand map command execution content to fields useful for detections, for example command line, stdout, stderr, exit status if present, session/request/resource identifiers when extractable,cloud.account.id,cloud.region, andlog.file.path/CloudWatch stream metadata.Update package docs and metadata:
packages/aws_bedrock_agentcore/docs/README.md:20-21to list log data streams, not onlymetrics.packages/aws_bedrock_agentcore/docs/README.md:38-47for selecting the Code Interpreter APPLICATION_LOGS log group and runtime command log streams.packages/aws_bedrock_agentcore/docs/README.md:281-289for the two new datasets.packages/aws_bedrock_agentcore/changelog.ymlfor the enhancement.Validate locally with package tests once implemented:
Related Items
runtime_application_logsdata stream referenced by this issue.gateway_application_logs; useful as a recent log data-stream implementation pattern.memory_application_logs; useful as a recent log data-stream implementation pattern.packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:80-104body.packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml:142-145operation_name: invoke_agent.packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/fields/fields.yml:45-62packages/aws_bedrock_agentcore/docs/README.md:281-289What is this? | From workflow: Issue Triage
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
narph commentedon Aug 10, 2026
@elastic/obs-infraobs-integrations , @ishleenk17 can you folks chime in here?
ishleenk17 commentedon Aug 10, 2026
So, is the main requirement that we want other fields parsed/mapped from the body as well before dropping it ?
agithomas commentedon Aug 11, 2026
Thanks @bryans3c, for creating this Enhancement request. Yes, this is a known gap from when we developed the Amazon Bedrock AgentCore integration.
++ @emma-raffenne for tracking and prioritisation of the request.
bryans3c commentedon Aug 31, 2026
Hi @agithomas @emma-raffenne, any update on this? Thanks!
emma-raffenne commentedon Sep 26, 2026
@elastic/obs-signals-traces-team I believe this is on your team (LLM observability)
jennypavlova commentedon Sep 28, 2026
I believe it should be @elastic/obs-signals-ai-o11y?
bryans3c commentedon Oct 1, 2026
Hi @agithomas @emma-raffenne, any update on this? Thanks!
agithomas commentedon Oct 1, 2026
@bryans3c , the Obs-signals-integration team no longer owns this enhancement request (ER).
@hegerchr , could you please take a look and have someone from your team take it forward?
hegerchr commentedon Oct 5, 2026
@miguel-sanchez-elastic is the PM and will review the ER. My understanding is that this is not a CVE or security incident. It's an ER to collect additional data with the integration.
miguel-sanchez-elastic commentedon Oct 6, 2026
Hi @bryans3c and @narph ,
I am the (new) PM of the area and I am getting familiar with this. Would you mind sharing who is the PM in your area? I'd like to talk with them to understand more about the need and urgency
Hi @agithomas , do you remember why we knew about this gap and we didn't do it? Was it to cut scope? complexity? other?
bryans3c commentedon Oct 6, 2026
Hi @miguel-sanchez-elastic,
I'm adding @Mikaayenson to the thread. We need those new datasets to expand coverage for Amazon Bedrock AgentCore, you have one link based on BeyondTrust research that we can't cover now with the current datasets.
Thanks!
infra-vault-gh-plugin-prod commentedon Oct 9, 2026
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)
agithomas commentedon Oct 9, 2026
Correct, it was to cut the scope.
kcreddy commentedon Oct 14, 2026
The implementation will need two new data streams, one for each log type:
code_interpreter_application_logsfor the InvokeCodeInterpreter vended APPLICATION_LOGS records, and aruntime_logs/runtime_container_logsdata stream for the -DEFAULT [runtime-logs] streams that carry theInvokeAgentRuntimeCommandoutput.cc: @narph