Skip to content

Introduction

Tracepod is an eBPF-based container hardening tool for Kubernetes. It observes what a running container actually uses at runtime — files, binaries, shared libraries — via eBPF kernel tracing, then builds a minimized OCI image containing only those components. The result is a smaller attack surface: fewer files, fewer packages, fewer CVEs.

┌─────────────────────────────────────────────────────────┐
│ Kubernetes cluster │
│ │
│ eBPF sensor │
│ (DaemonSet) ──openat() kprobe──► file manifest │
│ │ │
│ ▼ │
│ harden CLI │
│ │ │
│ minimized OCI image │
└─────────────────────────────────────────────────────────┘
  1. Profile — the sensor attaches eBPF kprobes to openat(), execve, and mmap and records every file a container opens, filtered by cgroup to the target container only.
  2. Harden — the harden CLI reads the resulting manifest and builds a new FROM scratch OCI image containing only the observed files, their recursively resolved ELF dependencies, and any explicitly included paths.
  3. Validate — run the hardened image (for example with harden build --smoke-test, or your own smoke test) to confirm it behaves correctly.
  4. Publish — push the hardened image to your registry with --push.

Every successful harden build produces:

  • A minimized OCI image — a single deterministic layer on a scratch base, preserving the original image config (entrypoint, env, user, ports).
  • A confidence score (0–100) telling you how representative the profiling window was.
  • A removal manifest — the exact set of OS packages removed from the source image, with the file evidence for each removal.
  • Optionally, CycloneDX and SPDX SBOMs (via syft), signable with cosign.

See Outputs for details on each artifact.

Binary Platform Description
sensor Linux only eBPF DaemonSet — profiles running containers
harden Linux + macOS Builds minimized OCI images from manifests
tracepod Linux + macOS CLI client for the Tracepod controller API

The hardened image is only as complete as the runtime behavior you observed. Profile your application under the same load pattern it will see in production, and the image will be correct. Profile it while it sits idle and you will need to fill gaps manually. The confidence score exists to surface those gaps before you ship, not to hide them.

Every file in the manifest carries an observation source (direct, inferred-elf, inferred-runtime, directory-inclusion, manual), so you can always audit why a file ended up in the hardened image.

Tracepod is open source under the AGPL-3.0 license. Source: github.com/tracepod/tracepod.