Expand description
One command run in a session’s work folder after the session has ended, under the containment
the session’s own commands had: what mur eval run judges a case’s work by.
The check is not part of the session. StagedSession::check_runner captures, before launch,
what the session’s [crate::sandbox::ShellEnforcement] is built from; CheckRunner::run
builds a new enforcement from it once launch_session has returned and every process the
session started is dead. The command, its files and its output reach no trace, no provider
request and no file the agent could read while it ran.
The enforcement is the one runtime::launch_session installs: the same capability policy,
declared floor, host probe and /tmp mapping, so the same shell allowlist, Landlock scope,
seccomp filter, network namespace and resource limits. Only its scope is new: a cgroup scope,
runtime directory and network namespace of its own, each ended or removed when the check
returns. $HOME and $TMPDIR are the session’s home/ and tmp/, as for its commands.
Structs§
- Check
Outcome - What one check did.
- Check
Runner - What a session’s containment was built from, captured before launch, to run a
SessionCheckunder it after the session ends. - Session
Check - A command to run in a session’s work folder once the session has ended.
- Tree
Entry - One entry beneath an operator’s directory tree: an eval case’s
startorcheck.files.
Enums§
- Check
Result - How a check ended.
Constants§
- CHECK_
LOG_ FILE - Where the check’s captured stdout then stderr are written, beneath the session’s records directory.
- CHECK_
OUTPUT_ TAIL_ BYTES - How much of the check’s output
CheckOutcome::output_tailkeeps: the last bytes of stdout followed by stderr.
Functions§
- copy_
tree_ into - Copies the tree at
sourceintoworkdir’s root: directories and regular files, each entry’s permission bits kept, an existing file overwritten. - walk_
tree - Every entry beneath
root, in byte-wise order of the relative path, so a parent comes before what it holds. Read with no link followed: a symbolic link or a special file anywhere in the tree is refused, naming it.