Official agent skill

Scanning With AWS Security Agent

by aws in aws/agent-toolkit-for-aws

Run an AWS Security Agent scan on the workspace — uploads the source to AWS, scans it with the managed Security Agent service, and returns ranked, verified findings with code locations and…

OfficialApache-2.0Auto-check passedSecurity

Install Scanning With AWS Security Agent

skills CLI
$ npx skills add aws/agent-toolkit-for-aws --skill scanning-with-aws-security-agent -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aws/agent-toolkit-for-aws scanning-with-aws-security-agent --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aws/agent-toolkit-for-aws.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/aws-agents-for-devsecops/skills/scanning-with-aws-security-agent .claude/skills/scanning-with-aws-security-agent && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
scanning-with-aws-security-agent
GitHub stars
2.8k
Token cost
~2.8k tokens
SKILL.md length
998 words
Files
1
Skills in repo
138
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run an AWS Security Agent scan on the workspace — uploads the source to AWS, scans it with the managed Security Agent service, and returns ranked, verified findings with code locations and…

  • Works in 6 steps: Fetch findings (paginate) → Enrich with full details → Filter (optional) → …
  • The user asks to scan code
  • SKILL.md covers Action mapping, Local state, Pre-scan checks and Workflow: Full Scan (~45 min), plus 7 more sections
  • Calls aws and git

What it does

Scanning With AWS Security Agent is an agent skill from aws/agent-toolkit-for-aws, published by the product's own GitHub organization. Run an AWS Security Agent scan on the workspace — uploads the source to AWS, scans it with the managed Security Agent service, and returns ranked, verified findings with code locations and remediations. Use when the user asks to scan code, find vulnerabilities, run a security scan or review, check security issues, check scan status, show findings, list recent scans, or stop a scan.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security, covering Cloud security and Security review. It works with Amazon Web Services. The repository describes itself as: Official, AWS-supported MCP servers, skills, and plugins to help AI agents build on AWS. The licence is Apache-2.0.

When your agent uses it

  • The user asks to scan code
  • Find vulnerabilities
  • Run a security scan
  • Check security issues

Example prompts

  • “/scanning-with-aws-security-agent”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Fetch findings (paginate)
  2. Enrich with full details
  3. Filter (optional)
  4. Concise summary in chat
  5. Detailed report file
  6. Follow-ups

What it can do on your machine

Read from SKILL.md and the folder at commit df2ab44. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • aws
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use aws and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Scanning With AWS Security Agent loads about 2.8k tokens when it runs. Until then it costs about 104 tokens; SKILL.md has 998 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aws/agent-toolkit-for-aws at commit df2ab44, republished under its Apache-2.0 licence (© aws). 998 words, ~2,775 tokens.

