tezvyn:

Artifact Vulnerability Scanning: A Background Check for Code

AI-drafted, machine-checkedSource: docs.cloud.google.comadvanced

Artifact vulnerability scanning is a background check for your software's dependencies, catching known security issues before they ship. It's a key CI/CD step, automatically scanning Docker images against databases of known CVEs. The footgun is alert fatigue.

WHY IT EXISTS Modern applications are assembled from hundreds of open-source dependencies. Each dependency is a potential entry point for attackers. Manually tracking vulnerabilities in every library is impossible, so automated scanning was created to find these known risks before they get deployed.

THE MENTAL MODEL Think of it as an automated background check for your software's ingredients. Before you serve a meal, you want to know if any ingredient has been recalled for a safety issue. This scan checks the components of your artifact (a Docker image, a JAR file) against a list of known security problems (CVEs).

HOW IT WORKS A scanner tool, often integrated into a CI/CD pipeline or artifact registry, inspects a software artifact. First, it identifies all the packages, libraries, and their specific versions contained within the artifact, creating a Software Bill of Materials (SBOM). Second, it compares this list against one or more vulnerability databases (like the National Vulnerability Database). Finally, it generates a report detailing any matches, typically categorized by severity (e.g., Critical, High, Medium, Low).

WHEN TO USE IT Use it as a standard step in your CI/CD pipeline, immediately after an artifact is built and pushed to a registry. The scan results can act as a quality gate, automatically failing the build and blocking deployment if vulnerabilities above a certain severity threshold are discovered. This is a core practice of "shifting security left."

WHEN NOT TO USE IT It is not a silver bullet. Vulnerability scanning only finds known vulnerabilities in third-party dependencies. It will not find zero-day exploits, logical flaws in your own application code, or misconfigurations in your infrastructure. It should be used alongside, not in place of, other security practices like Static Application Security Testing (SAST) and Dynamic Application Security Testing (DAST).

ONE CANONICAL EXAMPLE A developer's CI pipeline builds a new Docker image for their web service and pushes it to Google Artifact Registry. The registry's built-in scanner automatically runs. It discovers the image's base OS contains a newly disclosed critical remote code execution (RCE) vulnerability. The pipeline is configured to fail on critical findings, so the build is marked as failed, the deployment is blocked, and the developer is notified to update the base image.

Read the original → docs.cloud.google.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.