agent security skill risk: low
Trivy Container Security Scanning Guide
The prompt provides an overview, prerequisites, and step-by-step instructions for using Trivy to scan container images, filesystems, IaC, and Kubernetes manifests for vulnerabiliti…
SKILL 4 files · 2 folders
SKILL.md
--- name: performing-container-security-scanning-with-trivy description: "Scan container images, filesystems, and Kubernetes manifests for vulnerabilities, misconfigurations, exposed" --- # Performing Container Security Scanning with Trivy ## Overview Trivy is an open-source security scanner by Aqua Security that detects vulnerabilities in OS packages and language-specific dependencies, infrastructure-as-code misconfigurations, exposed secrets, and software license issues across container images, filesystems, Git repositories, and Kubernetes clusters. Trivy generates Software Bill of Materials (SBOM) in CycloneDX and SPDX formats for supply chain transparency. This skill covers comprehensive container image scanning, CI/CD pipeline integration, Kubernetes operator deployment, and scan result triage for security operations. ## When to Use - When conducting security assessments that involve performing container security scanning with trivy - When following incident response procedures for related security events - When performing scheduled security testing or auditing activities - When validating security controls through hands-on testing ## Prerequisites - Trivy v0.50+ installed (binary, Docker, or Homebrew) - Docker daemon access for local image scanning - Container registry credentials for remote image scanning - CI/CD platform (GitHub Actions, GitLab CI, Jenkins) for pipeline integration - Kubernetes cluster for Trivy Operator deployment (optional) ## Steps ### Step 1: Scan Container Images Run vulnerability and secret scanning against container images from local builds or remote registries. Configure severity thresholds and ignore unfixed vulnerabilities. ### Step 2: Generate SBOM Produce CycloneDX or SPDX SBOM documents from scanned images for supply chain compliance and vulnerability tracking across the software lifecycle. ### Step 3: Scan IaC and Kubernetes Manifests Detect misconfigurations in Dockerfiles, Kubernetes YAML, Terraform, and Helm charts using built-in policy checks aligned with CIS benchmarks. ### Step 4: Integrate into CI/CD Add Trivy scanning as a pipeline gate that blocks builds with critical/high vulnerabilities, generates SARIF reports for GitHub Advanced Security, and produces JUnit XML for test dashboards. ## Expected Output JSON/table report listing CVEs with severity, CVSS scores, fixed versions, affected packages, misconfiguration findings, and exposed secrets with file locations.
REQUIRED CONTEXT
- Trivy installation
- target container images or manifests
OPTIONAL CONTEXT
- registry credentials
- CI/CD platform
EXPECTED OUTPUT
- Format
- markdown
- Schema
- json_table · CVEs, severity, CVSS scores, fixed versions, affected packages, misconfiguration findings, exposed secrets, file locations
- Constraints
-
- follow provided steps
- produce JSON/table report of findings
SUCCESS CRITERIA
- Produce JSON/table report listing CVEs with severity, CVSS scores, fixed versions, affected packages, misconfiguration findings, and exposed secrets with file locations
CAVEATS
- Missing context
-
- Exact Trivy CLI commands, flags, and example invocations for each step
- Target user role or experience level
- Ambiguities
-
- Description is truncated mid-sentence at 'exposed'
QUALITY
- OVERALL
- 0.52
- CLARITY
- 0.75
- SPECIFICITY
- 0.45
- REUSABILITY
- 0.35
- COMPLETENESS
- 0.60
IMPROVEMENT SUGGESTIONS
- Replace high-level step descriptions with concrete command examples and required arguments
- Add placeholders (e.g., {{IMAGE_NAME}}, {{SEVERITY_THRESHOLD}}) to improve reusability as a template
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR AGENT
- MoltPass Client for AI Agent Identities agent security
- Supply Chain Dependency Risk Auditor agent security
- Supply Chain Dependency Risk Auditor agent security
- Threat Modeling Security Expert agent security
- Security Bluebook Policy Builder agent security
- Security Bluebook Policy Builder agent security
- Security Blue Book Policy Builder agent security
- Threat Modeling Security Architecture Expert agent security
- Supply Chain Dependency Risk Auditor agent security
- Threat Modeling Security Expert agent security
- SIEM Detection Rule Tuning Guide agent security
- AI File Metadata Compliance Auditor agent security
- Azure Storage Misconfiguration Audit Reporter agent security
- Implementing PAM for Database Access agent security
- AFL++ Coverage-Guided Fuzzing Procedure agent security
- Supply Chain Attack Simulation Detector agent security
- Security Audit Fix Verifier agent security
- Active Directory ACL Abuse Analyzer agent security
- Privileged Access Workstation Implementation Guide agent security
- SSRF Vulnerability Testing and Reporting Guide agent security
- Security Audit Fix Reviewer agent security
- AWS IAM Privilege Escalation Detector agent security
- SSL/TLS Security Assessment with Sslyze agent security
- GCP Penetration Testing with GCPBucketBrute agent security
- AWS CloudTrail Anomaly Detection Guide agent security