aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

feat(security): emergency session containment runbook and APIs

Abierto
#450 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement orchestration security
Lenguaje dominante
TypeScript
Estrellas
146
Forks
46
Merge medio
3 d 10 h
PR fusionados (30 d)
24

Descripción

**Context:** ROADMAP.md → Credentials and authorization → Emergency session containment
**Related:** #209 (per-session IAM), #249 (credentials), behavioral circuit breaker draft

---

## Component

API or orchestration

## Describe the feature

Documented operator runbook and platform APIs to contain an active or compromised agent session: cancel the task, terminate the compute session, and revoke short-lived credentials (assumed SessionRole, GitHub App token, Token Vault grants where applicable). Emit a `containment` audit event for incident response.

## Use case

When an operator detects exfiltration, policy bypass attempts, or a tripped circuit breaker, they need a single coordinated containment action—not separate manual steps across Lambda, AgentCore, IAM, and GitHub. Incident response requires predictable, auditable kill switches.

## Proposed solution

1. `POST /tasks/{id}/contain` (operator-only) orchestrating: task cancel → compute termination → credential revocation best-effort.
2. Pair with runbook in `docs/guides/` covering AWS console fallbacks.
3. Wire `containment` event to `TaskEventsTable` and optional SNS/EventBridge (see lifecycle events draft).
4. Integration tests for happy path and partial-failure (e.g. compute already terminal).
5. CLI: `bgagent contain [--reason "..."]`.

## Other information

- Pairs with **Behavioral circuit breaker** (automated containment) and **Per-repo GitHub credentials** (#50, #249).
- Distinct from stranded-task reconciler (scheduled cleanup vs operator-initiated emergency).
- Design context: `docs/design/SECURITY.md`, `docs/design/ORCHESTRATOR.md`.

- [ ] This might be a breaking change

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza por la sección «Credentials and authorization» de ROADMAP.md y después lee docs/design/SECURITY.md y docs/design/ORCHESTRATOR.md; el issue no identifica archivos de implementación ni pruebas existentes. Se considera terminado cuando la API y la CLI de containment coordinan la cancelación, la terminación de compute, la revocación de credenciales best-effort y los eventos de auditoría, y el runbook de docs/guides y las pruebas de integración del happy path y de fallos parciales cubren este comportamiento.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
aws, github, typescript
Área
api, backend, cli, cloud, documentation, security
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Tranquilo
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.