Skip to content

[request]: Skill for investigating AWS security findings (GuardDuty, Security Hub, CloudTrail, Config) #214

Open

Description

@szl0144

Select the type of tool this is related to

  • Skill
  • Custom agent
  • MCP server
  • IaC (Infrastructure as Code) template
  • Other

Tell us about your request

A read-only skill that helps DevOps Agent investigate an AWS security finding. It works out who did what, what changed, what got exposed, and whether any bad actor exploited it. Then it says whether the activity looks benign, looks like a compromise, or unknown because logs are missing. It also writes the security containment and eradication recommendation with commands for a person to run. The agent doesn't run them.

Which AWS service(s) is this for?

GuardDuty, Security Hub, CloudTrail, AWS Config, IAM, IAM Identity Center, S3, EC2, VPC, CloudWatch Logs

What problem are you trying to solve?

When a GuardDuty finding or a CloudTrail alarm comes in, people ask the agent questions like "Is this an attack or an approved change?", "Can we close this finding?", or "Who accessed this S3 bucket?" Without proper guidance, the agent can reach wrong root cause and give incorrect remediation advice. These are the gaps I saw in testing:

  • When an access key is misused, it advises deactivating the key but not revoking the temporary credentials and role sessions already issued with it, so the attacker may keep access (15 of 15 runs).
  • When asked whether a finding can be closed as benign, it does not check whether the audit trail was complete for the whole time window (3 of 3 runs).
  • It gives the containment recommendation without preserving evidence first, and provides no clear priority or incident status (benign, compromised, or unknown), failing to follow security incident response best practices. (9 of 9 runs)
  • When asked about root sign-ins, it did not say which Regions it checked, or checked only one. Root 'ConsoleLogin' events can be logged in us-east-1, us-east-2 or us-west-2, so a single-Region search can miss a sign-in. This happened in 4 of 6 runs.

These mistakes can lead to real incidents being closed too early, attacker activity going undetected, or attackers keeping access through valid credentials.

How should it behave?

Trigger: a chat question or an investigation that starts by a webhook from GuardDuty or Security Hub findings, a security alarm built on CloudTrail events (a CloudWatch alarm or an EventBridge rule), or a security-related Config rule.

It doesn't trigger for WAF logs, code vulnerabilities, IAM policy design, key age reviews, EKS runtime findings, flow log connectivity, or GuardDuty and CloudTrail cost. Negative evals cover these.

Steps it walk through:

  1. Triage the finding and match security scenarios: credential compromise, root account activity, privilege escalation and persistence, defense evasion (logging disabled), exposure changes, data access and exfiltration, compromised instance.
  2. Collect evidence with scoped read-only queries against CloudTrail, S3 data events, Config history, flow logs. If the log source did not record the events during that time window, the agent reports the activity as Unknown.
  3. Decide the incident state: Benign (only with a named approval source, like a change ticket), At risk or compromised, or Unmonitored (logs missing). Suggest a P1 to P4 priority and explains why.
  4. Write the response plan in order: preserve evidence, contain, eradicate, recover. Each command comes with its impact, how to undo it, and who should approve it. Each action in the plan contains an AWS CLI command, the agent does not run these commands. A human runs them.

Which DevOps Agent functionalities is this relevant to?

Chat and Incident RCA (CHAT, INCIDENT_RCA)

Does this need extra permissions?

No write permissions. AIDevOpsAgentAccessPolicy covers most of the reads.

I added an optional parameter, EnableAwsSecurityFindingInvestigation, to the skill policies template. It adds 13 read-only actions that the managed policy (v15) doesn't include, for example iam:ListAccessKeys, iam:GetAccessKeyLastUsed, config:GetResourceConfigHistory and s3:GetBucketPolicyStatus. I tested them with the IAM policy simulator (the iam:SimulatePrincipalPolicy API) on a test role. Without the extra actions, the skill falls back to CloudTrail events and marks what it can't read as Unknown.

Are you currently working around this?

Yes. I upload the skill to my own Agent Space as a custom skill and use it there. Without it, the agent can still answer security questions in chat, but the answers miss some steps, such as revoking temporary credentials after a key is deactivated and giving a priority for the incident (see the gaps above). For those steps, I have to check the answer by hand against my own runbook.

Have you checked for existing tools?

  • I've searched existing issues, skills, custom agents, and MCP servers, and this isn't already covered or extendable.
  • I've confirmed DevOps Agent can't already do this natively (I tested it).

Would you like to build it?

  • I'm willing to contribute this myself (see CONTRIBUTING.md).
  • I'm suggesting it for someone else to build.

Additional context

The skill is on my fork: https://github.com/szl0144/tools-for-devops-agent/tree/feature/aws-security-finding-investigation. I opened a draft PR from it: #236

I am an external contributor and CONTRIBUTING.md says the skill evaluation tool is not published in this repo and asks external contributors to tag @aws/tools-for-devops-agent-admins. Could you help run the tool on this skill? If that can't happen soon, would you accept an evals/exemptions.json together with my own with/without-skill test results?
SME: Yang Li, an AWS Security Solutions Architect (handle: liyangln-AWS) has agreed to review the response commands and the IAM actions. They will leave a sign-off comment on the PR.

FYI: I plan to show this skill in my re:Invent 2026 sessions (COM316-R and COM316-R1) to help developers use DevOps Agent for security incident investigations.

Activity

  1. added
    requestCommunity request for a new tool (roadmap intake)
    needs-triageNew issue awaiting maintainer triage
    on Nov 9, 2026
  2. added
    iacRelates to an IaC template
    skillRelates to a DevOps Agent skill
    on Nov 9, 2026
  3. szl0144 commented on Nov 11, 2026

    @szl0144
    Author

    I opened a draft PR for this skill: #236. The SME, Yang Li (@liyangln-AWS), is reviewing the response commands and the IAM actions, and will leave a comment on the PR. I will mark the PR ready for review after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    iacRelates to an IaC templateneeds-triageNew issue awaiting maintainer triagerequestCommunity request for a new tool (roadmap intake)skillRelates to a DevOps Agent skill

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions