How moby/profiles works
Profiles is a Go library collection for container security: callers request AppArmor or seccomp profiles, which are generated or adapted into runtime-ready policy. AppArmor’s sampled install path renders a profile and loads it through apparmor_parser; seccomp exposes default and JSON-loaded profile paths, with conditional rules evaluated against host architecture, capabilities, and kernel version. The README also documents both packages as independently usable. Unsampled seccomp details are represented only at the subsystem level; edges are limited to relationships shown in excerpts or the README.
Main entry points: seccomp_linux.go Profile loading · apparmor.go Profile install · template.go Profile renderer · seccomp.go Profile schema
Components 8
AppArmor profiles
- Profile install
apparmor/apparmor.go - Profile renderer
apparmor/template.go
Seccomp profile API
- Profile loading
seccomp/seccomp_linux.go - Profile schema
seccomp/seccomp.go
Seccomp policy
- Default syscall policy
seccomp/default_linux.go - Kernel version check
seccomp/kernel_linux.go
Other components
- Package callers
- apparmor_parser
Connections 7
- Package callers → Profile install: requests install
README.md - Profile install → Profile renderer: renders profile
apparmor/apparmor.go - Profile install → apparmor_parser: loads profile
apparmor/apparmor.go - Package callers → Profile loading: requests profile
README.md - Profile loading → Profile schema: decodes JSON
seccomp/seccomp_linux.go - Profile loading → Default syscall policy: gets default
seccomp/seccomp_linux.go - Profile loading → Kernel version check: checks kernel
seccomp/seccomp_linux.go