Download SKILL.mdSave it as .claude/skills/scanning-with-aws-security-agent/SKILL.md (or your agent's skills folder).
name
scanning-with-aws-security-agent
description
Run an AWS Security Agent scan on the workspace — uploads the source to AWS, scans it with the managed Security Agent service, and returns ranked, verified findings with code locations and remediations. Use when the user asks to scan code, find vulnerabilities, run a security scan or review, check security issues, check scan status, show findings, list recent scans, or stop a scan.

AWS Security Agent — Code Scans

This skill handles full repository scans. Setup (agent space, role, bucket) is handled by the setup-security-agent skill — if .security-agent/config.json is missing, the scan workflow auto-runs setup inline first.


Action mapping

User intentWorkflow
Direct scan request ("scan my code", "find vulnerabilities")Full Scan
Scan status check ("how's the scan", "progress")Status workflow
View findings ("what did it find", "show results")Findings workflow
List scans ("recent scans", "show my scans")Read .security-agent/scans.json
Stop a scanaws securityagent stop-code-review-job
Rules for proactive suggestions
  • Always ask before running — never auto-trigger scans
  • Single-line suggestions, not multi-paragraph pitches
  • If the user declines, do not bring it up again in the same session

Local state

Read .security-agent/config.json for agent_space_id and region. If config.json is missing, tell the user one line — "First scan in this workspace — running setup first." — and run the setup-security-agent workflow inline (steps from that skill's SKILL.md) before continuing. First-time scans should "just work."

Track scans in .security-agent/scans.json (keep last 50 entries). The per-workspace CodeReview ID is stored in config.json → code_reviews[<abs_path>] so subsequent scans reuse the same CodeReview.

Resolving the values you need

The CLI examples below use placeholders. Resolve them at the start of every scan:

PlaceholderHow to resolve
<id> (agent space)config.agent_space_id
<region>config.region (default us-east-1)
<account>aws sts get-caller-identity --query Account --output text (cache for the rest of the turn)
<role-arn>arn:aws:iam::<account>:role/SecurityAgentScanRole
<bucket>security-agent-scans-<account>-<region>
<cr-id>code_review_id from config.json → code_reviews[<abs_path>]
<job_id>codeReviewJobId returned by start-code-review-job
<WORKSPACE_ID>printf '%s' "$(pwd)" | md5sum | cut -c1-12

These are derived rather than stored in config so they can never drift out of sync with reality.


Pre-scan checks

  1. Read config.json. If missing → run the setup-security-agent workflow inline first, then continue.

  2. Verify agent space still exists:

    bash
    aws securityagent batch-get-agent-spaces --agent-space-ids <id>

    If response shows it doesn't exist, clear agent_space_id from config.json and run setup-security-agent again.

  3. Resolve account, role ARN, and bucket name from the table above.

  4. Generate workspace ID:

    bash
    WORKSPACE_ID=$(printf '%s' "$(pwd)" | md5sum | cut -c1-12)

Workflow: Full Scan (~45 min)

For scanning only changed code, use the diff-scanning-with-aws-security-agent skill instead. For threat modeling specs, use threat-modeling-with-aws-security-agent.

  1. Run pre-scan checks above.

  2. Zip the workspace. Exclude common build/cache directories. Honor .gitignore. Bail if zip > 2 GB.

    bash
    cd <absolute-workspace-path>
    zip -r /tmp/source.zip . \
      -x ".git/*" \
      -x ".security-agent/*" \
      -x "node_modules/*" \
      -x "__pycache__/*" \
      -x ".venv/*" -x "venv/*" \
      -x "dist/*" -x "build/*" -x "target/*" \
      -x ".mypy_cache/*" -x ".pytest_cache/*" -x ".tox/*" \
      -x ".next/*" -x "cdk.out/*" \
      -x ".DS_Store" -x "Thumbs.db" \
      -x "*.pyc" -x "*.pyo"
    ZIP_BYTES=$(stat -f%z /tmp/source.zip 2>/dev/null || stat -c%s /tmp/source.zip)
    if [ "$ZIP_BYTES" -gt 2147483648 ]; then echo "Zip too large (>2GB)"; exit 1; fi
  3. Upload to the per-workspace stable key (overwrites any prior upload):

    bash
    aws s3 cp /tmp/source.zip s3://<bucket>/security-scans/source/<WORKSPACE_ID>/source.zip --expected-bucket-owner <account>
  4. Get or create the per-workspace CodeReview. Look up config.json → code_reviews[<abs_path>].

    • If present, use that code_review_id.

    • If absent, create:

      bash
      aws securityagent create-code-review --agent-space-id <id> --title <title> \
        --service-role <role-arn> \
        --assets sourceCode=[{s3Location=s3://<bucket>/security-scans/source/<WORKSPACE_ID>/source.zip}]

      Capture codeReviewId and persist to config.json → code_reviews[<abs_path>].

    • Title default: pre-cr-<git-branch> (use git rev-parse --abbrev-ref HEAD). Replace any spaces with hyphens.

  5. Start the job:

    bash
    aws securityagent start-code-review-job --agent-space-id <id> --code-review-id <cr-id>
    • If the response is ResourceNotFoundException: the CodeReview was deleted externally. Recreate it (step 4) and retry.
  6. Capture codeReviewJobId. Generate a local scan_id like scan-<8-hex>. Append to scans.json:

    json
    {
      "scan_id": "scan-...",
      "code_review_id": "cr-...",
      "job_id": "cj-...",
      "agent_space_id": "as-...",
      "scan_type": "FULL",
      "title": "pre-cr-main",
      "path": "/abs/path",
      "started_at": "2026-06-01T20:00:00Z",
      "status": "IN_PROGRESS"
    }
  7. Tell user: "Full scan started (scan_id: {id}). Takes ~45 minutes. I'll check every 5 minutes — say 'stop polling' to opt out."

  8. Run the Polling Loop below with sleep 300 between checks.


Polling Loop

After starting a scan:

  1. sleep 300 (5 minutes). Do not poll faster than this.

  2. Call status:

    bash
    aws securityagent batch-get-code-review-jobs --agent-space-id <id> --code-review-job-ids <job_id>
  3. Compare status to last seen status. Only respond to the user when status CHANGES (e.g., IN_PROGRESS → COMPLETED) or on terminal state (COMPLETED, FAILED, STOPPED).

  4. Do not report "still in progress" multiple times — that's noise.

  5. If user says "stop polling" or "check later" → stop the loop and tell them: "Say 'scan status' or 'show findings' anytime."

  6. On COMPLETED → run the Findings workflow.

  7. On FAILED → fetch the job's error info (statusReason if present), tell the user, write a brief failure note to .security-agent/findings-{scan_id}.md.


Show full SKILL.md (409 more words)Show less

Workflow: Status check (ad-hoc)

User says "scan status" / "how's the scan":

  1. If user names a scan_id, use it. Otherwise use the most recent entry in scans.json.
  2. Call batch-get-code-review-jobs once.
  3. Update scans.json status field.
  4. Report: status + elapsed time + current step (if any).

Workflow: Findings

After a scan completes (or on user request):

1. Fetch findings (paginate)
bash
aws securityagent list-findings --agent-space-id <id> --code-review-job-id <job-id>

If nextToken is returned, call again with --next-token <token> until exhausted.

2. Enrich with full details
bash
aws securityagent batch-get-findings --agent-space-id <id> --finding-ids <id1> <id2> ...
3. Filter (optional)

If the user asked for a minimum severity (e.g., "high and above"), filter to that level:

  • Severity order: CRITICAL > HIGH > MEDIUM > LOW > INFORMATIONAL.
4. Concise summary in chat

Group by severity. File path + line for each:

🟣 CRITICAL: {name}
   File: {filePath}:{lineStart}
   {description}

🔴 HIGH: {name}
   File: {filePath}:{lineStart}
   {description}

🟡 MEDIUM: {name}
   File: {filePath}:{lineStart}
   {description}

🟢 LOW: {name}
   File: {filePath}:{lineStart}
   {description}
5. Detailed report file

Write to .security-agent/findings-{scan_id}.md. Include EVERY field returned (findingId, name, description, riskLevel, riskType, confidence, status, codeLocations with filePath/lineStart/lineEnd, and remediationCode if present).

markdown
# Security Scan Report — {scan_id}

**Scan type**: FULL
**Title**: {title}
**Started**: {started_at}
**Total findings**: {count}

## Summary
| Severity | Count |
|----------|-------|
| CRITICAL | N |
| HIGH | N |
| MEDIUM | N |
| LOW | N |

## Findings

### 🟣 CRITICAL: {name}
- **ID**: {findingId}
- **Risk type**: {riskType}
- **Confidence**: {confidence}
- **Status**: {status}
- **Location**: `{filePath}:{lineStart}-{lineEnd}`

**Description**: {description}

**Remediation**:
{remediationCode or remediation guidance from description}

(repeat for every finding)

Tell user: "Full details written to .security-agent/findings-{scan_id}.md"

6. Follow-ups

Ask:

  • "Would you like to focus on the critical/high findings first?"
  • "Should I explain any of these in more detail?"
  • "Want me to fix these issues?"

For fixes: read the finding's description and code location, then synthesize and apply the fix via the Edit tool.


Workflow: Stop a scan

User says "stop the scan":

bash
aws securityagent stop-code-review-job --agent-space-id <id> --code-review-job-id <job_id>

Update scans.json status to STOPPED.


Workflow: List recent scans

User asks "show my recent scans" / "list scans":

Read .security-agent/scans.json. Show in a compact table:

scan_idtypetitlestatusstarted
scan-abcFULLpre-cr-mainCOMPLETED2h ago
scan-defFULLpre-cr-feature-xFAILED1d ago

Rules

  • Always run pre-scan checks (config exists + agent space verified) before any scan
  • Scan APIs return immediately — poll status every 5 minutes
  • Use the most recent scan in scans.json if the user doesn't name one
  • Title must not contain spaces — use hyphens. Default to git branch name.
  • Don't dump raw JSON — format with severity icons + file locations
  • On ResourceNotFoundException from start-code-review-job, recreate the CodeReview and retry once

Troubleshooting

  • "Not configured" / config.json missing → run setup-security-agent skill first
  • AccessDenied on s3 cp → bucket not registered on agent space, or trust policy wrong. Re-run setup.
  • 403 / ExpectedBucketOwner mismatch on s3 cp → the derived bucket is owned by a different account (bucket-squatting). The upload is rejected by design — do not retry without the guard. Re-run setup-security-agent, which aborts on foreign-owned buckets.
  • ResourceNotFoundException on agent space → it was deleted. Re-run setup.
  • Scan stuck in PREFLIGHT for >10 min → backend issue, not client. Show batch-get-code-review-jobs output and tell user to escalate.
  • Code too large (zip > 2 GB) → run on a subdirectory instead.

© aws, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/aws-agents-for-devsecops/skills/scanning-with-aws-security-agent of aws/agent-toolkit-for-aws.

Open the folder on GitHubat commit df2ab44

Compare with similar skills

Scanning With AWS Security Agent next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Scanning With AWS Security Agent compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Scanning With AWS Security Agent this skillaws/agent-toolkit-for-aws2.8k—~2.8kAutomated safety check: PassApache-2.0
AWS Security Auditaiskillstore/marketplace4304 repos~2.6kAutomated safety check: PassNone
Azure API Management Security Reviewthomast1906/github-copilot-agent-skills202—~3.1kAutomated safety check: PassMIT
Cloud Auditbriiirussell/cybersecurity-skills413—~1.3kAutomated safety check: NotesMIT
Ecs Operation Reviewaws/tools-for-devops-agent102—~4.8kAutomated safety check: PassApache-2.0
Security Setupluongnv89/skills131—~4.5kAutomated safety check: PassMIT

Similar skills

  • AWS Security Audit

    aiskillstore/marketplace

    Comprehensive AWS security posture assessment using AWS CLI and security best practices

    430 GitHub starsUsed in 4 repos~2.6k tokens
    SecurityAuto-check passed
  • Azure API Management Security Review

    thomast1906/github-copilot-agent-skills

    Audits an Azure API Management setup against the OWASP API Security Top 10 and Azure Security Benchmark, covering policies, network layout and identity.

    202 GitHub stars~3.1k tokensUpdated yesterday
    SecurityAuto-check passed
  • Cloud Audit

    briiirussell/cybersecurity-skills

    Audit cloud infrastructure (AWS, GCP, Azure) for misconfigurations, excessive permissions, and security gaps.

    413 GitHub stars~1.3k tokensUpdated 4 mo ago
    SecurityAuto-check: notes
  • Ecs Operation Review

    aws/tools-for-devops-agent

    Official

    Performs a comprehensive Amazon ECS operations review across the 6 review pillars (Resiliency & HA, Observability, Security, Operations, Performance, Additional Analysis) using read-only AWS APIs…

    102 GitHub stars~4.8k tokensUpdated yesterday
    SecurityAuto-check passed
  • Security Setup

    luongnv89/skills

    Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI.

    131 GitHub stars~4.5k tokensUpdated today
    SecurityAuto-check passed
  • Iam

    itsmostafa/aws-agent-skills

    AWS Identity and Access Management for users, roles, policies, and permissions.

    1.2k GitHub stars~1.8k tokensUpdated 3 days ago
    SecurityAuto-check passed

More from aws/agent-toolkit-for-aws

All 138 skills in this repo
  • Agent Advisor

    aws/agent-toolkit-for-aws

    Official

    Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one phased flow.

    2.8k GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Agents Build

    aws/agent-toolkit-for-aws

    Official

    A skill your agent uses to extend an existing agent project with memory, app integration, VPC, multi-agent, migration, model, browser, code interpreter, payments, or resource removal.

    2.8k GitHub stars~2.3k tokensUpdated today
    Auto-check: notes
  • Launch With AWS

    aws/agent-toolkit-for-aws

    Official

    Migrates vibe-coded web applications to AWS. An agent skill from aws/agent-toolkit-for-aws.

    2.8k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploy an event-driven workflow that routes S3 uploads to either Lambda or Fargate via Step Functions based on file size.

    2.8k GitHub stars~4k tokensUpdated today
    Auto-check passed
  • AWS Marketplace Metering

    aws/agent-toolkit-for-aws

    Official

    Deploys, queries, and debugs AWS Marketplace usage-based (PAYG) metering — the pipeline (ResolveCustomer, BatchMeterUsage, EventBridge via SAM) and querying/debugging metering records, statuses…

    2.8k GitHub stars~18k tokensUpdated today
    Auto-check passed
  • Agents Pay

    aws/agent-toolkit-for-aws

    Official

    A skill your agent uses when THIS agent needs to pay for x402-protected content at runtime: hitting a paywall mid-task, settling it via AgentCore Payments, and applying operator-defined spend limits.

    2.8k GitHub stars~6.5k tokensUpdated today
    Auto-check: notes

Categories

Questions about Scanning With AWS Security Agent

What does Scanning With AWS Security Agent do?

Run an AWS Security Agent scan on the workspace — uploads the source to AWS, scans it with the managed Security Agent service, and returns ranked, verified findings with code locations and…. Scanning With AWS Security Agent is an agent skill from aws/agent-toolkit-for-aws, published by the product's own GitHub organization. Run an AWS Security Agent scan on the workspace — uploads the source to AWS, scans it with the managed Security Agent service, and returns ranked, verified findings with code locations and remediations.

When should I use Scanning With AWS Security Agent?

Scanning With AWS Security Agent fits situations like: the user asks to scan code; find vulnerabilities; run a security scan; check security issues.

How do I install Scanning With AWS Security Agent in Claude Code?

Run `npx skills add aws/agent-toolkit-for-aws --skill scanning-with-aws-security-agent -a claude-code`. Or copy the skill folder (plugins/aws-agents-for-devsecops/skills/scanning-with-aws-security-agent in aws/agent-toolkit-for-aws) into .claude/skills/scanning-with-aws-security-agent in your project. Claude Code loads it when a task matches its description.

How do I install Scanning With AWS Security Agent in Codex?

Run `npx skills add aws/agent-toolkit-for-aws --skill scanning-with-aws-security-agent -a codex`. Or copy the skill folder (plugins/aws-agents-for-devsecops/skills/scanning-with-aws-security-agent in aws/agent-toolkit-for-aws) into .agents/skills/scanning-with-aws-security-agent in your project. Codex loads it when a task matches its description.

Can I use Scanning With AWS Security Agent in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aws/agent-toolkit-for-aws --skill scanning-with-aws-security-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/scanning-with-aws-security-agent, .gemini/skills/scanning-with-aws-security-agent, .github/skills/scanning-with-aws-security-agent and .opencode/skills/scanning-with-aws-security-agent in your project.

What does Scanning With AWS Security Agent need to run?

Going by SKILL.md and its folder, Scanning With AWS Security Agent needs the command-line tools its instructions call (aws and git).

Does Scanning With AWS Security Agent access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Scanning With AWS Security Agent safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Scanning With AWS Security Agent use?

Scanning With AWS Security Agent is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Scanning With AWS Security Agent use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Scanning With AWS Security Agent?

Skills that share tags, products or a category with Scanning With AWS Security Agent: AWS Security Audit (aiskillstore/marketplace, 430 stars), Azure API Management Security Review (thomast1906/github-copilot-agent-skills, 202 stars), Cloud Audit (briiirussell/cybersecurity-skills, 413 stars) and Ecs Operation Review (aws/tools-for-devops-agent, 102 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Scanning With AWS Security Agent?

aws (a GitHub organization, an official publisher) maintains it in aws/agent-toolkit-for-aws, which has 2,830 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on October 9, 2026.

Source: aws/agent-toolkit-for-aws on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.