ci: add platform sandbox parity smoke
ober
5f6db3d0a3d6b593abf0448fdedc436d55d4bfeb
new file mode 100644 --- /dev/null +++ b/.builds/ci-freebsd.yml @@ -0,0 +1,19 @@ +image: freebsd/14.x +arch: amd64 +packages: +- bash +- ca_root_nss +- curl +- git +- gmake + +sources: +- https://git.sr.ht/~lisp/jerboa + +tasks: +- capsicum-platform-tests: | + cd jerboa + gmake build + .chez/bin/scheme --libdirs lib:vendor/jsqlite/src --script tests/test-capsicum.ss + .chez/bin/scheme --libdirs lib:vendor/jsqlite/src --script tests/test-seatbelt.ss + .chez/bin/scheme --libdirs lib:vendor/jsqlite/src --script tests/test-worker.ss new file mode 100644 --- /dev/null +++ b/.github/workflows/platform-sandbox.yml @@ -0,0 +1,33 @@ +name: Platform Sandbox + +on: + workflow_dispatch: + pull_request: + paths: + - '.github/workflows/platform-sandbox.yml' + - 'lib/std/os/**' + - 'lib/std/security/**' + - 'tests/test-seatbelt.ss' + - 'tests/test-worker.ss' + push: + branches: [master] + paths: + - '.github/workflows/platform-sandbox.yml' + - 'lib/std/os/**' + - 'lib/std/security/**' + - 'tests/test-seatbelt.ss' + - 'tests/test-worker.ss' + +jobs: + macos-seatbelt: + runs-on: macos-14 + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + + - name: Build Scheme libraries + run: make build + + - name: Run Seatbelt platform tests + run: | + .chez/bin/scheme --libdirs lib:vendor/jsqlite/src --script tests/test-seatbelt.ss + .chez/bin/scheme --libdirs lib:vendor/jsqlite/src --script tests/test-worker.ss --- a/docs/kimi3-security-recommmendations.md +++ b/docs/kimi3-security-recommmendations.md @@ -894,8 +894,9 @@ Chez cannot heap-cap a thread; `run-safe-eval` rightly refuses path/exec/no-network profiles on macOS. On FreeBSD, the standard worker-eval helper enters Capsicum before reading stdin or evaluating the supplied expression for - supported `fs`/`exec`/`net`/`capsicum` axes. Arbitrary-command/proxy-aware - Capsicum parity and per-platform CI parity remain open. + supported `fs`/`exec`/`net`/`capsicum` axes. Per-platform CI parity now has a + macOS Seatbelt worker smoke workflow and a SourceHut FreeBSD Capsicum worker + smoke manifest. Arbitrary-command/proxy-aware Capsicum parity remains open. ### K3-P1-09 — Confused-deputy defenses: capability plans enforced at runtime **Serves:** G2. **Effort:** 1 week. --- a/docs/status.md +++ b/docs/status.md @@ -27,7 +27,7 @@ release artifacts are built as Jerboa multicall binaries with `jerboa`, | Kimi security handoff | [kimi3-security-recommmendations.md](kimi3-security-recommmendations.md) is the backlog. Dated evidence and review manifests live under [reviews/](reviews/). | Keep new security evidence in dated review records and summarize the current release state here. | | FFI audit phase 5 | [ffi-audit.md](ffi-audit.md) records the scanner output, provisional Scheme binding verdicts, and native Rust export inventory. `make native-export-review-check` gates native export decisions. The worker-launch native path in `aproc.rs`/`seccomp.rs`, crypto FFI buffer path in `crypto.rs`, secure-memory region lifecycle in `secure_mem.rs`, secure filesystem capability boundary in `secure_fs.rs`, TLS native ABI in `tls.rs`, Ed25519/X25519 key-agreement buffers, compression buffers, HTTP parse/writev boundary, embed-crypto ABI, integrity ABI, regex-native ABI, process-control ABI, pcap ABI, inotify ABI, epoll/eventfd ABI, antidebug ABI, SOCKS5 server ABI, PostgreSQL native ABI, Landlock native ABI, wasmi sandbox ABI, SpiderMonkey WASM ABI, DuckDB native ABI, X.509 native ABI, SQLite native ABI, and the Scheme Seatbelt `sandbox_init` error-buffer paths now have nearby `SAFETY:` comments or equivalent checked FFI invariants. Generated counts are at 0 unannotated native unsafe sites and 0 Scheme blocking bindings missing `__collect_safe`. | Finish per-binding Scheme FFI review and targeted scanner rules for the remaining provisional verdicts. | | Native Rust exports | The native export review now has 190 exported functions: 183 tracked Scheme references and 7 retained standalone C/binary helpers. The previous 35 no-Scheme-reference removal candidates no longer have C ABI export markers. | Re-run `make native-export-review-check` whenever adding or removing native exports. | -| Confined worker | `(std security worker)` provides the facade, audit lifecycle, output caps, deadlines, process-group kill, memory rlimit pre-exec setup, Linux syscall/ptrace seccomp pre-exec setup, Linux Landlock filesystem/TCP-connect setup for requested axes, macOS Seatbelt deny-default path/exec/no-network setup for supported axes, standard worker-eval Capsicum entry on FreeBSD, explicit sandbox-axis refusal, and egress proxy env wiring. | Keep Linux/macOS/FreeBSD parity tests current; finish arbitrary-command/proxy-aware Capsicum worker paths. | +| Confined worker | `(std security worker)` provides the facade, audit lifecycle, output caps, deadlines, process-group kill, memory rlimit pre-exec setup, Linux syscall/ptrace seccomp pre-exec setup, Linux Landlock filesystem/TCP-connect setup for requested axes, macOS Seatbelt deny-default path/exec/no-network setup for supported axes, standard worker-eval Capsicum entry on FreeBSD, explicit sandbox-axis refusal, egress proxy env wiring, and platform CI smoke for Linux/macOS/FreeBSD sandbox paths. | Keep Linux/macOS/FreeBSD parity tests current; finish arbitrary-command/proxy-aware Capsicum worker paths. | | Fuzzing | `tests/fuzz/corpus/` has 15 checked-in seed inputs, `tests/fuzz/regression/` has 11 crash/rejection regressions, `make fuzz-smoke` runs the deterministic regression gate first, and GitHub CI runs smoke fuzzing normally plus deep fuzzing on scheduled daily runs. | Keep adding minimized corpus and regression inputs for every parser/security bug found. | | Safe surface | Direct scripts default to the safe prelude; raw access requires `--unsafe-prelude` or `(jerboa prelude unsafe)`. | Continue moving risky APIs behind explicit unsafe imports as new modules land. |