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
[]
= "codecalc-exec"
= "0.3.0"
= "2024"
# Declared, not merely implied. rust-toolchain.toml pins 1.97.1 for anyone
# building IN this repo, but it is not Cargo metadata and does not reach a
# crate that depends on this one — that needs `rust-version`, which was absent.
# A crates.io consumer on an older toolchain therefore got no MSRV signal at
# all and would have hit a raw compile error instead of Cargo's named one.
# 1.97 matches what README.md already tells people to install; edition 2024
# itself only needs 1.85, so this floor is set by the repo, not by the edition.
= "1.97"
= "Sandboxed multi-language executor core for codecalc (Rust)"
# Must match pyproject.toml and LICENSE — scripts/check_claims.py gates this.
# Was "MIT" while the repo LICENSE and pyproject disagreed: the crate
# compiles into bin/codecalc-exec, which is distributed, so the two cannot differ.
= "Apache-2.0"
# crates.io warns without these, and the warning is worth heeding for THIS
# crate specifically: it compiles into the binary that runs untrusted code, so
# the first thing anyone evaluating it should be able to do is find the source
# and the audit. A crates.io page with no repository link makes that harder
# than it needs to be.
= "https://github.com/The-40-Thieves/codecalc"
= "https://github.com/The-40-Thieves/codecalc"
= ["sandbox", "executor", "mcp", "rlimit", "seccomp"]
= ["command-line-utilities", "development-tools"]
[]
= "1"
# Platform sandboxing is genuinely different per OS, so the bindings are scoped
# rather than pulled in everywhere: rlimits + wait4 + killpg on Unix, Job Objects
# on Windows. See src/platform/.
[]
= "0.2"
[]
= { = "0.61", = [
"Win32_Foundation",
# CreateJobObjectW takes a SECURITY_ATTRIBUTES pointer, so it is gated behind
# this feature even though we pass null. Also carries SECURITY_CAPABILITIES,
# SID_AND_ATTRIBUTES, PSID/ACL and FreeSid for the THE-829 AppContainer path.
"Win32_Security",
# THE-829 (OFF by default, UNVERIFIED on real Windows 11): least-privilege
# AppContainer profile create/derive/delete lives here...
"Win32_Security_Isolation",
# ...and the explicit-ACL grant (SetNamedSecurityInfoW / SetEntriesInAclW,
# EXPLICIT_ACCESS_W, TRUSTEE_W) that hands only the workdir to the AC SID.
"Win32_Security_Authorization",
"Win32_System_JobObjects",
"Win32_System_Threading",
# Thread32First/Next. The child is created suspended and assigned to the job
# before its first instruction, but `std::process::Command` does not expose
# the initial thread handle, so the thread to resume is found by snapshotting
# and filtering on the owning PID. See platform/windows.rs::resume_process.
"Win32_System_Diagnostics_ToolHelp",
# FILE_ATTRIBUTE_REPARSE_POINT — the zero-length-stub fallback in
# resolve_command_program refuses a Store app-execution alias reached by a
# path form the Microsoft\WindowsApps name match misses (THE-818).
"Win32_Storage_FileSystem",
] }
# ── Older-computer optimizations ──────────────────────────────────────────
# - target-cpu=generic: no modern instruction-set requirements (runs on any
# x86_64/aarch64 CPU from the last ~15 years). Rust's default is already
# generic, but pinned explicitly via .cargo/config.toml so a host-specific
# -C flag can't leak in.
# - opt-level="z": prioritize binary size over speed — this binary spawns
# children and does no hot loops, so size is what matters.
# - lto + codegen-units=1 + panic=abort: maximize cross-crate inlining and
# drop unwind machinery, shrinking the binary further.
# - strip=true: no debug symbols.
# - overflow-checks=false: release-mode arithmetic without panics (matches
# the Python fallback's behavior; nothing here trusts user integers).
[]
= "z"
= true
= 1
= "abort"
= true
= false