Skip to main content

Phobos

Run any program with only the access it was shown to need

You have to run a program you do not trust, and you do not know what it would reach for if you let it? Phobos measures what the program needs, then permits exactly that and denies the rest.

What Phobos does

  • A filesystem boundary enforced by Landlock, with no privilege and no container flag
  • An outbound allow-list supervised by a seccomp connect guard, by address and port
  • Host names enforced by an egress broker that reads the Transport Layer Security host name
  • A wall-clock timeout nothing under it can step out of
  • Self-imposed resource limits on memory, processes, open files, file size and processor time
  • A discovery phase that measures what a program needs instead of guessing

Put a command in the sandbox

inside the run-phase image
${PHOBOS_HOME}/phobos.sh --config exercise.cfg -- ./gradlew test
exercise.cfg
[read]
/srv/data

[connect]
allow 192.0.2.10:443

[limits]
timeout=120
mem_mb=2048