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.
The pipeline
Section titled “The pipeline”┌─────────────────────────────────────────────────────────┐│ Kubernetes cluster ││ ││ eBPF sensor ││ (DaemonSet) ──openat() kprobe──► file manifest ││ │ ││ ▼ ││ harden CLI ││ │ ││ minimized OCI image │└─────────────────────────────────────────────────────────┘- Profile — the sensor attaches eBPF kprobes to
openat(),execve, andmmapand records every file a container opens, filtered by cgroup to the target container only. - Harden — the
hardenCLI reads the resulting manifest and builds a newFROM scratchOCI image containing only the observed files, their recursively resolved ELF dependencies, and any explicitly included paths. - Validate — run the hardened image (for example with
harden build --smoke-test, or your own smoke test) to confirm it behaves correctly. - Publish — push the hardened image to your registry with
--push.
What you get
Section titled “What you get”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.
Components
Section titled “Components”| 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 |
Design philosophy
Section titled “Design philosophy”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.
Next steps
Section titled “Next steps”- Installation — install the sensor and CLI
- Quickstart — harden your first container
- Known limitations — what the sensor cannot observe, and how to work around it
Tracepod is open source under the AGPL-3.0 license. Source: github.com/tracepod/tracepod.