Scans container images for vulnerabilities and supply-chain risks with Docker Scout, trivy, and grype, then hardens Dockerfiles.
Agentic Workflow: Read -> Reason -> Act (container-security-security)
You are Container Security (security/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — security context for container-security-security
- Domain: Scans container images for vulnerabilities and supply-chain risks with Docker Scout, trivy, and grype, then hardens Dockerfiles.
- docker-scout: Analyze images with Docker Scout for CVEs and remediation guidance. —
docker scout quickview nginx:latest
- image-scanning: Scan images and filesystems with trivy and grype for CVE coverage. —
trivy image nginx:latest
- Check
knowledge and prerequisites: docker, grype, trivy
2. Reason — think for container-security-security
- For
docker-scout: Analyze images with Docker Scout for CVEs and remediation guidance. — decide which checks to run
- For
image-scanning: Scan images and filesystems with trivy and grype for CVE coverage. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with container-security-security tools
- Tools:
Glob, Grep, Read, Bash, Trivy (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
container-security-security:724885cd
Container Security
Scan, triage, and harden container images across the delivery pipeline.
What This Skill Does
- Scans images with Docker Scout, trivy, and grype
- Triages CVEs by severity, fixability, and exploitability
- Produces SARIF/JSON reports for CI and dashboards
- Reviews Dockerfiles for base-image, user, and layer hygiene
- Blocks deploys on critical unfixed CVEs
When to Use
- Before pushing an image to production
- A CVE advisory hits a base image in use
- CI needs a container security gate
Real Commands
# Docker Scout analysis
scout login
docker scout quickview myapp:latest
docker scout cves myapp:latest --only-severity critical --only-fixed
docker scout recommendations myapp:latest
# Trivy
trivy image --severity HIGH,CRITICAL --ignore-unfixed myapp:latest
trivy image -o scan.sarif -f sarif myapp:latest
# Grype
grype myapp:latest --only-fixed
# Filesystem scan including secrets
trivy fs --scanners vuln,secret .
Hardening Checklist
- Pin base image digests, not tags
- Run as a non-root user and drop capabilities
- Copy only build output; multi-stage builds shrink attack surface
- Scan the final image, not the build stage
- Keep a signed SBOM alongside each released image
Best Practices
- Fail CI on CRITICAL unfixed CVEs; use --ignore-unfixed to focus on actionable
- Triage with Docker Scout's policy evaluation for package priorities
- Automate scanning at every image push, not just at release
- Pair scanning with runtime hardening (seccomp, read-only rootfs, non-root UID)
Capabilities
docker-scout
Analyze images with Docker Scout for CVEs and remediation guidance.
Parameters:
image (string): Image reference, e.g. nginx:latest
severity (string): Minimum severity filter: low, medium, high, critical
Commands:
docker scout quickview nginx:latest
docker scout cves nginx:latest
docker scout recommendations nginx:latest
docker scout compare --to registry.local/app:old app:new
docker scout cves nginx:latest --only-severity critical
Examples:
- docker scout quickview myapp:latest
- docker scout cves myapp:latest --only-severity critical --only-fixed
- docker scout recommendations myapp:latest
image-scanning
Scan images and filesystems with trivy and grype for CVE coverage.
Parameters:
image (string): Image to scan
scanners (array): trivy scanner types: vuln, secret, config, license
Commands:
trivy image nginx:latest
trivy image --severity CRITICAL --ignore-unfixed nginx:latest
grype nginx:latest
trivy fs --scanners vuln,secret .
docker scan myapp:latest
Examples:
- trivy image --severity HIGH,CRITICAL --ignore-unfixed myapp:latest
- grype --only-fixed myapp:latest
- docker scout cves myapp:latest --format sarif --output scout.sarif
References
1---2name: "container-security-security"3description: "Scans container images for vulnerabilities and supply-chain risks with Docker Scout, trivy, and grype, then hardens Dockerfiles. Use when working with docker scout, image scanning, security or when the user mentions docker scout, image scanning, security."4license: "MIT"5compatibility: "Requires docker, grype, trivy."6metadata:7 source: https://skillmd.com/skills/opknock/container-security-security8 author: Kdesk9 version: 2.0.010 category: security11allowed-tools: "Glob Grep Read Bash(docker:*) Bash(grype:*) Bash(trivy:*)"12---1314Scans container images for vulnerabilities and supply-chain risks with Docker Scout, trivy, and grype, then hardens Dockerfiles.1516## Agentic Workflow: Read -> Reason -> Act (container-security-security)1718You are **Container Security** (security/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — security context for `container-security-security`21- Domain: Scans container images for vulnerabilities and supply-chain risks with Docker Scout, trivy, and grype, then hardens Dockerfiles.22- **docker-scout**: Analyze images with Docker Scout for CVEs and remediation guidance. — `docker scout quickview nginx:latest`23- **image-scanning**: Scan images and filesystems with trivy and grype for CVE coverage. — `trivy image nginx:latest`24- Check `knowledge` and `prerequisites: docker, grype, trivy`2526### 2. Reason — think for `container-security-security`27- For `docker-scout`: Analyze images with Docker Scout for CVEs and remediation guidance. — decide which checks to run28- For `image-scanning`: Scan images and filesystems with trivy and grype for CVE coverage. — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `container-security-security` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash`, `Trivy` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `container-security-security:724885cd`3536# Container Security3738Scan, triage, and harden container images across the delivery pipeline.3940## What This Skill Does4142- Scans images with Docker Scout, trivy, and grype43- Triages CVEs by severity, fixability, and exploitability44- Produces SARIF/JSON reports for CI and dashboards45- Reviews Dockerfiles for base-image, user, and layer hygiene46- Blocks deploys on critical unfixed CVEs4748## When to Use4950- Before pushing an image to production51- A CVE advisory hits a base image in use52- CI needs a container security gate5354## Real Commands5556```bash57# Docker Scout analysis58scout login59 docker scout quickview myapp:latest60docker scout cves myapp:latest --only-severity critical --only-fixed61docker scout recommendations myapp:latest6263# Trivy64 trivy image --severity HIGH,CRITICAL --ignore-unfixed myapp:latest65trivy image -o scan.sarif -f sarif myapp:latest6667# Grype68 grype myapp:latest --only-fixed6970# Filesystem scan including secrets71trivy fs --scanners vuln,secret .72```7374## Hardening Checklist7576- Pin base image digests, not tags77- Run as a non-root user and drop capabilities78- Copy only build output; multi-stage builds shrink attack surface79- Scan the final image, not the build stage80- Keep a signed SBOM alongside each released image8182## Best Practices8384- Fail CI on CRITICAL unfixed CVEs; use --ignore-unfixed to focus on actionable85- Triage with Docker Scout's policy evaluation for package priorities86- Automate scanning at every image push, not just at release87- Pair scanning with runtime hardening (seccomp, read-only rootfs, non-root UID)8889## Capabilities9091### docker-scout92Analyze images with Docker Scout for CVEs and remediation guidance.9394**Parameters:**95- `image` (string): Image reference, e.g. nginx:latest96- `severity` (string): Minimum severity filter: low, medium, high, critical9798**Commands:**99- `docker scout quickview nginx:latest`100- `docker scout cves nginx:latest`101- `docker scout recommendations nginx:latest`102- `docker scout compare --to registry.local/app:old app:new`103- `docker scout cves nginx:latest --only-severity critical`104105**Examples:**106- docker scout quickview myapp:latest107- docker scout cves myapp:latest --only-severity critical --only-fixed108- docker scout recommendations myapp:latest109110### image-scanning111Scan images and filesystems with trivy and grype for CVE coverage.112113**Parameters:**114- `image` (string): Image to scan115- `scanners` (array): trivy scanner types: vuln, secret, config, license116117**Commands:**118- `trivy image nginx:latest`119- `trivy image --severity CRITICAL --ignore-unfixed nginx:latest`120- `grype nginx:latest`121- `trivy fs --scanners vuln,secret .`122- `docker scan myapp:latest`123124**Examples:**125- trivy image --severity HIGH,CRITICAL --ignore-unfixed myapp:latest126- grype --only-fixed myapp:latest127- docker scout cves myapp:latest --format sarif --output scout.sarif128129## References130- [Docker Scout Documentation](https://docs.docker.com/scout/)131- [Trivy Documentation](https://trivy.dev/)132- [Grype GitHub](https://github.com/anchore/grype)