I need to run various text-processing utilities (like latex) on untrusted files, as part of some build script. How can I do that safely, without needing root access? I'm thinking of writing a Python script which "drops privileges/capabilities" before running those utilities so they don't have access to the network and so as to confine their file-writes to one or two subdirectories.
If needed, I could ask the sysadmin to install extra Debian packages.