Bad Things You Can Do to Unsecured Containers
summary
Shows that image tags are mutable so use digests not latest—the demo pins a specific sha256 to guarantee the exact image. Demonstrates that deleted secrets remain in lower layers and can be extracted with tools like dive, so keep secrets off images via multi-stage builds and secret stores. Proves running containers as root or with added capabilities enables host escapes and mounts (full host access), so run as non-root and enforce least privilege; recommends GitGuardian and TruffleHog pre-commit checks.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 0:15Why Best Practices? Planning for the Worst
- 2:31Container Basics: Layers and Privileges
- 3:42Using the "latest" Tag
- 7:30The Fix: Pinning Images by Digest
- 11:28Secrets in Hidden Layers
- 16:21Keeping Secrets Off Your Images
- 17:39Running as Root
- 24:23Privileged Containers and Capabilities
- 27:02Least Privilege and Takeaways
