tiny.sandbox.execute
Defined in run.
Executes a run plan within a disposable layer directory, returning a Result that owns captured standard streams, the detected change set, an Audit record, and the layer directory handle.
Source
Source: lib/sandbox/src/run.zig:37
zig
/// Executes a run plan within a disposable layer directory, returning a/// `Result` that owns captured standard streams, the detected change set, an/// `Audit` record, and the layer directory handle.////// Before launching the child process, `execute` checks the selected runner/// capabilities against the policy requested in `plan`, returning an error if a/// required setting is unsupported. A child process that exits with a nonzero/// status code produces a successful `Result` carrying that status. The error/// union instead covers refused policies along with host setup, execution, and/// data collection failures.////// Callers inspect changes to the layer through the change set. Each entry can/// describe a file, directory, or symbolic link, recording either a path to/// create or replace using the `put` operation or a path to remove using the/// `delete` operation. The library reads the source to prepare the layer and/// reports changes, but it does not automatically apply changes back to the/// source. An unconfined child may independently write external paths on the/// host.pub fn execute(allocator: Allocator, plan: plan_data.Plan) !Result { try plan.policy.validate(expectedAudit(plan)); return switch (plan.runner) { .staging => executeStaging(allocator, plan), .bubblewrap_overlay => bwrap.execute(allocator, plan), .macos_staging => macos.execute(allocator, plan), .windows_staging => windows.execute(allocator, plan), };}Source: lib/sandbox/src/root.zig:67
zig
pub const execute = run.execute;Complete caller list
17 direct callers.
lib.sandbox.src.run.test_run_can_execute_a_materialized_relative_program[function] — test source atlib/sandbox/src/run.zig:257in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_can_replace_the_child_environment[function] — test source atlib/sandbox/src/run.zig:282in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_cleans_disposable_layer_after_output_limit_failure[function] — test source atlib/sandbox/src/run.zig:456in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_cleans_disposable_layer_after_timeout[function] — test source atlib/sandbox/src/run.zig:493in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_cleans_writes_one_level_above_the_materialized_root[function] — test source atlib/sandbox/src/run.zig:474in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_executes_in_disposable_layer_and_records_file_changes[function] — test source atlib/sandbox/src/run.zig:97in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_honors_relative_command_cwd_inside_disposable_layer[function] — test source atlib/sandbox/src/run.zig:186in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_isolates_a_connected_caller_descriptor_without_mutating_its_owner[function] — test source atlib/sandbox/src/run.zig:376in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_records_generated_files_regardless_of_the_source_file_limit[function] — test source atlib/sandbox/src/run.zig:539in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_records_generated_symlink_as_filesystem_delta[function] — test source atlib/sandbox/src/run.zig:138in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_rejects_cwd_paths_outside_the_disposable_layer[function] — test source atlib/sandbox/src/run.zig:215in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_rejects_cwd_symlinks_outside_the_disposable_layer[function] — test source atlib/sandbox/src/run.zig:235in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_rejects_unmet_network_isolation_before_command_execution[function] — test source atlib/sandbox/src/run.zig:323in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_rejects_unmet_process_isolation_before_command_execution[function] — test source atlib/sandbox/src/run.zig:308in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_requires_a_proven_bubblewrap_network_namespace[function] — test source atlib/sandbox/src/run.zig:341in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_returns_nonzero_status_without_discarding_filesystem_changes[function] — test source atlib/sandbox/src/run.zig:165in nearest public ownertiny.sandbox.runlib.sandbox.src.run.test_run_skips_oversized_source_files_instead_of_failing_staging[function] — test source atlib/sandbox/src/run.zig:510in nearest public ownertiny.sandbox.run
Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |