docs(security): record CM-A11 strict resource verification
- Checked-in raw G-C lane log for00bdcad: 7/7 adversarial helper matrix, positive CLI (Compat-C print via bundled stdlib), strict file-resource refusal, external-surface rejection, forged-marker rejection, lane PASS. - Evidence documents the read-only /run/marqdo-stdlib bind, strict stdio-only policy, refused file/TCP/provider resources, and the remaining no-CI-URL / Windows/macOS limits. - STATUS updated to the current 426-test gate and00bdcadstrict result. Gate: fmt, clippy -D warnings, 426 tests passed; VM lane PASS.
This commit is contained in:
1 parent
00bdcad1ff
commit
67a6d35daf
3 files changed
+107
-11
No files matched your search
@@ -0,0 +1,23 @@
|
||||
== adversarial helper matrix ==
|
||||
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.90s
|
||||
Running tests/security_linux.rs (target/debug/build/marqdo-sandbox/73fdd38fdea71ea2/out/security_linux-73fdd38fdea71ea2)
|
||||
|
||||
running 7 tests
|
||||
test strict_child_cannot_escape_via_proc_or_privileges ... ok
|
||||
test strict_child_cannot_reach_the_network ... ok
|
||||
test strict_child_cannot_read_host_files_but_reads_the_project ... ok
|
||||
test strict_child_cannot_write_outside_or_into_the_project ... ok
|
||||
test strict_child_identity_is_unprivileged_and_namespaced ... ok
|
||||
test strict_supervisor_enforces_fd_and_process_limits ... ok
|
||||
test strict_supervisor_enforces_memory_cpu_and_output_limits ... ok
|
||||
|
||||
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 7.80s
|
||||
|
||||
== build CLI ==
|
||||
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.67s
|
||||
strict mechanism: bubblewrap 0.11.1 (user/mount/PID/net/UTS/IPC namespaces + no-new-privs + rlimits)
|
||||
== positive CLI contract ==
|
||||
== strict language resources are console-only ==
|
||||
== external-execution surfaces are refused ==
|
||||
== forged active marker is rejected ==
|
||||
G-C security lane: PASS
|
||||
@@ -0,0 +1,69 @@
|
||||
# RFC-CM CM-A11 evidence: strict resource verification
|
||||
|
||||
Date: 2026-11-20 (Asia/Shanghai)
|
||||
Repository: `marqdo-cli`
|
||||
Source under test: `git archive 00bdcad` (current HEAD)
|
||||
Related: [ADR-0021](../adr/0021-linux-strict-isolation.md),
|
||||
[ADR-0030](../adr/0030-print-compat-b-routing.md),
|
||||
[ADR-0034](../adr/0034-tcp-resource-endpoint.md),
|
||||
[STATUS §1](../STATUS.md).
|
||||
Raw lane log: [`2026-11-20-strict-resource-cm-a11.log`](2026-11-20-strict-resource-cm-a11.log)
|
||||
|
||||
## Environment
|
||||
|
||||
Ubuntu 26.04 disposable QEMU/TCG VM, kernel 7.0.0-43-generic, ordinary user
|
||||
`dev` (uid 1000), `systemd-detect-virt --container` = `none`, bubblewrap
|
||||
0.11.1 with the packaged `bwrap-userns-restrict` profile. The dev container
|
||||
cannot create namespaces, so this is VM-only evidence.
|
||||
|
||||
## What was verified
|
||||
|
||||
```text
|
||||
./tests/security/run-lane.sh
|
||||
adversarial helper matrix: 7 passed, 0 failed, 0 ignored
|
||||
positive CLI contract: PASS
|
||||
strict language resources are console-only: PASS
|
||||
external-execution surfaces refused: PASS
|
||||
forged active marker rejected: PASS
|
||||
G-C security lane: PASS
|
||||
```
|
||||
|
||||
The 7-test helper matrix covers: no host-file reads beyond `/project`, no
|
||||
writes outside or into the project, no network, unprivileged namespaces, no
|
||||
capability escalation, fd/process limits, and memory/CPU/output limits.
|
||||
|
||||
The positive CLI contract runs `hello` (Compat-C `打印` through the bundled
|
||||
stdlib), `factorial --mode strict`, multi-module, and `--json`.
|
||||
|
||||
The new strict-resource check runs a `.mq.md` program that calls
|
||||
`resource.open("file", "README.md", ["read"])` under `--mode strict`; the run
|
||||
must be non-zero and the diagnostic must contain `permission.denied`. The
|
||||
bundled stdlib is bind-mounted read-only at `/run/marqdo-stdlib` and its digest
|
||||
is still verified in the child; this grants no new OS capability.
|
||||
|
||||
## Policy verified in code/tests
|
||||
|
||||
* Strict permits only `stdio/stdout` with console grant.
|
||||
* Strict refuses project-file, TCP and registered-provider resource kinds;
|
||||
`pure` refuses file/TCP/providers too.
|
||||
* `--allow-read/--allow-write/--allow-foreign/--allow-plugin/--allow-net/
|
||||
--trace-file/--kernel/--trust-native-plugin` are rejected at the strict L1
|
||||
flag boundary.
|
||||
* Strict permits the read-only bundled stdlib so `打印` works; file/network/
|
||||
process/device remain refused.
|
||||
* TCP is project-only and strict refuses it (host tests), so the new TCP
|
||||
endpoint does not widen strict L1.
|
||||
|
||||
## Gate
|
||||
|
||||
Local container: fmt/clippy/426 tests PASS. VM: 7/7 adversarial + full lane
|
||||
PASS. Log is checked in; this is a **local VM lane**, not a self-hosted GitHub
|
||||
Actions security URL and not Windows/macOS evidence.
|
||||
|
||||
## Limits
|
||||
|
||||
* No remote CI URL for `00bdcad`; G-C remains VM-verified, not CI-signed.
|
||||
* Windows/macOS strict behavior is not exercised here.
|
||||
* Strict L2 (Worker/Foreign/native plugin under real isolation) is still not
|
||||
implemented; L1 refuses those surfaces.
|
||||
* TCP/HTTP/DNS under strict are refused rather than isolated.
|
||||
Reference in new issue
Block a user