Skip to content

fix: replace Alpine runtime with distroless to eliminate BusyBox CVEs#1749

Open
MaheshYadlapati wants to merge 1 commit into
snyk:mainfrom
MaheshYadlapati:fix/distroless-runtime-image
Open

fix: replace Alpine runtime with distroless to eliminate BusyBox CVEs#1749
MaheshYadlapati wants to merge 1 commit into
snyk:mainfrom
MaheshYadlapati:fix/distroless-runtime-image

Conversation

@MaheshYadlapati
Copy link
Copy Markdown

Fixes #1716

Problem

The container image uses alpine:3.21.2 as the runtime base, which
bundles BusyBox. Two CVEs are present:

Fix

driftctl is a statically compiled Go binary with no runtime dependencies
on Alpine or BusyBox. Switching to gcr.io/distroless/static eliminates
the entire BusyBox attack surface.

Changes:

  • Replace FROM alpine:3.21.2 with FROM gcr.io/distroless/static
  • Remove RUN chmod +x — unnecessary since binary permissions are
    preserved from the builder stage and distroless has no shell

The builder stage (golang:1.23) is unchanged.

Testing

Image builds and runs identically — only the runtime base layer changes.
The binary entrypoint is unaffected.

@MaheshYadlapati MaheshYadlapati requested a review from a team as a code owner May 24, 2026 10:23
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented May 24, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@MaheshYadlapati
Copy link
Copy Markdown
Author

Hi team, raised this PR to address #1716. @ioannacaba, would really appreciate a review and approval when you get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security Vulnerabilities faced in drift container images

1 participant