Description
AgentCore injects agent credentials and MCP secrets into CLI environment variables. Agent or tool output may accidentally expose these values through stdout or stderr.
Add per-invocation secret redaction before output reaches:
- CloudWatch/container logs
- DynamoDB execution output
- WebSocket clients
- Error messages and captured stderr
Requirements:
- Redact resolved agent credentials and MCP secret values.
- Handle secrets split across stream chunks.
- Recursively redact structured output.
- Ensure stdio: inherit cannot bypass redaction.
- Add CloudWatch Logs data-protection policies as defense in depth.
- Add tests for stdout, stderr, structured output, and chunk boundaries.
Redaction protects against accidental disclosure. It is not a security boundary against deliberate encoding or exfiltration by an unrestricted agent.
Use case
Secure logs
Area
Backend (Lambda)
Additional context
No response
Description
AgentCore injects agent credentials and MCP secrets into CLI environment variables. Agent or tool output may accidentally expose these values through stdout or stderr.
Add per-invocation secret redaction before output reaches:
Requirements:
Redaction protects against accidental disclosure. It is not a security boundary against deliberate encoding or exfiltration by an unrestricted agent.
Use case
Secure logs
Area
Backend (Lambda)
Additional context
No response