MVP-0.8 · Container hardening: non-root, healthcheck, pinned tools, drop Nix #261

Closed
opened 2026-09-20 20:16:06 +00:00 by sharang · 0 comments
Owner

Goal

Harden the shipped images: run as a non-root user, give the orchestrator a real healthcheck, keep the build context small, pin the bundled tools, and remove Nix from the production agent image now that the Nix firmware build is disabled (MVP-0.4) — a smaller image and a much smaller attack surface.

What to change

  • Non-root USER in the agent and dashboard images.
  • HEALTHCHECK wired to the real /health probe (see MVP-1.1).
  • .dockerignore so the build context stays minimal.
  • Pin syft, semgrep and cargo-audit --locked to explicit versions.
  • Remove Nix from the prod agent image.

Acceptance

  • Containers run as a non-root UID and start with a read-only-friendly layout; volumes for blobs and snapshots still work.
  • docker inspect shows a healthcheck that turns unhealthy when /health reports down.
  • Tool versions are pinned and recorded in the evidence-pack manifest (MVP-3.3).
  • The production agent image contains no Nix store or nix binary, and the image is measurably smaller.
  • Trivy scan of the image passes the gate added in MVP-4.1.
## Goal Harden the shipped images: run as a non-root user, give the orchestrator a real healthcheck, keep the build context small, pin the bundled tools, and remove Nix from the production agent image now that the Nix firmware build is disabled (MVP-0.4) — a smaller image and a much smaller attack surface. ## What to change - Non-root `USER` in the agent and dashboard images. - `HEALTHCHECK` wired to the real `/health` probe (see MVP-1.1). - `.dockerignore` so the build context stays minimal. - Pin syft, semgrep and `cargo-audit --locked` to explicit versions. - **Remove Nix from the prod agent image.** ## Acceptance - [ ] Containers run as a non-root UID and start with a read-only-friendly layout; volumes for blobs and snapshots still work. - [ ] `docker inspect` shows a healthcheck that turns unhealthy when `/health` reports down. - [ ] Tool versions are pinned and recorded in the evidence-pack manifest (MVP-3.3). - [ ] The production agent image contains no Nix store or `nix` binary, and the image is measurably smaller. - [ ] Trivy scan of the image passes the gate added in MVP-4.1.
sharang added this to the Production MVP milestone 2026-09-20 20:16:06 +00:00
sharang added the infrastructuresecurity labels 2026-09-20 20:16:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/pruefwerk#261