Sandboxing untrusted files
Parser sandbox
Running parsers, converters and OCR on customer files inside an isolated environment with no secrets, no network and a kill timeout, so a malicious file cannot reach anything that matters.
In DocSlurpGlossary entry
On this page
Every uploaded PDF, Office file, image or video goes through parsers written in C and C++: poppler, LibreOffice, ImageMagick, ffmpeg, OCR engines. These are large programs with long histories of memory-safety bugs, and a crafted file can exploit one. Sandboxing assumes that will eventually happen and limits what the compromised parser can reach.
A good parser sandbox gives the parser its input file and a scratch directory, and nothing else: no network, no cloud credentials, no database password, no other customer’s files, and a hard time and memory limit. If the parser is taken over, the attacker holds a process that can read one file it already had and write garbage output.
Containers are not the boundary
The common mistake is treating a container, or namespace tools such as bubblewrap, landlock and seccomp, as the security boundary. They share the host kernel, so one kernel bug crosses them. AWS states plainly that “containers are not a security boundary”. The stronger pattern is a VM or microVM per job, such as Firecracker or a dedicated short-lived machine, holding no secrets and with no network beyond what the job needs. Namespaces and seccomp then add depth inside that boundary.
In DocSlurp
The worker runs each parser command through a sandbox provider: bubblewrap (the default on Linux, with network blocked and a seccomp filter), landlock, or Modal, which runs commands in a remote sandbox. It refuses to start in production without a provider unless an operator explicitly overrides that. Bubblewrap and landlock run on the worker’s own host, and a few Node-based parsers run inside the worker process, so on a host that holds secrets they are defense in depth, not a VM boundary. OCR is the exception: it runs only in a fresh, offline, secret-free VM per job, and the worker refuses to start without that VM provider. A per-job, secret-free machine provider for the other parsers is planned. See sandbox providers and platform isolation for what each option isolates.
In DocSlurp
In DocSlurp
The worker runs parser commands through a provider, bubblewrap (the Linux default), landlock or a remote Modal sandbox, and refuses to start in production without one (core/docs/self-host/sandbox-providers.md). Local providers run on the worker host and some Node parsers run in the worker process itself; a per-job, secret-free machine is planned, not shipped. See platform isolation.