1mod backend;
12mod compose;
13mod credentials;
14mod deny_glob;
15mod egress_proxy;
16mod error;
17mod null;
18mod process_guard;
19mod worktree;
20
21#[cfg(all(unix, feature = "kernel"))]
22mod child_net;
23#[cfg(all(unix, feature = "kernel"))]
24mod map_caps;
25#[cfg(all(unix, feature = "kernel"))]
26mod sandbox_child;
27
28#[cfg(all(feature = "kernel", target_os = "linux"))]
29mod bwrap;
30
31#[cfg(windows)]
32mod windows_sandbox;
33#[cfg(windows)]
34mod windows_appcontainer;
35
36mod local_process;
37
38pub use backend::{
39 BackendInfo, EnforceBackend, ProcessExit, SpawnRequest, SpawnedProcess, StdioMode,
40 TerminationReason,
41};
42pub use compose::{
43 local_process, local_process_confined, process_guard, worktree_sandboxed, worktree_soft,
44};
45pub use credentials::{
46 grant_names, inject_into_env, resolve_credentials, revoke_resolved, CredentialSourceKind,
47 ResolvedCredential,
48};
49pub use deny_glob::{
50 expand_deny_globs, glob_to_seatbelt_regex, path_matches_deny_glob, DENY_GLOB_MAX_MATCHES,
51};
52pub use egress_proxy::{EgressProxy, EGRESS_PROXY_PORT_ENV};
53pub use error::{EnforceError, EnforceResult};
54pub use local_process::{LocalProcessBackend, LocalProcessOptions};
55pub use null::NullBackend;
56pub use process_guard::{soft_fs_allowed, soft_fs_resolve, ProcessGuardBackend};
57pub use worktree::{WorktreeBackend, WorktreeOptions};
58
59#[cfg(all(unix, feature = "kernel"))]
60pub use map_caps::{policy_to_capability_set, MapOptions};
61
62#[cfg(all(unix, feature = "kernel"))]
63pub use sandbox_child::{
64 apply_kernel_here, apply_policy_file_and_ready, prepare_kernel, write_spawn_policy_file,
65};
66
67#[cfg(windows)]
68pub use windows_sandbox::{
69 capability_summary as windows_capability_summary, job_objects_supported,
70 try_create_restricted_token, Job as WindowsJob, WindowsSandboxOptions,
71};
72
73#[cfg(windows)]
74pub use windows_appcontainer::{
75 appcontainer_supported, delete_profile as delete_appcontainer_profile, AppContainerProfile,
76 NativeChild as WindowsNativeChild,
77};