container-hardening

Installation
SKILL.md

🛡️ Container hardening

A container is a process on a shared kernel, fenced in by namespaces, cgroups, a capability set, a seccomp filter and an AppArmor or SELinux profile. Every one of those fences can be lowered by a line of configuration — privileged: true, a mounted Docker socket, pid: host, cap_add: SYS_ADMIN, seccomp=unconfined — and most of them are lowered by default somewhere: Docker runs as root unless told otherwise, and Kubernetes runs pods without a seccomp profile unless one is set. This skill finds which fences are down, says what each one exposes, and puts them back without breaking the workload.

Where this fits

The container skills:

  1. dockerfile — the image: what's inside it, who it runs as, what it was built from
  2. docker-compose — the local development stack
  3. container-hardening (this skill) — how containers actually run wherever they run, and what the image's supply chain lets through
  4. container-debug — why a container isn't running the way it should. When a hardening change breaks a workload (a write path, a capability), that's where the cause gets proven
  5. docker-swarm — the orchestration around Swarm services (managers, rollouts, placement, overlay networks); it hands each service's security settings here

The boundary with dockerfile: a finding about the image itself (no USER, setuid binaries, a secret in a layer, an unpinned base) is reported here and fixed there — Harden mode hands it over rather than editing a Dockerfile itself. The boundary with docker-compose: that skill deliberately keeps a dev stack soft. A Compose file that is a laptop environment is reviewed here only for the things that hurt the laptop (the socket, privileged, ports on 0.0.0.0); a Compose file that runs production — on a VM, docker compose -f … up -d in a deploy script — is reviewed in full.

Reference docs, all in this folder:

Installs
1
First Seen
Today