Docker / containers
21 items · source
Secrets Management & Cryptography
- Verify secrets are never stored in Docker images.
Runtime, Containers & Hosting
- Verify
.dockerignore. - Scan Dockerfile.
- Verify every published port in
docker run -por composeports:is bound to a specific interface (127.0.0.1:5432:5432) unless it must be public — Docker writes its own iptables rules, so a host firewall such as ufw does not block a port bound to 0.0.0.0. - Verify containers run with
no-new-privileges, withoutseccomp=unconfined, and with apidslimit — these runtime flags keep a compromised process from escalating or fork-bombing the host. - Verify the Dockerfile uses
COPYrather thanADDfor local files, neverADD <url>, and removes setuid and setgid bits from the final image —ADDfetches remote content and auto-extracts archives.
CI/CD & Supply Chain
- Protect Dockerfiles.
- Verify Docker socket exposure.
- Verify the Docker daemon is not listening on
tcp://(2375/2376) without mutual TLS and thatdaemon.jsonlists noinsecure-registries— an open daemon socket is root on the host.
Pre-Release Gates
- Docker registry credentials
- Docker audit complete.
AI Output Handling
- Prevent access to Docker socket.
AI Integrations (email, browser, repos, cloud)
- Generated Dockerfiles receive security review.
AI-Generated Crypto, Dependency & Config Bugs
Review every AI-generated:
- Dockerfile
- docker-compose
AI-Generated Infrastructure & Pipeline Bugs
- Verify generated Dockerfile does not copy
.env. - Verify generated Dockerfile does not copy SSH keys.
- Verify generated Dockerfile does not copy GitHub credentials.
- Verify generated Dockerfile does not embed secrets in
ARG. - Verify generated Dockerfile does not use untrusted remote scripts.
Agent Prompts & PR Review
- Identify Docker changes.
# Docker / containers ## Secrets Management & Cryptography * [ ] Verify secrets are never stored in Docker images. ## Runtime, Containers & Hosting * [ ] Verify `.dockerignore`. * [ ] Scan Dockerfile. * [ ] Verify every published port in `docker run -p` or compose `ports:` is bound to a specific interface (`127.0.0.1:5432:5432`) unless it must be public — Docker writes its own iptables rules, so a host firewall such as ufw does not block a port bound to 0.0.0.0. * [ ] Verify containers run with `no-new-privileges`, without `seccomp=unconfined`, and with a `pids` limit — these runtime flags keep a compromised process from escalating or fork-bombing the host. * [ ] Verify the Dockerfile uses `COPY` rather than `ADD` for local files, never `ADD <url>`, and removes setuid and setgid bits from the final image — `ADD` fetches remote content and auto-extracts archives. ## CI/CD & Supply Chain * [ ] Protect Dockerfiles. * [ ] Verify Docker socket exposure. * [ ] Verify the Docker daemon is not listening on `tcp://` (2375/2376) without mutual TLS and that `daemon.json` lists no `insecure-registries` — an open daemon socket is root on the host. ## Pre-Release Gates * [ ] Docker registry credentials * [ ] Docker audit complete. ## AI Output Handling * [ ] Prevent access to Docker socket. ## AI Integrations (email, browser, repos, cloud) * [ ] Generated Dockerfiles receive security review. ## AI-Generated Crypto, Dependency & Config Bugs Review every AI-generated: * [ ] Dockerfile * [ ] docker-compose ## AI-Generated Infrastructure & Pipeline Bugs * [ ] Verify generated Dockerfile does not copy `.env`. * [ ] Verify generated Dockerfile does not copy SSH keys. * [ ] Verify generated Dockerfile does not copy GitHub credentials. * [ ] Verify generated Dockerfile does not embed secrets in `ARG`. * [ ] Verify generated Dockerfile does not use untrusted remote scripts. ## Agent Prompts & PR Review * [ ] Identify Docker changes. 21 items · https://github.com/FarzamHabibi/pre-production-checklist · CC BY 4.0