Repository navigation
Commit a87f5a4
committed
sandboy: S0 GitHub-hosted-runner feasibility gate (env allowlist, probe, hostile fixtures)
Scope: Sandboy S0 capability probe for the QODEC Scope N2 sourcing addendum.
Determines whether the existing Sandboy commit (Landlock + seccomp, no VM —
Layer 2 of the isolation ADR) actually confines a hostile process tree on a
standard ubuntu-24.04 GitHub-hosted runner, which supplies the disposable-VM
boundary this gate assumes rather than builds. No third-party repository is
executed, no RepoLogMiner, no microVM layer.
- sandboy: env_clear() + env_allow allowlist before exec — closes a real gap
found while designing the gate's credential-canary test (sandboy previously
passed its full launcher environment straight through to the wrapped
command). Default (no env_allow) is deny-all.
- sandboy: new `probe` subcommand — reuses the same landlock_status/
apply_seccomp code `run` uses against a synthetic default policy, reports
host capability (Landlock ABI/status via both the crate and a raw
landlock_create_ruleset(..., VERSION) syscall, seccomp, no_new_privs,
close_range, kernel/uid/container signals) as JSON. Always exits 0; a
caller decides pass/fail. Distinct from the still-unimplemented `run
--report` (per-step outcome) noted in the README.
- tests/feasibility/: argv-only (no shell strings) synthetic hostile
fixtures — filesystem escape (incl. symlink, unix-socket-bind), seccomp
syscall denial with fork/child/grandchild/compiler-tree-shaped process
trees and an unsandboxed baseline to isolate seccomp's actual
contribution, credential-canary leak scanning, and TCP port-scope network
tests — plus run_gate.py, which also runs the existing tests/demo.sh smoke
and writes sandboy-host-capabilities.json, sandboy-feasibility-report.json,
sandbox-enforcement-matrix.json, and sandboy-feasibility-summary.md.
Documents (without live-testing against a real address) the two
structural network gaps: no UDP coverage, and TCP scoped by port only,
never destination address — so a metadata-endpoint port collision is not
something Landlock can distinguish.
- .github/workflows/sandboy-feasibility-gate.yml: read-only, pinned actions,
no secrets, ubuntu-24.04, injects fake canary env vars, always uploads the
four reports as CI artifacts even when the gate fails.
- policy.rs unit tests for env_allow parsing/default and seccomp_deny
resolution/hard-error-on-unknown-name.
Locally (this dev container) the gate fails closed end-to-end: Landlock is
not implemented in this kernel, so every sandboxed invocation is refused
before it ever execs — which is exactly the scenario this gate exists to
tell apart from a real ubuntu-24.04 runner. Real verification happens in CI.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146FG6sjNiVaQEbCUZkzSy61 parent 53bf05a commit a87f5a4
12 files changed
Lines changed: 1723 additions & 42 deletions
File tree
- .github/workflows
- sandboy
- src
- tests/feasibility
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments