What do the names, action, includes and excludes fields of a seccomp syscall rule mean?
names lists the syscalls the rule covers, action says what to do with them (e.g. SCMP_ACT_ALLOW), includes/excludes make the rule conditional — e.g. only allow these syscalls if the container has a given capability.
Each entry in a profile's syscalls list is a JSON object:
| Field | Meaning |
|---|---|
names |
One or more syscalls the rule applies to (e.g. "mount", "unshare", "chmod"). |
action |
What happens to those syscalls — SCMP_ACT_ALLOW to permit them (subject to the conditions below). |
args |
Restricts the rule to calls made with particular arguments. |
includes |
Conditions under which the rule applies — e.g. "caps": ["CAP_SYS_ADMIN"] means these syscalls are only allowed if the container holds CAP_SYS_ADMIN. |
excludes |
The inverse of includes — conditions under which the rule does not apply. |
The conditional includes/excludes are what make Docker's default profile smart: dangerous syscalls such as mount, setns, unshare and bpf are allowed only when the container already has the matching capability (e.g. CAP_SYS_ADMIN). So if you drop that capability, those syscalls stay blocked by seccomp as well — the two mechanisms reinforce each other.
Concretely: unshare (create new namespaces) is blocked for an ordinary container, and only becomes available if the capability condition in the profile is met (or you run --security-opt seccomp=unconfined, which you should avoid).
Go deeper:
Docker Docs: Seccomp security profiles — the profile JSON format and the capability-gated syscall rules.