scanning-with-aws-security-agent
An agent skill by aws, from aws/agent-toolkit-for-aws. Tags: cloud, code-review, scanning, security, validation.
What it does
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.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add aws/agent-toolkit-for-aws --skill scanning-with-aws-security-agent
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/aws/agent-toolkit-for-aws
cp -r agent-toolkit-for-aws/plugins/aws-agents-for-devsecops/skills/scanning-with-aws-security-agent ~/.claude/skills/scanning-with-aws-security-agent
Safety box score
Grade C, moderate risk: 32 of 100 risk points, rated 2026-10-21. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill runs shell commands to zip the current workspace, upload it to AWS, start and poll Security Agent code-review jobs, and write local scan state under `.security-agent/`. The main risk is that the entire workspace is shipped off-machine for scanning, which can expose embedded secrets or sensitive source; everything else is mostly bounded to the repo and AWS account.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | It explicitly shells out to `zip`, `stat`, `md5sum`, and multiple `aws ...` CLI commands to perform the scan workflow; there is no arbitrary code evaluation, but real command execution is required. |
| Network access | 2 (moderate) | The workflow uploads `/tmp/source.zip` to S3 (`aws s3 cp ... s3://<bucket>/...`) and calls AWS Security Agent APIs, so repository contents and metadata leave the machine. |
| Filesystem reach | 1 (low) | It reads `.security-agent/config.json` and `.security-agent/scans.json`, and writes `.security-agent/findings-{scan_id}.md`; the changes are confined to the workspace. |
| Secrets & credentials | 2 (moderate) | The full-workspace archive can include source files, `.env` files, keys, or tokens, and the skill uploads that archive to AWS for scanning. |
| Privilege & persistence | 0 (none) | No sudo, global installs, service registration, shell startup edits, or OS-level configuration changes are requested. |
| Instruction hijack surface | 0 (none) | There is no hidden or external prompt injection; the file even says, `Always ask before running — never auto-trigger scans.` |
| Irreversible actions | 1 (low) | It can auto-run setup when config is missing and then start/poll a remote scan on the user's behalf, but only after a scan request and within the user's AWS account. |
| Transparency | 0 (none) | The file is plain Markdown with visible commands; there are no binaries, base64 blobs, or downloaded installers. |
Before installing
- Read `.security-agent/config.json` and confirm the AWS account/region are the ones you expect.
- Check the repo for secrets (`.env`, keys, tokens) before allowing the upload.
- Decide whether you want the entire workspace sent to AWS or a smaller subdirectory.
- Verify the `SecurityAgentScanRole` exists and is meant to be used in your account.
Rated 2026-10-21 by an automated review of 1 file from the skill's repository.
Source
- Repository
- aws/agent-toolkit-for-aws (all skills from this repository)
- Path
- plugins/aws-agents-for-devsecops/skills/scanning-with-aws-security-agent/SKILL.md
- Branch
- main
- Collection
- aws-agents-for-devsecops
- Updated
- 2026-09-19
Related skills
- diff-scanning-with-aws-security-agent — Run a fast AWS Security Agent diff scan on only the changed code since a git ref.
- pentesting-with-aws-security-agent — Run an AWS Security Agent penetration test against a live web application — registers and verifies the target domain.
- agents-harden — Use when preparing your agent for production — IAM scoping, inbound auth (JWT, SigV4), secrets management, cold start optimization, session lifecycle.
- agents-pay — Use when THIS agent needs to pay for x402-protected content at runtime: hitting a paywall mid-task, settling it via AgentCore Payments.
- aws-cloudformation — Authors, validates, and troubleshoots AWS CloudFormation templates.
- aws-iam — Provides verified corrections for IAM behaviors that AI agents frequently get wrong — policy evaluation edge cases, trust policy gotchas, STS session limits.