<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: TEJAS PATIL</title>
    <description>The latest articles on DEV Community by TEJAS PATIL (@tejaspatil).</description>
    <link>https://dev.to/tejaspatil</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2124013%2F7d3a0b33-3fc0-436b-86df-9fe47b911825.jpeg</url>
      <title>DEV Community: TEJAS PATIL</title>
      <link>https://dev.to/tejaspatil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tejaspatil"/>
    <language>en</language>
    <item>
      <title>Container Image Vulnerability Scanning Using Grype</title>
      <dc:creator>TEJAS PATIL</dc:creator>
      <pubDate>Thu, 18 Dec 2025 09:30:52 +0000</pubDate>
      <link>https://dev.to/tejaspatil/container-image-vulnerability-scanning-using-grype-247</link>
      <guid>https://dev.to/tejaspatil/container-image-vulnerability-scanning-using-grype-247</guid>
      <description>&lt;p&gt;&lt;strong&gt;🔐 Container Image Vulnerability Scanning Using Grype&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In modern DevOps workflows, container security is no longer optional. Vulnerable container images can introduce serious risks into production environments if they are not scanned properly.&lt;/p&gt;

&lt;p&gt;In this post, I’ll show how to use Grype, an open-source vulnerability scanner by Anchore, to scan container images easily and efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Grype?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Grype is a CLI tool for finding known vulnerabilities in container images and filesystems. It works by analyzing installed packages and matching them against multiple vulnerability databases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Grype?&lt;/strong&gt;&lt;br&gt;
Simple and fast CLI&lt;br&gt;
Works with Docker and private registries&lt;br&gt;
CI/CD friendly&lt;br&gt;
Open source and actively maintained&lt;br&gt;
Great alternative to Trivy&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installing Grype&lt;/strong&gt;&lt;br&gt;
Linux Installation&lt;br&gt;
curl -sSfL &lt;a href="https://raw.githubusercontent.com/anchore/grype/main/install.sh" rel="noopener noreferrer"&gt;https://raw.githubusercontent.com/anchore/grype/main/install.sh&lt;/a&gt; | sudo sh -s -- -b /usr/local/bin&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctqj5ga7psml9htfudqz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctqj5ga7psml9htfudqz.png" alt=" " width="800" height="155"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Verify Installation&lt;/strong&gt;&lt;br&gt;
grype version&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54mqmxhwcerxlxi3ym8s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54mqmxhwcerxlxi3ym8s.png" alt=" " width="800" height="135"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Scanning a Container Image&lt;/strong&gt;&lt;br&gt;
Scan a Public Image&lt;br&gt;
grype alpine:latest&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9vskxsieqzlh9gj1l38.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9vskxsieqzlh9gj1l38.png" alt=" " width="800" height="91"&gt;&lt;/a&gt;&lt;br&gt;
This command scans the image and displays vulnerabilities along with their severity and fix status.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding the Output&lt;/strong&gt;&lt;br&gt;
Grype reports:&lt;br&gt;
Package name&lt;br&gt;
Installed version&lt;br&gt;
Vulnerability ID (CVE)&lt;br&gt;
Severity level&lt;br&gt;
Fixed version (if available)&lt;br&gt;
Example output:&lt;br&gt;
&lt;strong&gt;openssl  1.1.1k  CVE-2023-0464  High  fixed in 1.1.1t&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Filtering and Failing on Vulnerabilities&lt;/strong&gt;&lt;br&gt;
Fail on High or Critical Issues&lt;br&gt;
grype myimage:latest --fail-on high&lt;br&gt;
This is especially useful in CI/CD pipelines to block insecure images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Show Only Fixable Vulnerabilities&lt;/strong&gt;&lt;br&gt;
grype myimage:latest --only-fixed&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Generating Reports json *&lt;/em&gt;&lt;br&gt;
JSON Report&lt;br&gt;
 grype alpine:latest -o json &amp;gt; grype-report.json&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Practices&lt;/strong&gt;&lt;br&gt;
Scan images early in the development lifecycle&lt;br&gt;
Use minimal base images like alpine&lt;br&gt;
Fix vulnerabilities before pushing images to production&lt;br&gt;
Combine Grype with SBOM tools such as Syft&lt;br&gt;
Automate scans in CI/CD pipelines&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Grype is a powerful yet easy-to-use tool for container image vulnerability scanning. Its simplicity and speed make it a great choice for developers and DevOps engineers who want to improve container security without complex setup.&lt;/p&gt;

&lt;p&gt;If you are looking for a clean and reliable alternative to other scanners, Grype is definitely worth trying.&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>containers</category>
      <category>devops</category>
      <category>security</category>
    </item>
  </channel>
</rss>
