Documentation
¶
Overview ¶
Package execguard runs a workload under the sensor and decides about every program it starts, before the program runs.
It is for where there is no eBPF: Fargate, gVisor-less containers that may not load BPF, any host where the sensor cannot run privileged. The sensor becomes the workload's entrypoint (vulnesis-sensor run -- <command>), puts a seccomp filter on the workload that sends every execve and execveat to the sensor through a user notification, and answers each one: continue, or refuse with EPERM. Every other system call runs at full speed; only program starts stop.
Refusing an exec is reversible (the next attempt can be allowed), so guard mode may hold one, unlike stopping a running process.
Two limits, stated plainly:
- The path is read from the workload's memory while it waits. A workload with a second thread can change that memory between the check and the kernel's own read. This is a policy control for software that is not already hostile, not a sandbox against code that is.
- It needs no privilege beyond NO_NEW_PRIVS, which also means a setuid binary in the workload no longer gains privileges when it runs.
Index ¶
Constants ¶
const ChildEnv = "__VULNETIX_EXECGUARD_CHILD"
ChildEnv marks the re-executed sensor that installs the filter and then becomes the workload.
Variables ¶
This section is empty.
Functions ¶
func MaybeChild ¶
func MaybeChild()
MaybeChild runs the child half when this process is the re-executed sensor. Call it first thing in main; it does not return in the child.