DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to scan a container image for known vulnerabilities with Trivy

Run Trivy image on any image to list CVEs in its OS packages and dependencies.

Short answer: Install with brew install trivy, or use docker run aquasec/trivy; then Scan an image, for example trivy image python:3.4-alpine; read the results by severity and focus on the packages with fixes available. All steps.

Who it is forA developer about to deploy a Docker image who wants to know what known vulnerabilities it carries.

The problemBase images and dependencies quietly accumulate CVEs, and you rarely know which ones until something breaks.

The outcomeA list of vulnerabilities in the image with severities, so you can upgrade or swap the base image.

What you need first

  • Trivy via `brew install trivy`, the aquasec/trivy Docker image, or a release binary
  • Access to the image, folder, repo or Kubernetes cluster you want to scan

Steps

  1. Install with brew install trivy, or use docker run aquasec/trivy
  2. Scan an image, for example trivy image python:3.4-alpine
  3. Read the results by severity and focus on the packages with fixes available
  4. Rebuild on a newer base image and scan again to confirm the count went down
  5. Add the Trivy GitHub Action to scan images on every build

Prompt for your agent

Install aquasecurity/trivy and scan my image <image:tag>. Summarize the critical and high vulnerabilities, which ones have fixed versions, and whether switching to <alternative base image> would remove most of them.

Caveat. A CVE list shows known issues only; it does not prove an image is safe or that each finding is exploitable in your setup.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for aquasecurity/trivy and "Scan a container image for known vulnerabilities"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer