{"slug": "show-hn-sample-incident-response-agent-open-source-ai-agent-from-aws-cirt", "title": "Show HN: Sample-incident-response-agent, open-source AI agent from AWS CIRT", "summary": "AWS released Sample-incident-response-agent, an open-source agentic AI assistant that triages suspected AWS security events through a six-phase investigation workflow and maps findings to the Threat Technique Catalog for AWS (TTC) and MITRE ATT&CK. The agent is read-only by design, with permissions enforced by the IAM credentials it is given, and runs as a stdio MCP tool server with eight read-only tools including evidence_search, evidence_aggregate, query_state, list_findings, dns_search, network_search, s3_access_search and catalog_lookup, plus adapters for Kiro Crew and the OpenAI Codex CLI. AWS describes the release as sample code for learning and experimentation, and the agent presents every assessment and stakeholder message as a draft for human review.", "body_md": "An agentic AI assistant that triages suspected AWS security events. Given a reported\nevent, the agent performs evidence-based triage: it works through a six-phase\ninvestigation workflow, maps findings to the\n[Threat Technique Catalog for AWS (TTC)](https://aws-samples.github.io/threat-technique-catalog-for-aws/)\nand MITRE ATT&CK, separates confirmed facts from inference, and produces a triage\nassessment for an analyst to review.\n\nThe agent is designed to be **read-only and analyst-in-the-loop**. Permissions are\nenforced by the AWS credentials you give it. It presents every assessment and\nstakeholder message as a draft for a human to review.\n\nThis is sample code, provided for learning and experimentation. Review it, and test it in your own environment, before using it in an investigation.\n\n- **Evidence-based, not narrative-driven.** It treats denied API calls and missing\ntelemetry as evidence, builds an indicator matrix, and bounds the blast radius with\nexplicit negative findings, rather than stopping at the first plausible story.\n- **Read-only by design, enforced by IAM.** Run the agent with a read-only IAM role or\nuser (see[docs/IAM-POLICY.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/IAM-POLICY.md) ). AWS has implicit deny for\nactions, regardless of what any code does. On top of that, the live backend calls\nonly read APIs, and the agent is limited on your machine: the Kiro Crew adapter\ndenies file writes and shell commands, and in Codex you can enforce the same with a\nread-only sandbox.\n- **Works with your agent host.** The core is a stdio MCP tool server plus a\nmethodology prompt and output schemas. Adapters for Kiro Crew and the OpenAI Codex\nCLI are included, and any MCP-capable host can use the tool server.\n- **Offline or live.** Investigate the bundled sample incident with no AWS account,\nor point the agent at a live AWS account. It uses the same tools and methodology\neither way.\n\nGiven a suspected security event, the agent works through six phases:\n\n1. Case Intake\n2. Environment Baseline\n3. Indicator Analysis\n4. Scope Determination\n5. Triage Assessment\n6. Documentation & Handoff\n\nRun as a Kiro Crew bot (see [below](#run-it-autonomously-as-a-kiro-crew-bot)), it works\nPhases 1 through 5 on its own and pauses only for a decision or to approve the final\nwrite-up. Driven directly by an analyst instead, it pauses at each phase boundary for\nreview. Either way it calls tools to gather and correlate evidence, reasons about\nbehavioral anomalies, maps activity to threat techniques, and writes up a verdict with\nseverity, root cause, visibility gaps, and prioritized remediation.\n\n- \n**Investigation tools** (`tools/` ): an MCP server with eight read-only tools:\n  - `evidence_search` : search CloudTrail events\n  - `evidence_aggregate` : count CloudTrail events by principal, IP, event, region, or service\n  - `query_state` : list IAM users, access keys, and roles, EC2 instances, and S3 buckets\n  - `list_findings` : list Amazon GuardDuty findings\n  - `dns_search` : search Amazon Route 53 Resolver DNS query logs\n  - `network_search` : search Amazon VPC Flow Logs\n  - `s3_access_search` : search Amazon S3 server access logs\n  - `catalog_lookup` : map CloudTrail events to TTC and MITRE ATT&CK techniques\n The DNS, flow-log, and S3-access tools return data when the evidence bundle includes those sources. A backend that doesn't provide a source (the live AWS backend does not collect these today) reports it as a visibility gap rather than failing, so the agent treats a missing source as something to flag, not as proof the environment is clean. Evidence results include the AWS account ID the evidence comes from, so the agent can stop if it's connected to the wrong account.\n- \n**Workflow** (`workflow/` ): the six-phase methodology prompt, output schemas, and\ncommunication guidelines.\n- \n**Technique catalog** (`catalog/` ): public (TLP:CLEAR) entries from the Threat\nTechnique Catalog for AWS, plus a few MITRE ATT&CK techniques the TTC doesn't cover,\nwith detection and mitigation guidance.\n- \n**Sample evidence** (`evidence/sample-incident/` ): a scrubbed, multi-stage incident\nyou can investigate offline. All account IDs, access keys, and IP addresses in it are\nplaceholders or reserved documentation values.\n- \n**Evaluation** (`evaluation/` ): an expert answer key and a scorer that grades an\ninvestigation report on four dimensions.\n- \n**Host adapters** (`adapters/` ): setup for Kiro Crew (`adapters/kiro-crew/` ) and the\nOpenAI Codex CLI (`adapters/codex/` ). The Kiro Crew adapter also includes an optional\nautonomous**bot** (`adapters/kiro-crew/bot/` ) that runs an investigation end to end\nand dispatches parallel read-only workers.\n- \n**Launcher** (`bin/sec-tools-server.sh` ): starts the tool server reliably from any\nMCP host (see[Connect to an MCP host](#connect-to-an-mcp-host) ).\n\n- [Git](https://git-scm.com/downloads) , to clone the repository.\n- [Node.js](https://nodejs.org/) 22 or later, which includes`npm` . Check your version\nwith`node --version` . Node.js 20 and earlier are past[end of support](https://nodejs.org/en/about/previous-releases) and no longer receive\nsecurity updates.\n- An agent host to drive the investigation: [Kiro Crew](https://kiro.dev/docs/crew/) or the[OpenAI Codex CLI](https://github.com/openai/codex) . See the adapter guides below.\nBoth hosts require you to sign in to them on first use (with your own account), and\neach has its own setup:\n  - **Kiro Crew** also needs[Python 3](https://www.python.org/downloads/) for the\ninstaller. On first launch the dashboard walks you through installing the Kiro CLI\nand completing sign-in; see the[Kiro Crew installation guide](https://kiro.dev/docs/crew/installation/) .\n  - **OpenAI Codex CLI** needs its own sign-in to a Codex account; follow its[install instructions](https://github.com/openai/codex#quickstart) .\n\nFor live investigation of an AWS account, you also need:\n\n- An AWS account and credentials. We recommend least-privilege, read-only credentials\n(see [docs/AUTHENTICATION.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/AUTHENTICATION.md) ).\n- The [AWS Command Line Interface (AWS CLI)](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) ,\nto set up a credentials profile and confirm which account it uses.\n\nClone the repository, then install, build, and test:\n\n```\ngit clone https://github.com/aws-samples/sample-incident-response-agent.git\ncd sample-incident-response-agent\nnpm install\nnpm run build\nnpm test\n```\n\nAll tests should pass.\n\nStart the tool server against the sample incident. It needs no credentials and no network access:\n\n```\nSEC_BACKEND=local \\\nSEC_BUNDLE=./evidence/sample-incident \\\n  npm start\n```\n\nThe server prints `[tool-server] ready (backend=local, ...)` and then waits for an MCP\nclient to connect over stdio. Press Ctrl+C to stop it. To run an investigation, connect\nan agent host (see [Run it in an agent host](#run-it-in-an-agent-host)).\n\nThe offline backend reads any directory you point `SEC_BUNDLE` at, so you can\ninvestigate your **own** exported logs the same way — without giving the agent live\nAWS access. This suits teams that would rather analyze an export than connect a\ncredential.\n\nA bundle is a directory with these files (the bundled sample is a complete worked example of the format):\n\n| File | Contents | Required | \n|---|---|---|\n| `cloudtrail-mgmt.jsonl` | CloudTrail management events, one event per line | **Yes** | \n| `cloudtrail-data.jsonl` | CloudTrail data events, one event per line | Optional | \n| `findings.json` | Array of Amazon GuardDuty findings | Optional | \n| `account-state.json` | Resource/identity snapshot, keyed by resource family | Optional | \n| `dns-queries.jsonl` | Amazon Route 53 Resolver query-log records, one per line | Optional | \n| `flow-logs.jsonl` | Amazon VPC Flow Log records, one per line | Optional | \n| `s3-access.jsonl` | Amazon S3 server access log records, one per line | Optional | \n\nThe `.jsonl` files hold one raw JSON record per line — for CloudTrail, the same event\nshape delivered to Amazon S3. Only `cloudtrail-mgmt.jsonl` is required; any source you\nleave out is reported as a visibility gap during the investigation rather than causing\nan error, and malformed lines are skipped. Compare any file against\n[evidence/sample-incident/](https://github.com/aws-samples/sample-incident-response-agent/blob/main/evidence/sample-incident) for the exact shape.\n\nCloudTrail delivered to S3 arrives as gzipped JSON with the events under a `Records`\narray. To turn an export into `cloudtrail-mgmt.jsonl` (one event per line), for example\nwith [`jq`](https://jqlang.github.io/jq/):\n\n```\n# From a folder of CloudTrail .json.gz files exported from S3:\ngunzip -c *.json.gz | jq -c '.Records[]' > /path/to/my-bundle/cloudtrail-mgmt.jsonl\n```\n\nThen point the server at your bundle and connect an agent host as usual:\n\n```\nSEC_BACKEND=local \\\nSEC_BUNDLE=/path/to/my-bundle \\\n  npm start\n```\n\nYour logs stay on your machine: this backend makes no network calls and needs no credentials. Name the account your logs come from in your opening message, so the agent can confirm it is investigating the account you intend.\n\nFirst confirm which account your credentials profile uses:\n\n```\naws sts get-caller-identity --profile <your-profile>\n```\n\nThen start the tool server with that profile:\n\n```\nexport SEC_BACKEND=aws\nexport AWS_REGION=us-east-1\nexport AWS_PROFILE=<your-profile>\nnpm start\n```\n\nThe agent can do whatever its credentials allow. We recommend least-privilege, read-only credentials; with a read-only IAM policy, AWS denies any write. The tool server reads credentials from the standard AWS credential chain. Credential values are never passed through the conversation or written into the agent configuration. See:\n\n- [docs/AUTHENTICATION.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/AUTHENTICATION.md) : ways to get credentials\n(assume a read-only role, AWS IAM Identity Center, or console sign-in), in order of\npreference.\n- [docs/IAM-POLICY.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/IAM-POLICY.md) : the least-privilege read-only IAM policy,\nmapping each tool to the AWS API and IAM action it needs\n([iam-readonly-policy.json](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/iam-readonly-policy.json) ).\n\nThe included adapters connect the tool server and the methodology prompt to your host:\n\n- **Kiro Crew:**[adapters/kiro-crew/IMPORT.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/adapters/kiro-crew/IMPORT.md) . An\ninstaller adds the agent to the Crew agent picker (offline by default, or live, or\nboth), and an autonomous bot is included.\n- **OpenAI Codex CLI:**[adapters/codex/README.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/adapters/codex/README.md) . Add an\nMCP server block to`~/.codex/config.toml` ; Codex loads the methodology from`AGENTS.md` at the repository root.\n\nWhichever you use, **start a new session for each investigation** so details from an\nearlier case don't carry into this one. In Kiro Crew, open a new conversation (a bot\nhas a **Fresh start** control); for a single-agent chat, set memory mode to\n**Temporary**, which neither reads nor writes Crew memory (see\n[Memory modes](https://kiro.dev/docs/crew/chat/sessions/)). In Codex, start a new\n`codex` session.\n\nWhen you open an investigation, **name the account in scope.** Every evidence result\nreports the account ID it comes from. If your opening message puts a different account\nin scope, the agent stops at Phase 1 and asks you to reconnect or change the scope. The\nbundled sample uses account `111122223333`; in live mode, it's the account\n`aws sts get-caller-identity` reports for your profile.\n\nThe recommended way to run a full investigation in Kiro Crew is the **bot**: it works\nPhases 1 through 5 on its own, dispatches a separate read-only worker for each\nindependent task (for example, one worker per identity, resource, or log source) and\nruns them in parallel, and pauses for you only to unblock a decision or to approve the\nfinal write-up in Phase 6. The bot never calls the investigation tools itself; its\nworkers do, using the same methodology and the same read-only tools.\n\n**Run the bot on the Kiro agent harness.** The investigator agent defines read-only\npermission rules (it denies file writes, shell, and reading sensitive paths). Kiro\nCrew only applies an agent's permission rules on a harness that supports them — the\ndefault Kiro agent backend. On another model backend, Crew won't apply those rules\nand will block the investigation tools, telling you to run the bot on the Kiro agent.\nSo keep the bot's agent harness set to **Kiro** (Settings → Agent Harness). You can\nstill use another harness, such as the OpenAI Codex CLI, through the single-agent\nflow below. (See the Kiro Crew docs on\n[agent backends](https://kiro.dev/docs/crew/features/agent-backends/).)\n\nThe bot is defined in `adapters/kiro-crew/bot/incident-response-agent.kirobot`. Setting\nit up is an import plus a few one-time clicks in Crew, because importing a bot carries\nits name and rules but not its tool access or approval mode. In short:\n\n1. **Install the investigator agent first** (`adapters/kiro-crew/install.sh` ), so the\nbot has a worker agent to dispatch. See[adapters/kiro-crew/IMPORT.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/adapters/kiro-crew/IMPORT.md) .\n2. **Import the bot** in Crew:**Bots → Import from file** , choose`adapters/kiro-crew/bot/incident-response-agent.kirobot` , tick**I understand this\nwidens permissions** , and select**Import Bot** .\n3. **Add the investigator ability** to the bot (open it →**Abilities → Add\nabilities** , then select the agent), so its workers get the read-only`sec-tools` tools. The ability is added as soon as you select it; there is no separate save\nstep.\n4. **Set the bot's approval mode to the most automatic one your build offers** (for example Trust or Automatic). Every tool the bot can reach is read-only, so\nautomatic approval is safe here, and it lets the parallel workers run without a\nprompt on each call. An interactive mode still works but asks before every tool\ncall, which makes an autonomous multi-worker run slow.\n\n[adapters/kiro-crew/IMPORT.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/adapters/kiro-crew/IMPORT.md) gives the exact menu\npaths, the two-picker offline/live layout, the approval posture, and troubleshooting.\nTo start an investigation, open the bot, click **Fresh start** to clear any previous\nconversation, and give it the account in scope, the incident time window, and the\nindicator you're investigating.\n\nIf you'd rather drive the investigation yourself, or use the OpenAI Codex CLI, run it\nas a single agent instead of a bot. It works one phase per turn and pauses at each\nphase boundary for you to review before continuing — the same methodology and tools,\nwithout parallel workers. In Kiro Crew, pick the installed agent\n(`incident-response-investigator`, or `incident-response-investigator-online` for live)\nfrom the agent picker in a new Temporary session. In Codex, start a `codex` session\nafter adding the MCP server block. Describe the suspected event — what was reported,\nthe time window, and the account in scope — and reply to advance through the phases.\n\nTo use the tools from another MCP host, register the tool server as a stdio MCP\nserver. Point the server's `command` at the launcher, `bin/sec-tools-server.sh`,\nrather than at `node`:\n\n- Many hosts start MCP servers with a reduced environment. Desktop apps on macOS get a\nminimal `PATH` that excludes Homebrew, nvm, and Volta, and some hosts omit`HOME` .\n- The launcher finds a supported `node` (22 or later), restores`HOME` and the AWS\nconfig file locations, and puts the AWS CLI on`PATH` for profiles that use`credential_process` . Then it starts the built server.\n- Run `npm run build` first; the launcher starts the built server.\n\nA typical entry, in the JSON format most MCP hosts use (use absolute paths):\n\n```\n{\n  \"mcpServers\": {\n    \"sec-tools\": {\n      \"command\": \"/absolute/path/to/repo/bin/sec-tools-server.sh\",\n      \"args\": [],\n      \"env\": {\n        \"SEC_BACKEND\": \"local\",\n        \"SEC_BUNDLE\": \"/absolute/path/to/repo/evidence/sample-incident\"\n      }\n    }\n  }\n}\n```\n\nFor live investigation, set `env` to `SEC_BACKEND=aws`, `AWS_REGION`, and optionally\n`AWS_PROFILE`. Never put credential values in the host configuration. If your host\npasses only selected environment variables to MCP servers, use a named profile or\nforward the AWS credential variables explicitly (see\n[docs/AUTHENTICATION.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/AUTHENTICATION.md)).\n\nSave the agent's final report as a Markdown file, then score it against the answer key for the sample incident:\n\n```\nnpm run evaluate -- evaluation/answer-keys/sample-incident.json <agent-report.md>\n```\n\nThe scorer prints a score for each of four dimensions and an overall pass or fail. See\n[evaluation/README.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/evaluation/README.md) for the rubric.\n\n```\ntools/          MCP tool server: read-only investigation tools and backends\nbin/            sec-tools-server.sh: launcher to use as the MCP server command\nworkflow/       Six-phase methodology prompt, output schemas, communication guidelines\ncatalog/        Technique catalog (TLP:CLEAR) and its loader\nevidence/       Bundled sample incident (scrubbed, offline)\nevaluation/     Answer key and scorer\nadapters/       Host adapters: Kiro Crew, OpenAI Codex CLI\nAGENTS.md       Codex project instructions (generated from workflow/system-prompt.md)\ndocs/           Architecture, authentication, IAM policy\n```\n\n- [docs/ARCHITECTURE.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/ARCHITECTURE.md) : layers, data flow, safety model, and\nthe limits of each evidence source\n- [docs/AUTHENTICATION.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/AUTHENTICATION.md) : credential options for live mode\n- [docs/IAM-POLICY.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/IAM-POLICY.md) : least-privilege read-only IAM policy\n- [workflow/README.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/workflow/README.md) : the investigation workflow\n- [catalog/README.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/catalog/README.md) : the technique catalog and its sources\n- [evaluation/README.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/evaluation/README.md) : the scoring rubric\n- [evidence/sample-incident/README.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/evidence/sample-incident/README.md) : the\nsample incident and its expected findings\n\n- **IAM is the enforcement boundary.** Run the agent with a least-privilege, read-only\nIAM role or user ([docs/IAM-POLICY.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/IAM-POLICY.md) ). AWS denies any action\nthe policy doesn't explicitly allow, independent of the agent or its code. The agent\ndoes not inspect its own permissions or refuse to start, so it can do whatever the\ncredentials you supply allow. We recommend read-only credentials.\n- **Defense in depth.** On top of IAM, the live backend calls only read APIs. On your\nmachine, the Kiro Crew adapter denies file writes and shell commands. Codex can run\nshell commands by default;`AGENTS.md` instructs it not to change anything, and\nstarting Codex with`--sandbox read-only` enforces that for shell commands (see[adapters/codex/README.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/adapters/codex/README.md) ). These controls reduce the\nchance of an unintended action, but they don't replace the IAM policy.\n- **Drafts, not actions.** The agent presents assessments and stakeholder messages as\ndrafts for review. It recommends remediation; it has no tools to perform it.\n\nSee [CONTRIBUTING](https://github.com/aws-samples/sample-incident-response-agent/blob/main/CONTRIBUTING.md#security-issue-notifications) for more\ninformation.\n\nThis library is licensed under the MIT-0 License. See the [LICENSE](https://github.com/aws-samples/sample-incident-response-agent/blob/main/LICENSE) file.\n\nIncludes material from MITRE ATT&CK®. See [catalog/README.md](https://github.com/aws-samples/sample-incident-response-agent/blob/main/catalog/README.md) for\nattribution.", "url": "https://wpnews.pro/news/show-hn-sample-incident-response-agent-open-source-ai-agent-from-aws-cirt", "canonical_source": "https://github.com/aws-samples/sample-incident-response-agent", "published_at": "2026-12-02 20:12:24+00:00", "updated_at": "2026-12-02 20:17:01.780657+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "ai-tools", "agent-protocols", "artificial-intelligence"], "entities": ["AWS", "AWS CIRT", "Threat Technique Catalog for AWS", "MITRE ATT&CK", "Kiro Crew", "OpenAI Codex CLI", "Amazon GuardDuty", "CloudTrail"], "also_reported_by": [], "takeaway": "Run the agent under a read-only IAM role and treat denied API calls and missing telemetry sources as evidence or visibility gaps rather than proof the environment is clean.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-sample-incident-response-agent-open-source-ai-agent-from-aws-cirt", "markdown": "https://wpnews.pro/news/show-hn-sample-incident-response-agent-open-source-ai-agent-from-aws-cirt.md", "text": "https://wpnews.pro/news/show-hn-sample-incident-response-agent-open-source-ai-agent-from-aws-cirt.txt", "jsonld": "https://wpnews.pro/news/show-hn-sample-incident-response-agent-open-source-ai-agent-from-aws-cirt.jsonld"}}