pub struct Unconfined { /* private fields */ }Expand description
Runs commands on this machine, with no isolation whatsoever.
§Read this before using it
This is not a sandbox. A command run through it has whatever access the BoundGraph process itself has: the whole filesystem, the network, the environment of whatever started it. If the command decides to delete the workspace, it will.
What it actually enforces is three things:
- the working directory is the command’s workspace,
- the process is killed at the timeout,
- the child’s environment is cleared except for the few variables a toolchain cannot start without.
And what it refuses is everything else: any grant beyond reading under
the workspace and executing the named program is
SandboxError::Unenforceable. It cannot make a net:egress grant
true, so it will not accept one.
It exists because the compile and test checkers are useful now and
feature 09 is not written yet, and it is named Unconfined so that
nobody reads a flow definition containing it and thinks otherwise.
Implementations§
Source§impl Unconfined
impl Unconfined
Sourcepub fn passing_through(self, name: impl Into<String>) -> Self
pub fn passing_through(self, name: impl Into<String>) -> Self
Also pass name through to the child.
For a toolchain that needs one — CARGO_HOME, RUSTUP_HOME,
VIRTUAL_ENV. Every addition is a way for something the checker was
not granted to reach the child, so add them one at a time and
knowingly.