Marcio Cunha

Base Image Governance with Red Hat UBI and Vulnerability Scanning

Learn how to build a secure software supply chain using Red Hat UBI base images and automated vulnerability scanning in private repositories.

Marcio Cunha•4 min
Also available in:EspañolPortuguês
Summary
  • Standardized base images drastically reduce the initial attack vector in enterprise production environments.
  • Using Red Hat UBI provides regulatory compliance and corporate support without rigid proprietary dependencies.
  • Automated vulnerability scanners in private registries prevent critical flaws from reaching servers.
  • Rigorous tag management and digital signatures ensure the integrity of every artifact generated in the pipeline.
  • Continuous audits of RPM packages prevent the accumulation of obsolete code and silent security gaps.

The Trust Challenge in Software Supply Chains

In modern container-based application development, choosing the base image is the foundation of any security architecture. In practice, this means building an application on a fragile foundation is like constructing a high-rise building on quicksand. When we download public images from open repositories, we often inherit dozens of outdated packages, vulnerable libraries, and unknown code that will never be used by our operating system or application. This scenario expands the attack surface, making the enterprise environment an easy target for attackers exploiting known flaws in forgotten components.

To mitigate this risk in a structured way, engineering teams must adopt strict governance over what images enter the corporate ecosystem. Base image governance acts like rigorous customs control, where no package enters or circulates without undergoing detailed checks for origin and integrity. By centralizing usage on official, approved images, organizations gain predictability, reduce false-positive security alerts, and drastically simplify the regulatory compliance audits required by today's market.

Understanding Red Hat UBI and Its Technical Benefits

Red Hat UBI, or Universal Base Image, is a family of container images developed by Red Hat that brings Red Hat Enterprise Linux reliability standards to any developer, even without an active paid subscription. In practice, this means you get a minimalist, thoroughly tested operating system backed by enterprise support, yet with the flexibility to run anywhere—whether in the public cloud, on-premises servers, or development workstations. The major differentiator is the guarantee that the source code of the included packages is auditable and follows rigorous industrial security standards.

Another key benefit of UBI is native compatibility with the RPM package manager, which vastly simplifies dependency installation and clean, predictable library updates. Unlike community images that change behavior without warning, UBI's lifecycle is predictable and aligned with long-term corporate releases. This eliminates unpleasant surprises during application builds on continuous integration servers, ensuring software behavior remains identical from the programmer's laptop to large-scale production environments.

Private Repository Architecture and Security

Maintaining a private container repository is the digital equivalent of keeping a company's most valuable assets in a vault with biometric controls. In practice, a private registry like Quay, Harbor, or Nexus isolates the organization's code against external tampering, intellectual property leaks, and malicious dependency injection attacks. However, simply hiding images behind a strong password is not enough; you must ensure the content stored inside that vault remains sanitized, updated, and free of compromised components over time.

The integration between the private repository and continuous delivery automation tools creates a workflow where every newly built image is mandatory subjected to stress tests and code inspection. If the scanner identifies a critical security vulnerability—such as a remote code execution flaw in a shared library—the repository can automatically block the publication of that image, preventing it from being consumed by other services or accidentally deployed to critical production environments.

Implementing Automated Vulnerability Scanning

Vulnerability scanning works like a continuous X-ray that examines every layer of a container searching for signatures of known flaws cataloged in global security databases, such as CVE (Common Vulnerabilities and Exposures). In practice, the process analyzes installed packages within the UBI image, compares their versions against real-time security bulletins, and issues detailed reports indicating the criticality degree of each finding. This transforms a reactive task into a proactive software engineering process.

To configure this scanning efficiently in your CI/CD pipeline, you can use market tools like Trivy, Clair, or Grype integrated directly into your private repository. Below is a practical example of a terminal command executed to scan a local image using Trivy before pushing it to the corporate registry:

trivy image --severity HIGH,CRITICAL my-private-registry.internal/app/my-ubi-app:v1.0.0

This command performs a deep scan on the specified image, filtering only vulnerabilities classified as high risk or critical, allowing the development team to surgically address real issues without wasting time on irrelevant alerts.

Best Practices for Maintenance and Continuous Updates

Base image governance is not a project with an end date, but rather a continuous process of operational hygiene. In practice, this means a secure image today can become obsolete and vulnerable tomorrow as new flaws are discovered across the technology industry. Therefore, engineering teams must schedule periodic application rebuilds, always using the latest tags provided by Red Hat UBI and ensuring operating system security patches are applied systematically and automatically.

Another essential recommendation is to adopt the principle of least privilege inside Dockerfiles, avoiding the use of the root user to run processes in production. By combining robust Red Hat UBI base images, hardened private repositories, and rigorous automated scans, organizations build a highly resilient defense wall. This technical maturity protects customer data, guarantees service stability, and elevates the standard of engineering excellence across the entire project.