Claude Skill

enrich-with-aws-security-agent

Automatically load this skill when investigating application outages, service degradation, or errors that could have security-related root causes — including unexplained downtime, authentication or authorization failures, injection attacks, data exposure, or suspicious applicatio

LLM Mart · 0 points · 1 views 0 listing impressions 0 install-command copies
Download aws-tools-for-devops-agent-skills_enrich-with-aws-security-agent-d8f96e1.zip · 13 KB

Install

skills CLI npx skills add https://github.com/aws/tools-for-devops-agent/tree/main/skills/enrich-with-aws-security-agent
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install aws-tools-for-devops-agent@llmmart
Git git clone https://github.com/aws/tools-for-devops-agent.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole aws/tools-for-devops-agent collection as a plugin from our marketplace. Git is the plain clone.

README

Enrich with AWS Security Agent

This skill enables the AWS DevOps Agent to query AWS Security Agent CloudWatch logs during incident investigations, surfacing code-level security findings that may be the root cause of application outages.

⚠️ Important Notice

This skill is provided as sample code. If you intend to deploy it in production, start with a non-production environment first. Review IAM permissions and security configurations against your organization's policies, and validate that skill behavior meets your operational requirements before production use.

Purpose

When an application outage or degradation occurs without a clear infrastructure cause, the root cause may be a security vulnerability — such as SSRF, injection attacks, or compromised dependencies. This skill queries AWS Security Agent findings stored in CloudWatch Logs to retrieve actionable details (file path, line number, vulnerability type, severity) that customers can directly fix.

Key Capabilities

  • Query AWS Security Agent CloudWatch log groups for security findings
  • Extract actionable vulnerability details: file path, line number, vulnerability type, severity
  • Correlate security findings with current incident symptoms and timeframes
  • Present remediation guidance with exact code locations
  • Automatically activate when application errors have no obvious infrastructure cause

