diff-scanning-with-aws-security-agent

Runs AWS Security Agent diff scans on code changed since a git ref.

1|Updated Aug 1, 2024
One-click install
npx skills add https://github.com/obispobruno/dotfiles --skill diff-scanning-with-aws-security-agent-obispobruno
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diff-scanning-with-aws-security-agent
Source: https://github.com/obispobruno/dotfiles/tree/main/dot_agents/skills/diff-scanning-with-aws-security-agent
Command: npx skills add https://github.com/obispobruno/dotfiles --skill diff-scanning-with-aws-security-agent-obispobruno

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Full security scans of an entire codebase are slow and noisy when you only changed a few files. This Skill scans only the code changed since a chosen git ref, so you get focused security findings before committing, pushing, or opening a pull request. ## Core Features & Use Cases - Diff-based scanning: Generates a git diff against HEAD, main, or a custom ref and submits only those changes to the AWS Security Agent. - Automated workflow: Zips the workspace, uploads source and diff to S3, creates or reuses a CodeReview resource, starts the scan job, and polls for completion. - Structured findings: Groups results by severity and writes a report to .security-agent/findings-{scan_id}.md. - Use Case: Before pushing a feature branch, ask for a diff scan against main to catch security issues in your changes without waiting for a full repository scan. ## Quick Start Run a diff security scan on my uncommitted changes using the AWS Security Agent.

Frequently Asked Questions about diff-scanning-with-aws-security-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a security scan on only my changed code?▼

Use a diff scan that generates a git diff against a base ref and submits only those changes to the AWS Security Agent. By default it scans uncommitted changes against HEAD, or you can compare a branch against main.

How do I scan my branch for security issues before a pull request?▼

Set the base ref to main so the scan compares your branch against it using git diff main..HEAD. The resulting patch is uploaded to S3 and scanned, with findings grouped by severity in a markdown report.

Does a diff scan require a prior full scan?▼

No, diff scans are standalone and do not require a prior full scan. The workflow creates or reuses a CodeReview resource per workspace and starts the diff job directly.

What happens if there are no changes to scan?▼

The workflow checks whether the generated diff file is empty and stops with a message if it is. No scan job is started when there are no changes against the chosen base ref.

Why did my diff scan fail with ResourceNotFoundException?▼

This error means the referenced CodeReview resource no longer exists in the agent space. The workflow handles it by recreating the CodeReview and retrying the start-code-review-job call.