scanning-containers-with-trivy-in-cicd

Featured

This skill covers integrating Aqua Security's Trivy scanner into CI/CD pipelines for comprehensive container image vulnerability detection. It addresses scanning Docker images for OS package and application dependency CVEs, detecting misconfigurations in Dockerfiles, scanning filesystem and git repositories, and establishing severity-based quality gates that block deployment of vulnerable images.

DevOps & Infrastructure 36,355 stars 4443 forks Updated 2 months ago Apache-2.0

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Scanning Containers with Trivy in CI/CD ## When to Use - When building Docker container images in CI/CD and needing automated vulnerability scanning before registry push - When establishing quality gates that prevent images with critical or high CVEs from reaching production - When compliance requirements mandate vulnerability scanning of all container images before deployment - When scanning IaC files (Dockerfiles, Kubernetes manifests) alongside container image scanning - When needing a single tool to scan OS packages, language-specific dependencies, and misconfigurations **Do not use** for runtime container security monitoring (use Falco), for scanning running containers in production (use runtime agents), or when only scanning application source code without containerization (use SAST tools). ## Prerequisites - Trivy CLI installed (v0.50+) or access to aquasecurity/trivy-action GitHub Action - Docker daemon available in CI/CD for building and scanning images - Container registry credentials for pulling base images and pushing scanned images - Trivy vulnerability database accessible (downloaded automatically or cached) ## Workflow ### Step 1: Configure Trivy Scanning in GitHub Actions Set up a GitHub Actions workflow that builds a Docker image and scans it with Trivy before pushing to a container registry. ```yaml # .github/workflows/container-security.yml name: Container Security Scan on: push: branches: [main] pull_request: branches: [main] pa...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
8 months ago
Last Updated
2 months ago
Language
Python
License
Apache-2.0

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category