Companion seccomp & AppArmor Profile Generator
Step 3 of the Linux & DevOps pipeline: derive minimal kernel syscall allowlists (seccomp.json / SystemCallFilter=) and AppArmor Mandatory Access Control profiles directly from your systemd unit directives.
Lock Down Linux Services With seccomp, SystemCallFilter & AppArmor Without Guesswork
Hardening a Linux daemon with systemd SystemCallFilter, Docker seccomp.json, or AppArmor usually ends one of two ways: engineers either skip sandboxing completely because writing syscall allowlists by hand is tedious, or they enable an overly strict rule and crash the service in production with SIGSYS (exit code 31/SYS).
Paste your systemd .service unit file above to inspect its capabilities, paths, and runtime profile—generating tailored systemd SystemCallFilter=@system-service allowlists, Docker-compatible seccomp.json policies, and starter AppArmor MAC confinement profiles in seconds, 100% client-side.
Browser Policy Generator vs. systemd-analyze & aa-genprof CLI
| Criteria | QuickCoderHub (In-Browser) | Desktop / CLI Alternative |
|---|---|---|
| Target Outputs | systemd SystemCallFilter, Docker seccomp.json, and AppArmor profile together | Separate tools (systemd-analyze syscall-filter vs. aa-genprof) |
| Works Off-Host | Draft & review profiles on macOS/Windows laptops before touching prod | Requires live Linux root access and auditd logs |
| Syscall Safety | Maps standard systemd syscall groups (@system-service, ~@privileged) | Raw numeric/individual syscall lists are brittle across glibc upgrades |
| Config Privacy | 100% browser-local; internal service paths never uploaded | Local CLI only |
Step-by-Step Workflow
- Paste your existing systemd .service file (or receive it directly from Docker-to-systemd / systemd Hardening Auditor).
- Select your workload profile (network daemon, web reverse proxy, worker, or container runtime) and review filesystem read/write paths.
- Copy the generated systemd SystemCallFilter directives, Docker --security-opt seccomp=seccomp.json file, or /etc/apparmor.d/ profile.
- Test in complain/audit mode first (SystemCallErrorNumber=EPERM or aa-complain) before switching to strict enforcement in production.
Frequently Asked Questions
How do I add SystemCallFilter / seccomp to a systemd service without breaking it?
Start with SystemCallArchitectures=native and SystemCallFilter=@system-service paired with denylists like ~@privileged @resources @mount @reboot. Set SystemCallErrorNumber=EPERM during staging so blocked calls log cleanly instead of killing the process with SIGSYS.
What is the difference between seccomp and AppArmor on Linux?
Seccomp filters which kernel system calls a process is allowed to invoke (blocking dangerous syscalls like ptrace, kexec_load, or mount). AppArmor is a Mandatory Access Control (MAC) layer that restricts which file paths, network sockets, and Linux capabilities a binary can touch.
Can I use the generated seccomp.json with Docker or Kubernetes?
Yes. Pass the downloaded profile to Docker via docker run --security-opt seccomp=/path/to/seccomp.json, or place it under /var/lib/kubelet/seccomp/ and reference it as a Localhost seccompProfile in your Kubernetes Pod securityContext.
Does this replace running aa-genprof on a live Linux host?
This tool builds clean, readable baseline profiles instantly without needing a live Linux VM. For highly custom C/C++ binaries, you can load this baseline in AppArmor complain mode and refine edge-case paths with aa-logprof on staging.