feat(sandbox): implement probe-gated Linux strict isolation (ADR-0021)
Strict mode now re-executes the CLI inside a Bubblewrap supervisor with user/mount/PID/net/UTS/IPC namespaces, no-new-privs, all capabilities dropped, a read-only /project, private /proc and /dev, rlimits, output capture and wall-clock process-group cleanup. The child verifies PID 1, NoNewPrivs, empty CapEff, an unshared uid map and loopback-only networking before project code. - PlatformCapabilities::detect runs a real bwrap probe; no probe, no strict - strict L1 supports pure Marqdo + Math; Foreign/ABI/worker/kernel/grants/trace are rejected with exit 2 before sandboxing - forged MARQDO_STRICT_ACTIVE is rejected; missing bwrap fails closed - add adversarial helper, 7-test escape/resource matrix, seeded security lane script and self-hosted security workflow - executed G-C lane as uid 1000 in a disposable Ubuntu 26.04 VM: 7/7 PASS plus positive CLI and refusal matrix; evidence in docs/evidence - ADR-0021, spec/security.md, STATUS/COMPATIBILITY/README/CHANGELOG updated; ADR-0019 remains for non-Linux/fail-closed rules
This commit is contained in:
1 parent
9b001a33a5
commit
b6fc18233d
22 files changed
+1886
-132
No files matched your search
@@ -0,0 +1,31 @@
|
||||
name: Linux strict security lane (G-C)
|
||||
|
||||
# This workflow intentionally does NOT run on GitHub-hosted runners. G-C
|
||||
# requires a disposable Ubuntu VM/self-hosted runner with permitted user,
|
||||
# mount, PID and network namespaces and the Bubblewrap AppArmor profile.
|
||||
# A missing runner or a skipped test fails the gate; it is never counted as a
|
||||
# pass. See docs/security-gate.md and ADR-0021.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "17 3 * * 1"
|
||||
|
||||
jobs:
|
||||
strict-security:
|
||||
name: strict isolation escape matrix
|
||||
runs-on: [self-hosted, linux, marqdo-security]
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Host capability report
|
||||
run: |
|
||||
id
|
||||
uname -a
|
||||
systemd-detect-virt --container || true
|
||||
bwrap --version
|
||||
cc --version | head -1
|
||||
cat /proc/self/uid_map
|
||||
findmnt -t cgroup2 || true
|
||||
- name: Run G-C matrix
|
||||
run: ./tests/security/run-lane.sh
|
||||
Reference in new issue
Block a user