elastic / elastic/integrations

[Amazon Bedrock AgentCore]: Integration Enhancement - Add Code Interpreter and Runtime Command datasets

Open
#19,936 5 comments 1 reaction 0 assignees View on GitHub
Integration:aws_bedrock_agentcore needs:triage Team:Obs-InfraObs
Dominant language
Handlebars
Stars
333
Forks
647
Avg merge
2d 17h
Merged PRs (30d)
225

Description

### Integration Name

Amazon Bedrock AgentCore [packages/aws_bedrock_agentcore]

### Dataset Name

code_interpreter_application_logs, runtime_command_logs, runtime_application_logs

### Integration Version

0.7.0

### Agent Version

9.4.2

### OS Version and Architecture

Elastic Agent on Amazon Linux (EC2)

### User Goal

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 `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.

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.

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in packages/aws_bedrock_agentcore and compare the existing runtime_application_logs, gateway_application_logs, memory_application_logs, and metrics datasets. Review how APPLICATION_LOGS records are delivered, including the documented code_interpreter_application_logs, runtime_command_logs, and runtime_application_logs sources, and verify what reaches Elastic. Done means the integration exposes the executed code or commands and their output where the source provides them, with coverage for the relevant datasets.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, observability, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.