1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//! `bwrap_common` — shared library for the Bubblewrap sandbox backend.
//!
//! - [`bwrap_command`] builds the `bwrap` CLI argument vector from a
//! [`ExecutionRequest`](crate::mxc_common::models::ExecutionRequest). It is
//! platform-agnostic (pure argument generation) so it compiles and is
//! fully unit-tested on every host.
//! - [`bwrap_version`] probes the host `bwrap` and checks it is new enough to
//! understand every flag [`bwrap_command`] emits. Shared by the runner's
//! `validate` and the engine's platform-support probe.
//! - `network_rules` validates rule addresses and builds the egress plan the
//! sandbox's own network namespace is programmed with. Platform-agnostic for
//! the same reason as [`bwrap_command`].
//! - `bwrap_runner` is gated to `target_os = "linux"` since it actually
//! spawns the `bwrap` binary.
pub
/// Forks `bwrap` from a process-lifetime thread (see the module docs).
pub
pub
/// Consumed only by the Linux-gated runner and proxy modules.
pub
/// Shared by the `bwrap` version probe and the proxy dependency walk.
pub
/// Watches the private-namespace network provider for the run's lifetime.
pub
/// Only [`proxy_network::probe_proxy_enforcement`] is reachable outside the
/// crate; every other item stays `pub(crate)`.
pub
pub