Skip to content

Fix Trivy CI: upgrade OS packages to patch linux-libc-dev vulnerabilities#90

Merged
ashiramin merged 2 commits intomainfrom
ashir/fix-trivy-linux-libc-dev
Mar 15, 2026
Merged

Fix Trivy CI: upgrade OS packages to patch linux-libc-dev vulnerabilities#90
ashiramin merged 2 commits intomainfrom
ashir/fix-trivy-linux-libc-dev

Conversation

@ashiramin
Copy link
Contributor

Summary

  • Add apt-get upgrade -y to both builder and runtime stages in the Dockerfile to pick up security patches for OS-level packages
  • Fixes all 9 CRITICAL/HIGH CVEs in linux-libc-dev flagged by the Trivy scan
  • Also switches aptapt-get for proper non-interactive Dockerfile usage

Test plan

  • Verify Trivy CI workflow passes on this branch
  • Verify Docker image builds successfully

🤖 Generated with Claude Code

ashiramin and others added 2 commits March 14, 2026 13:13
…ties

Add apt-get upgrade -y to both builder and runtime stages of the
Dockerfile to pick up security patches for OS-level packages.
All 9 CRITICAL/HIGH CVEs (linux-libc-dev) are fixed by upgrading
to the latest patched versions from Debian stable.

Also switch from apt to apt-get for proper non-interactive usage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch remaining apt → apt-get on line 31 for consistency
with the rest of the Dockerfile.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ashiramin ashiramin requested a review from shawnburke March 14, 2026 18:23
FROM debian:stable-slim AS builder

RUN apt update && apt install -y protobuf-compiler git wget build-essential
RUN apt-get update && apt-get upgrade -y && apt-get install -y protobuf-compiler git wget build-essential
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we put these on separate lines we'll get better caching?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I remembered that trick too but turns out that is antipattern lol. Seperate RUN means new more layers and may increase size of the image

@ashiramin ashiramin merged commit 75c4737 into main Mar 15, 2026
16 checks passed
@ashiramin ashiramin deleted the ashir/fix-trivy-linux-libc-dev branch March 15, 2026 02:45
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.

2 participants