Prerequisites

  • AWS Security Agent configured and writing findings to CloudWatch Logs
  • Agent permissions for logs:DescribeLogGroups, logs:StartQuery, logs:GetQueryResults on Security Agent log groups (e.g., /aws/securityagent/*)

Limitations

  • Requires AWS Security Agent to be configured and actively scanning — no findings will exist if the service is not enabled
  • Log retention depends on CloudWatch Logs retention settings for the Security Agent log groups
  • Findings are only as current as the last Security Agent scan

Agent Types

This skill is used by the following agent types:

  • Chat tasks — conversational security finding lookup and analysis
  • Incident RCA — automated root cause analysis when security issues may cause outages

Uploading to AWS DevOps Agent

To deploy this skill to your Agent Space:

  1. Zip the enrich-with-aws-security-agent/ directory (only including allowed extensions):

    cd skills
    zip -r enrich-with-aws-security-agent.zip enrich-with-aws-security-agent/ -i '*.md' '*.txt' '*.json' '*.yaml' '*.yml' '*.xml' '*.csv' '*.tsv' '*.html' '*.htm' '*.png' '*.jpg' '*.jpeg' '*.gif' '*.svg' '*.webp' '*.pdf' -x '*/.claude/*' '*/scripts/*' '*/README.md' '*/.skilleval.yaml' '*/.skilleval.yml' '*/CHANGELOG.md' '*/evals/*'
    
  2. In the AWS DevOps Agent Operator Web App, navigate to the Skills page.

  3. Click Add skill → Upload skill.

  4. Drag and drop the enrich-with-aws-security-agent.zip file (max 6 MB).

  5. Select the agent types: Chat tasks and Incident RCA.

  6. Click Upload.

For more details, see Uploading a skill in the AWS DevOps Agent User Guide.

How to Use This Skill

Chat

  • "Check AWS Security Agent findings for my application — are there any critical vulnerabilities?"
  • "Show me security findings related to SSRF or injection attacks in the last 7 days."
  • "What security vulnerabilities has AWS Security Agent found in the orders service?"
  • "Are there any hardcoded secrets or credential exposure findings?"

Investigation

  • "My application is returning 500 errors but there were no recent deployments. Investigate."
  • "We're seeing unexplained outages on the checkout service — could it be a security issue?"
  • "The API started failing with authentication errors. Check if there are security findings related to this."
  • "Our web application is behaving unexpectedly and we suspect injection attacks. Investigate."

Skill manifest

Enriching Investigations with AWS Security Agent Findings

When to Use — AUTOMATIC ACTIVATION

Load this skill automatically when ANY of these conditions apply:

Application-Level Symptoms (even without explicit security context)

  • Application pages or endpoints are not loading or returning errors
  • Unexplained service outages with no recent deployments
  • Application behaving unexpectedly without clear infrastructure cause
  • Services returning 4xx/5xx errors without obvious resource exhaustion

Explicit Security Signals

  • Security vulnerabilities or misconfigurations mentioned
  • Suspicious code patterns or behaviors observed
  • Authentication or authorization failures
  • Injection vulnerabilities suspected (SQL, command, SSRF, etc.)
  • Sensitive data exposure concerns
  • Security-related errors in application logs
  • Findings that suggest code-level security issues

Key Insight

Many security issues (like SSRF, injection attacks, or compromised dependencies) manifest as application outages or errors rather than obvious security alerts. When an app stops working and there's no clear infrastructure cause (no deployments, no resource exhaustion, no config changes), always check for security issues.

Overview

AWS Security Agent is an AI-powered security service that performs automated code security reviews and penetration testing. Its findings are stored in CloudWatch Logs and provide detailed, actionable information about vulnerabilities including exact file locations, line numbers, and remediation guidance.

Steps

  1. Identify the relevant CloudWatch log group for AWS Security Agent findings. Look for log groups with patterns like:

    • /aws/securityagent/*
    • Log groups containing "security-agent" or "securityagent" in the name
  2. Query the Security Agent logs using CloudWatch Logs Insights:

    fields @timestamp, @message
    | filter @message like /finding|vulnerability|issue|risk/
    | sort @timestamp desc
    | limit 100
    
  3. Extract actionable details from the findings:

    • File path: The exact source file containing the vulnerability
    • Line number: The specific line(s) of code affected
    • Vulnerability type: Classification (e.g., SQL injection, XSS, SSRF, hardcoded secrets)
    • Severity: Critical, High, Medium, Low
    • Description: What the vulnerability is and why it's a risk
    • Remediation: Suggested fix or mitigation
  4. Correlate findings with the incident by matching:

    • Affected services or components
    • Timeframes (when the vulnerability was introduced vs. when the incident occurred)
    • Code paths involved in the failing functionality
  5. Present findings to the customer with:

    • Clear identification of the vulnerable code location
    • Explanation of how this vulnerability may relate to the incident
    • Specific remediation steps they can take to fix the code

Example Log Query for Specific Application

If investigating a specific application (e.g., "ssrf-demo", "orders", "account"):

fields @timestamp, @message
| filter @message like /ssrf|orders|account|vulnerability|finding|issue/
| sort @timestamp desc
| limit 50

Important Notes

  • AWS Security Agent API access may require additional IAM permissions. If API calls fail, fall back to the CloudWatch logs approach.
  • Always provide the exact file and line number when available — this is the key value for customers.
  • Link the security finding to the observed incident behavior when possible.
  • When in doubt, check security logs — it's better to rule out security issues than to miss them.
Files (tools-for-devops-agent)
  • evals
    • benchmark.json 27.6 KB
      Loading…
    • evals.json 3.1 KB
      Loading…
    • eval_queries.json 570 B
      Loading…
    • report.json 1.6 KB
      Loading…
    • trigger_report.json 2.2 KB
      Loading…
  • .skilleval.yaml 77 B
    Loading…
  • CHANGELOG.md 232 B
    Loading…
  • README.md 3.9 KB
    # Enrich with AWS Security Agent
    
    This skill enables the AWS DevOps Agent to query AWS Security Agent CloudWatch logs during incident investigations, surfacing code-level security findings that may be the root cause of application outages.
    
    ## ⚠️ Important Notice
    
    This skill is provided as sample code. If you intend to deploy it in production, start with a non-production environment first. Review IAM permissions and security configurations against your organization's policies, and validate that skill behavior meets your operational requirements before production use.
    
    ## Purpose
    
    When an application outage or degradation occurs without a clear infrastructure cause, the root cause may be a security vulnerability — such as SSRF, injection attacks, or compromised dependencies. This skill queries AWS Security Agent findings stored in CloudWatch Logs to retrieve actionable details (file path, line number, vulnerability type, severity) that customers can directly fix.
    
    ## Key Capabilities
    
    - Query AWS Security Agent CloudWatch log groups for security findings
    - Extract actionable vulnerability details: file path, line number, vulnerability type, severity
    - Correlate security findings with current incident symptoms and timeframes
    - Present remediation guidance with exact code locations
    - Automatically activate when application errors have no obvious infrastructure cause
    
    ## Prerequisites
    
    - AWS Security Agent configured and writing findings to CloudWatch Logs
    - Agent permissions for `logs:DescribeLogGroups`, `logs:StartQuery`, `logs:GetQueryResults` on Security Agent log groups (e.g., `/aws/securityagent/*`)
    
    ## Limitations
    
    - Requires AWS Security Agent to be configured and actively scanning — no findings will exist if the service is not enabled
    - Log retention depends on CloudWatch Logs retention settings for the Security Agent log groups
    - Findings are only as current as the last Security Agent scan
    
    ## Agent Types
    
    This skill is used by the following agent types:
    
    - **Chat tasks** — conversational security finding lookup and analysis
    - **Incident RCA** — automated root cause analysis when security issues may cause outages
    
    ## Uploading to AWS DevOps Agent
    
    To deploy this skill to your Agent Space:
    
    1. Zip the `enrich-with-aws-security-agent/` directory (only including allowed extensions):
    
       ```bash
       cd skills
       zip -r enrich-with-aws-security-agent.zip enrich-with-aws-security-agent/ -i '*.md' '*.txt' '*.json' '*.yaml' '*.yml' '*.xml' '*.csv' '*.tsv' '*.html' '*.htm' '*.png' '*.jpg' '*.jpeg' '*.gif' '*.svg' '*.webp' '*.pdf' -x '*/.claude/*' '*/scripts/*' '*/README.md' '*/.skilleval.yaml' '*/.skilleval.yml' '*/CHANGELOG.md' '*/evals/*'
       ```
    
    2. In the AWS DevOps Agent Operator Web App, navigate to the **Skills** page.
    3. Click **Add skill** → **Upload skill**.
    4. Drag and drop the `enrich-with-aws-security-agent.zip` file (max 6 MB).
    5. Select the agent types: **Chat tasks** and **Incident RCA**.
    6. Click **Upload**.
    
    For more details, see [Uploading a skill](https://docs.aws.amazon.com/devopsagent/latest/userguide/about-aws-devops-agent-devops-agent-skills.html#creating-skills) in the AWS DevOps Agent User Guide.
    
    ## How to Use This Skill
    
    ### Chat
    
    - "Check AWS Security Agent findings for my application — are there any critical vulnerabilities?"
    - "Show me security findings related to SSRF or injection attacks in the last 7 days."
    - "What security vulnerabilities has AWS Security Agent found in the orders service?"
    - "Are there any hardcoded secrets or credential exposure findings?"
    
    ### Investigation
    
    - "My application is returning 500 errors but there were no recent deployments. Investigate."
    - "We're seeing unexplained outages on the checkout service — could it be a security issue?"
    - "The API started failing with authentication errors. Check if there are security findings related to this."
    - "Our web application is behaving unexpectedly and we suspect injection attacks. Investigate."
    
  • SKILL.md 4.3 KB
    ---
    name: enrich-with-aws-security-agent
    description: Automatically load this skill when investigating application outages, service degradation, or errors that could have security-related root causes — including unexplained downtime, authentication or authorization failures, injection attacks, data exposure, or suspicious application behavior. Query AWS Security Agent CloudWatch logs to retrieve detailed code review findings with actionable, low-level details (file, line number, vulnerability type) that customers can directly fix.
    metadata:
      author: yakiratz-aws
      version: "1.0.1"
      aws-devops-agent-skills.agent-types: "CHAT, INCIDENT_RCA"
      aws-devops-agent-skills.aws-services: "Amazon CloudWatch, AWS Security Agent"
      aws-devops-agent-skills.technical-domains: "Security"
    ---
    
    # Enriching Investigations with AWS Security Agent Findings
    
    ## When to Use — AUTOMATIC ACTIVATION
    
    **Load this skill automatically when ANY of these conditions apply:**
    
    ### Application-Level Symptoms (even without explicit security context)
    - Application pages or endpoints are not loading or returning errors
    - Unexplained service outages with no recent deployments
    - Application behaving unexpectedly without clear infrastructure cause
    - Services returning 4xx/5xx errors without obvious resource exhaustion
    
    ### Explicit Security Signals
    - Security vulnerabilities or misconfigurations mentioned
    - Suspicious code patterns or behaviors observed
    - Authentication or authorization failures
    - Injection vulnerabilities suspected (SQL, command, SSRF, etc.)
    - Sensitive data exposure concerns
    - Security-related errors in application logs
    - Findings that suggest code-level security issues
    
    ### Key Insight
    Many security issues (like SSRF, injection attacks, or compromised dependencies) manifest as **application outages or errors** rather than obvious security alerts. When an app stops working and there's no clear infrastructure cause (no deployments, no resource exhaustion, no config changes), **always check for security issues**.
    
    ## Overview
    
    AWS Security Agent is an AI-powered security service that performs automated code security reviews and penetration testing. Its findings are stored in CloudWatch Logs and provide detailed, actionable information about vulnerabilities including exact file locations, line numbers, and remediation guidance.
    
    ## Steps
    
    1. **Identify the relevant CloudWatch log group** for AWS Security Agent findings. Look for log groups with patterns like:
       - `/aws/securityagent/*`
       - Log groups containing "security-agent" or "securityagent" in the name
    
    2. **Query the Security Agent logs** using CloudWatch Logs Insights:
       ```
       fields @timestamp, @message
       | filter @message like /finding|vulnerability|issue|risk/
       | sort @timestamp desc
       | limit 100
       ```
    
    3. **Extract actionable details** from the findings:
       - **File path**: The exact source file containing the vulnerability
       - **Line number**: The specific line(s) of code affected
       - **Vulnerability type**: Classification (e.g., SQL injection, XSS, SSRF, hardcoded secrets)
       - **Severity**: Critical, High, Medium, Low
       - **Description**: What the vulnerability is and why it's a risk
       - **Remediation**: Suggested fix or mitigation
    
    4. **Correlate findings with the incident** by matching:
       - Affected services or components
       - Timeframes (when the vulnerability was introduced vs. when the incident occurred)
       - Code paths involved in the failing functionality
    
    5. **Present findings to the customer** with:
       - Clear identification of the vulnerable code location
       - Explanation of how this vulnerability may relate to the incident
       - Specific remediation steps they can take to fix the code
    
    ## Example Log Query for Specific Application
    
    If investigating a specific application (e.g., "ssrf-demo", "orders", "account"):
    ```
    fields @timestamp, @message
    | filter @message like /ssrf|orders|account|vulnerability|finding|issue/
    | sort @timestamp desc
    | limit 50
    ```
    
    ## Important Notes
    
    - AWS Security Agent API access may require additional IAM permissions. If API calls fail, fall back to the CloudWatch logs approach.
    - Always provide the exact file and line number when available — this is the key value for customers.
    - Link the security finding to the observed incident behavior when possible.
    - **When in doubt, check security logs** — it's better to rule out security issues than to miss them.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.