Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
163 lines (138 loc) · 4.69 KB
/
Copy pathCargo.toml
File metadata and controls
163 lines (138 loc) · 4.69 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
[workspace]
members = [".", "nodejs", "shim"]
# Lints are configured once for the workspace so the library, the CLI and the
# Node bindings are all held to the same standard.
# Release profile lives at the workspace root; cargo ignores profiles declared
# by non-root members.
[profile.release]
lto = true
strip = "symbols"
[workspace.lints.rust]
missing_docs = "warn"
unsafe_op_in_unsafe_fn = "warn"
[workspace.lints.clippy]
# Correctness and clarity, tuned for a crate whose job is enforcing boundaries.
undocumented_unsafe_blocks = "warn"
missing_panics_doc = "warn"
unwrap_used = "warn"
todo = "warn"
unimplemented = "warn"
dbg_macro = "warn"
print_stdout = "warn"
print_stderr = "warn"
[workspace.lints.cargo]
unused_dependencies = "deny"
[package]
name = "heel"
version = "0.10.7"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "Cross-platform native sandboxing library for running untrusted code"
repository = "https://github.com/May-Agent/heel"
keywords = ["sandbox", "security", "isolation", "python", "venv"]
categories = ["os", "development-tools"]
[[bin]]
name = "heel"
path = "src/bin/heel/main.rs"
[[example]]
name = "ipc_commands"
required-features = ["shim"]
[features]
default = ["python", "shim"]
python = ["which"]
# Embeds the `heel-shim` executable, which sandboxed processes run to call host
# commands. `SandboxConfigBuilder::ipc`, `IpcCommands::write_shims` and
# `heel shims` need it; `direct_ipc` and `external_ipc` do not.
shim = []
[lints]
workspace = true
[dependencies]
# The IPC wire protocol and client, shared with the `heel-shim` executable.
heel-shim = { path = "shim", version = "0.1.0" }
clap = { version = "4", features = ["derive", "env"] }
# Serialization for IPC
serde = { version = "1", features = ["derive"] }
serde_json = "1"
rmp-serde = "1"
toml = "0.8"
# Error handling
thiserror = "2"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-appender = "0.2"
humantime = "2"
# HTTP proxy
hyper = { version = "1", features = ["http1", "server", "client"] }
http-body-util = "0.1"
bytes = "1.11.1"
# Runtime-agnostic async (smol-based by default)
executor-core = { version = "0.7", features = ["smol", "std"] }
async-net = "2"
futures-lite = "2"
blocking = "1"
smol = "2"
# Compile-time templates
askama = "0.12"
# I/O polling for non-blocking operations
polling = "3"
# Random number generation
rand = "0.8"
# Directory operations
remove_dir_all = "0.8"
smol-hyper = "0.1.1"
async-channel = "2.5.0"
interprocess = { version = "2", default-features = false }
dunce = "1.0.5"
# Unix process management
[target.'cfg(unix)'.dependencies]
libc = { version = "0.2.191", default-features = false }
# `getpriority` reports failure through errno, and -1 is also a valid nice
# value, so the call needs errno cleared and read rather than guessed at.
errno = "0.3"
# PTY support for interactive shells
[target.'cfg(target_os = "macos")'.dependencies]
pty-process = "0.5"
crossterm = "0.29"
# Python executable detection (optional)
[dependencies.which]
version = "7"
optional = true
# Linux-specific dependencies
[target.'cfg(target_os = "linux")'.dependencies]
landlock = "0.4.7"
seccompiler = { version = "0.5", default-features = false }
# The broker performs creation-class calls itself and resolves paths against
# held directory descriptors; rustix gives those calls a typed, safe surface.
# The process supervisor reaps, signals and polls through the same crate.
rustix = { version = "1.1.6", default-features = false, features = ["event", "fs", "net", "process", "std"] }
# Windows-specific dependencies
[target.'cfg(target_os = "windows")'.dependencies]
# The AppContainer backend resolves programs on PATH before granting them;
# unlike Python detection this is not optional there.
which = "7"
# The Win32 calls the AppContainer backend makes directly: profiles, SIDs and
# ACLs, the loopback exemption, job objects, and the attributed launch.
windows = { version = "0.62", features = [
"Win32_Foundation",
"Win32_NetworkManagement_WindowsFirewall",
"Win32_Security",
"Win32_Security_Authorization",
"Win32_Security_Isolation",
"Win32_Storage_FileSystem",
"Win32_System_Com",
"Win32_System_Console",
"Win32_System_JobObjects",
"Win32_System_Memory",
"Win32_System_SystemServices",
"Win32_System_Threading",
] }
[build-dependencies]
# The version of the shim the build script embeds.
heel-shim = { path = "shim", version = "0.1.0" }
[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
executor-core = { version = "0.7", features = ["tokio"] }
tempfile = "3"
# Surfaces the launcher's own diagnostics when a Windows test fails.
tracing-subscriber = { version = "0.3", features = ["fmt"] }