performing-container-security-scanning-with-trivy

Scan container images, filesystems, and Kubernetes manifests for vulnerabilities, misconfigurations, and secrets with Trivy.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill performing-container-security-scanning-with-trivy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performing-container-security-scanning-with-trivy
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/container-security/performing-container-security-scanning-with-trivy
Command: npx skills add https://github.com/xalgord/xalgorix --skill performing-container-security-scanning-with-trivy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Container images and infrastructure-as-code often ship with known CVEs, misconfigurations, hardcoded secrets, and license risks that manual review cannot catch at scale. This Skill operationalizes Aqua Security Trivy to audit images, filesystems, Git repositories, and Kubernetes manifests, and to produce SBOMs for supply chain transparency.

Core Features & Use Cases

  • Multi-scanner auditing: Run vulnerability, misconfiguration, secret, and license scanners together so a default trivy image run does not silently skip entire risk classes.
  • SBOM generation: Produce CycloneDX or SPDX software bills of materials from scanned images for compliance and dependency tracking.
  • CI/CD and Kubernetes integration: Gate pipelines on critical/high findings, emit SARIF for GitHub Advanced Security and JUnit XML for dashboards, and deploy the Trivy Operator in clusters.
  • Use Case: Before promoting a release candidate, scan the image with all scanners enabled, generate a CycloneDX SBOM, diff findings against the previously deployed digest, and block the build if unfixed critical CVEs appear.

Quick Start

Scan my local Docker image with Trivy using all scanners, generate a CycloneDX SBOM, and report critical and high severity findings.

Frequently Asked Questions about performing-container-security-scanning-with-trivy

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

FAQPage Schema
How do I scan a Docker image for vulnerabilities with Trivy?

Run trivy image against a local or remote image to list CVEs with severity, CVSS scores, fixed versions, and affected packages. For a full audit, enable all scanners with --scanners vuln,misconfig,secret,license since the default runs vulnerability scanning only.

How do I generate an SBOM from a container image?

Use Trivy with --format cyclonedx or --format spdx to produce a Software Bill of Materials from the scanned image. SBOMs support supply chain compliance and help verify which components were actually enumerated, especially for distroless images.

Can Trivy scan Kubernetes manifests and Terraform files?

Yes, Trivy detects misconfigurations in Dockerfiles, Kubernetes YAML, Terraform, and Helm charts using built-in policy checks aligned with CIS benchmarks. It can also be deployed as a Trivy Operator inside a Kubernetes cluster for continuous scanning.

How do I integrate Trivy into a CI/CD pipeline?

Add Trivy as a pipeline step in GitHub Actions, GitLab CI, or Jenkins that fails builds on critical or high vulnerabilities. It can emit SARIF reports for GitHub Advanced Security and JUnit XML for test dashboards.

Why does Trivy report zero vulnerabilities on my image?

A clean result often means limited coverage, not a safe image. Default scans skip misconfigurations and secrets, distroless or scratch images may lack detectable lockfiles, and a stale vulnerability database misses new CVEs, so refresh the DB and re-run with all scanners.

What are the limitations of Trivy severity filtering?

Filtering to CRITICAL,HIGH drops exploitable MEDIUM findings, and --ignore-unfixed hides CVEs that have no patch yet but remain exploitable. Report what was filtered and re-run without severity filters to gauge true vulnerability counts.