🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🪟 Windows TippsHeader and Footer not showing in Excel(14.09.2026 um 22:43 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
🪟 Windows TippsKB5129194 Windows 11 26H1 Out of Band Update - Deskmodder.de(14.09.2026 um 19:25 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🪟 Windows TippsHeader and Footer not showing in Excel(14.09.2026 um 22:43 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
🪟 Windows TippsKB5129194 Windows 11 26H1 Out of Band Update - Deskmodder.de(14.09.2026 um 19:25 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 3 Min Lesezeit CVE-2023-34251
0

Secure Your Docker Images with Trivy: A Step-by-Step Guide

Cyber Threat & Vulnerability Dossier CVSS 7.5 HIGH (Heuristik) EPSS 28.5%
ANGRIPPSVEKTOR
🌐 Netzwerk (Remote)
AUTHENTIFIZIERUNG
🔓 Keine Authentifizierung nötig
SCHADENSPROFIL
RCE / Vollzugriff / Full Compromise
CWE-KLASSIFIZIERUNG
CWE-94: Code Injection
Handlungsempfehlung: Patch-Tuesday Update einspielen oder betroffene Dienste in Windows Defender isolieren.
Im CVE-Radar öffnen
↗ Quelle (dev.to)
🗣️ Stimme:

Containers are at the heart of modern DevOps workflows, but they’re not immune to vulnerabilities. That’s where Trivy comes in! Trivy is a powerful, open-source vulnerability scanner that makes securing your container images straightforward and effective. In this post, we’ll explore how to use Trivy to scan Docker images and ensure your applications are secure.



Why Trivy?



Trivy is a versatile and easy-to-use tool that helps you:




  • Detect vulnerabilities in container images and application
    dependencies.

  • Identify misconfigurations in Dockerfiles and Kubernetes
    manifests.

  • Ensure compliance with security standards, such as CIS
    Benchmarks.



Key Benefits:




  1. Fast and Comprehensive Scanning: Supports both OS and
    application libraries.

  2. Wide Ecosystem Support: Works with Docker, Kubernetes,
    CI/CD pipelines, and more.

  3. Open Source: Free to use and continuously updated by Aqua
    Security.



Getting Started with Trivy



Step 1: Install Trivy



Linux Installation




CODE
sudo apt-get install wget apt-transport-https gnupg lsb-release -y
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install trivy






MacOS Installation




CODE
brew install aquasecurity/trivy/trivy






Windows Installation



Use PowerShell with Chocolatey:




CODE
choco install trivy






Verify the installation:




CODE
trivy --version






Step 2: Scanning a Docker Image



Basic Command



To scan a Docker image for vulnerabilities, use:




CODE
trivy image <image_name>:<tag>






Example:



Scan the official NGINX image:




CODE
trivy image nginx:latest







Sample Output:




CODE
nginx:latest (debian 11.7)

Total: 5 (CRITICAL: 1, HIGH: 2, MEDIUM: 1, LOW: 1)

+------------+------------------+----------+--------------------------------+--------------------------------+---------------------------------------+
| Library | Vulnerability ID | Severity | Installed Version | Fixed Version | Title |
+------------+------------------+----------+--------------------------------+--------------------------------+---------------------------------------+
| libzstd1 | CVE-2023-34251 | HIGH | 1.4.8+dfsg-3 | 1.4.8+dfsg-3+deb11u2 | zstd: Double free |
+------------+------------------+----------+--------------------------------+--------------------------------+---------------------------------------+







Step 3: Advanced Scanning Options



1. Skip Pulling the Image



If the image is already present locally:




CODE
trivy image --skip-update nginx:latest






2. Filter by Severity



Focus on critical and high-severity issues:




CODE
trivy image --severity CRITICAL,HIGH nginx:latest







3. Output Results as JSON



Save the scan report for further analysis:




CODE
trivy image --format json --output results.json nginx:latest







4. Ignore Unfixable Issues



Exclude vulnerabilities without fixes:




CODE
trivy image --ignore-unfixed nginx:latest







5. Scan Specific Vulnerability Types



Target OS vulnerabilities, application libraries, or both:




CODE
trivy image --vuln-type os,library nginx:latest







Step 4: Automate Scanning in CI/CD Pipelines



Example: Azure Devops



Use Trivy in your Azure Devops workflow to enforce security checks:




CODE
name: Trivy Scan

on:
push:
branches:
- main

jobs:
scan:
runs-on: Agentpool #your agent pool or any which you want
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Run Trivy Scan
uses: aquasecurity/[email protected]
with:
image-ref: 'nginx:latest'






Example: AzureDeops Pipeline




CODE
pipeline {
agent any
stages {
stage('Vulnerability Scan') {
steps {
sh 'trivy image nginx:latest'
}
}
}
}







Step 5: Best Practices



1.Update the Vulnerability Database Keep the database current

to ensure the latest vulnerabilities are detected:




CODE
trivy image --update nginx:latest






2.Focus on Fixing Critical Issues Prioritize addressing

CRITICAL and HIGH vulnerabilities first to minimize risk.



3.Integrate Scanning Early Shift security left by integrating

Trivy scans into your CI/CD pipelines.



Final Thoughts



Trivy makes vulnerability scanning easy, fast, and effective. Whether you're working with container images, IaC, or application dependencies, it’s a must-have tool for your DevSecOps toolkit.



Want to explore more about Trivy? Check out the official documentation. Start scanning today and keep your applications secure!

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
The Gemini desktop app is now available for Windows
1 Quelle
Header and Footer not showing in Excel
1 Quelle
Burn Out, Or Fade Away
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Secure Your Docker Images with Trivy: A Step-by-Step Guide

Thematisch verwandte Begriffe: Secure, Your, Docker, Images · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...