diff options
| author | tv <tv@krebsco.de> | 2026-12-01 01:59:16 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-01 02:20:48 +0000 |
| commit | 95785181465a58dd6954ff0f81f29a1761e57a28 (patch) | |
| tree | 0d2a0c70dae0100f8eb471f990a4621affb76749 /src/plan.rs | |
| parent | 2aea62bd55e5d8703f70710734d30f8d6cb925be (diff) | |
enstate: validators and renderers in a sandbox
By bubblewrap: everything read-only but OUT (and IN bound again after a
fresh /tmp), a new /dev and /proc, namespaces of their own (no network),
no capabilities, a new session, gone with the receptor. The setting
sandbox is bwrap (found in the receptor's PATH, as the programs'
environment is empty), or none; the module sets its bubblewrap. The
tests run their programs in it where bubblewrap can make one (not in
Nix's build sandbox), and a test checks that a program can't write
outside OUT, nor into IN, and has no network nor environment.
Diffstat (limited to 'src/plan.rs')
| -rw-r--r-- | src/plan.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plan.rs b/src/plan.rs index 12c91b6..495d67c 100644 --- a/src/plan.rs +++ b/src/plan.rs @@ -278,7 +278,7 @@ pub fn plan(schema: &Schema, store: &Store, submission: &Submission) -> Result<P Role::Validator, &validator.name, &given, - &store.scratch(), + &store.runner(), ) { Ok(outcome) => outcome, Err(error) => match error.downcast::<ProgramFailed>() { @@ -353,7 +353,7 @@ pub fn plan(schema: &Schema, store: &Store, submission: &Submission) -> Result<P entries.insert(channel, &candidate); for (name, view_spec) in schema.views_of(Some(channel)) { let secret = schema.view_is_secret(view_spec); - let rendered = match view::render(schema, name, view_spec, &entries, &store.scratch()) { + let rendered = match view::render(schema, name, view_spec, &entries, &store.runner()) { Ok(rendered) => rendered, Err(error) => match error.downcast::<ProgramFailed>() { Ok(failed) => { |
