Skip to content
Skillpedia
Security35k · #6046

performing-container-security-scanning-with-trivy

Teaches your AI agent to protect apps against attacks and generate images, icons and diagrams.

What it does

This tool scans container images, files, and infrastructure configurations for security issues like vulnerabilities, exposed secrets, and misconfigurations. It can also generate detailed reports about software contents.

When to use it

  • ✓When checking the security of container images.
  • ✓When integrating security checks into automated development processes (CI/CD).
  • ✓When looking for misconfigurations in infrastructure files (like Kubernetes or Terraform).

Example of what to ask your AI

“Scan the image 'my-app:latest' for vulnerabilities and exposed secrets.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-container-security-scanning-with-trivy/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-container-security-scanning-with-trivy/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool uses Trivy, a security scanner, to analyze different types of targets. It looks for known flaws, sensitive information, and incorrect settings, generating a report with the findings.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-container-security-scanning-with-trivy

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/performing-container-security-scanning-with-trivy/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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.

FAQ

What is a container image?

It's a package containing everything a program needs to run, like its code, libraries, and settings.

What are vulnerabilities?

These are security flaws in software that attackers can exploit.

What is CI/CD?

It's a software development practice that automates code integration and delivery, including security testing.

Details

Original description by the author

Runs Trivy across every target type it supports - container images, filesystems, Git repositories, and Kubernetes clusters - for OS and dependency vulnerabilities, IaC misconfiguration, exposed secrets, and licences, generating CycloneDX or SPDX SBOMs. Use when integrating Trivy into CI/CD, deploying the Trivy Kubernetes operator, scanning non-image targets, or triaging results at scale. Keywords:

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#6046
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills