Skip to main content

Command line tool to generate secure computing mode

Project description

A straightforward command line tool for generate seccomp json profile


Seccomp (short for secure computing mode) is a computer security facility in the Linux kernel. Seccomp allows a process to make a one-way transition into a “secure” state where it cannot make any system calls except exit(), sigreturn(), read() and write() to already-open file descriptors. Should it attempt any other system calls, the kernel will terminate the process with SIGKILL or SIGSYS. In this sense, it does not virtualize the system’s resources but isolates the process from them entirely.

Seccomp profile is used with by a lot of applications like:

  • docker
  • firefox
  • systemd
  • openssh
  • chrome
  • and more…

Cerber help you to generate seccomp profile that you can use with docker per example.


  • Linux
  • Python3.5+
  • Strace


$ pip install cerber


Generate a seccomp_profile.json in your current directory:

$ cerber docker run hello-world
$ ls
$ cat seccomp_profile.json
    "defaultAction": "SCMP_ACT_ERRNO",
    "architecture": [
    "syscalls": [
            "action": "SCMP_ACT_ALLOW",
            "args": [],
            "name": "read"
            "action": "SCMP_ACT_ALLOW",
            "args": [],
            "name": "execve"
            "action": "SCMP_ACT_ALLOW",
            "args": [],
            "name": "arch_prctl"

Now you can assign this seccomp profile to your container at run:

$ docker run \
--rm \
--security-opt="no-new-privileges" \
--security-opt seccomp=seccomp_profile.json \
hello-world # you can get the following output for docker hello world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
For more examples and ideas, visit:

Becareful to generate seccomp profile with cerber on the same cpu architecture that your production environment (where you want run your container).


  • detect syscalls
  • generate seccomp profile from detected syscalls


$ git clone
$ cd cerber
$ pipenv install pbr
$ pipenv shell # generate a virtual environment
$ python develop # install cerber in development mode
$ pip install -e .[test] # install testing dependencies
$ # make your changes
$ tox



  • install from pypi
  • fix license classifier
  • update changelog


  • adding build badge
  • fix pep8 errors
  • ignore pyc
  • fix pep8 errors
  • adding overview about seccomp
  • adding further readings
  • example on how to use security profil
  • fix filename output on documentation
  • fix install
  • fix contribute guide
  • update usage with seccomp.json file generated
  • use restructuredText for readme instead of markdown
  • packaging + TU + CI
  • introduce CI
  • keep strace statistics
  • add gitignore
  • rename tmpfile and create seccomp profile in a file
  • do not touch stdout and stderr to be transparent on execution
  • further reading and contributors
  • update doc with command
  • pass command to execute to bouncer
  • improve usage
  • rename tool
  • initialize repository

Hervé Beraud <> Sebastien Boyron <>

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cerber, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size cerber-0.3.0-py2.py3-none-any.whl (8.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size cerber-0.3.0.tar.gz (6.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page