Skip to content

Instantly share code, notes, and snippets.

@invidian
Created December 3, 2021 17:08
Show Gist options
  • Save invidian/34b6222a030718b4b4d77cde25725dcf to your computer and use it in GitHub Desktop.
Save invidian/34b6222a030718b4b4d77cde25725dcf to your computer and use it in GitHub Desktop.
Minimal seccomp profile for Docker container running Go binary
{
"defaultAction": "SCMP_ACT_ERRNO",
"syscalls": [
{
"names": [
// Used by Go binary.
"arch_prctl",
"clone",
"close",
"execve",
"exit_group",
"fcntl",
"futex",
"gettid",
"mmap",
"openat",
"read",
"rt_sigaction",
"rt_sigprocmask",
"sched_getaffinity",
"sigaltstack",
"write",
// All below are required by runc to create a container.
"fstatfs",
"getdents64",
"capget",
"capset",
"prctl",
"fstat",
"newfstatat",
"setgroups",
"setgid",
"setuid",
"chdir",
"getppid"
],
"action": "SCMP_ACT_ALLOW"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment