Skip to content
Back to skills

Dockerfile Compose Security

ASecurity

Blocks (some rules ask) when a change to a Dockerfile, Containerfile or compose file adds: an untagged, floating or unresolvable base image; a root final stage; TLS or signature checks off; secret ENV/ARG/environment literals; COPY of key or .env files; remote ADD without checksum (an ARG default URL too); fetch piped to a shell; RUN --security=insecure; chmod 777 or setuid; sudo, sshd, chpasswd; unpinned git clone; ONBUILD RUN; compose privileged, dangerous cap_add, unconfined profiles, devi...

  • 3 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added October 2, 2026
ai-agentsgoshelldockergitsecurity

Works with

  • cli

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add open-coder-ai/chock-catalog --skill dockerfile-compose-security --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dockerfile Compose Security?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dockerfile Compose Security
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/open-coder-ai-dockerfile-compose-security/badge)](https://www.skillsdirectory.com/skills/open-coder-ai-dockerfile-compose-security)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dockerfile-compose-security
description: "Blocks (some rules ask) when a change to a Dockerfile, Containerfile or compose file adds: an untagged, floating or unresolvable base image; a root final stage; TLS or signature checks off; secret ENV/ARG/environment literals; COPY of key or .env files; remote ADD without checksum (an ARG default URL too); fetch piped to a shell; RUN --security=insecure; chmod 777 or setuid; sudo, sshd, chpasswd; unpinned git clone; ONBUILD RUN; compose privileged, dangerous cap_add, unconfined profiles, devices, host namespaces, runtime socket or host-root mounts, DB ports on every interface (a profiled or compose.dev service only notes a port or cap_add SYS_PTRACE). A one-line form goes to a sibling gate only where it is installed; scan-secrets lines always. Misses: digest pinning, build args overriding defaults, ADD of an ARG with no default, an unlisted cap_add, commands in variables, aliases or $'' quoting, bake and k8s files, extends or include, other file names, a self-added profiles:. Friction, not a boundary."
metadata:
  chock.artifact: rule
  chock.enforcement: block
  chock.coverage_without_chock: advisory
---

# Dockerfile and Compose Security

Blocks (some rules ask) when a change to a Dockerfile, Containerfile or compose file adds: an untagged, floating or unresolvable base image; a root final stage; TLS or signature checks off; secret ENV/ARG/environment literals; COPY of key or .env files; remote ADD without checksum (an ARG default URL too); fetch piped to a shell; RUN --security=insecure; chmod 777 or setuid; sudo, sshd, chpasswd; unpinned git clone; ONBUILD RUN; compose privileged, dangerous cap_add, unconfined profiles, devices, host namespaces, runtime socket or host-root mounts, DB ports on every interface (a profiled or compose.dev service only notes a port or cap_add SYS_PTRACE). A one-line form goes to a sibling gate only where it is installed; scan-secrets lines always. Misses: digest pinning, build args overriding defaults, ADD of an ARG with no default, an unlisted cap_add, commands in variables, aliases or $'' quoting, bake and k8s files, extends or include, other file names, a self-added profiles:. Friction, not a boundary.

```
flag(container_change): Dockerfile|Containerfile|compose adds floating image (no tag, latest, stable, edge), root final stage, TLS|signature off, literal secret, key-file COPY, privileged|cap_add|host ns|docker.sock|host-root mount, db port on 0.0.0.0
prefer: pinned tag@sha256, USER <uid>, RUN --mount=type=secret, cap_add narrow, named volumes; waiver: '# chock: allow <rule-id>', person only
```

This skill is advisory: the client reading it has no mechanism to enforce it. The same policy compiled by `chock` blocks at commit, on an agent's file writes and at turn end. See https://github.com/open-coder-ai/chock

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.