fix(strict): bind the bundled stdlib and verify strict resources
- Strict child now gets the verified stdlib tree read-only at /run/marqdo-stdlib with MARQDO_STDLIB_DIR set, so Compat-C 打印 works under strict without exposing a host path (ADR-0021 update). - Add a strict-lane negative: resource.open(file) is refused with permission.denied; hello/factorial/multi-module and --json still pass. - StrictHostCommand gains stdlib_dir; CLI discovers the bundle and sandbox binds it; sandbox tests constructors updated. Evidence: G-C lane PASS on the disposable Ubuntu 26.04 VM (7/7 adversarial matrix, positive CLI, strict language-resource refusal, forged marker), plus fmt/clippy/423 local tests.
This commit is contained in:
1 parent
1be4662049
commit
1d87f98539
9 files changed
+65
-4
No files matched your search
@@ -111,6 +111,7 @@ fn run(helper: &Path, project: &Path, outside: &Path, mode: &str) -> StrictOutco
|
||||
original_document: None,
|
||||
output_limit: 64 * 1024,
|
||||
timeout: Duration::from_secs(3),
|
||||
stdlib_dir: None,
|
||||
};
|
||||
launch_strict_capture(&command).unwrap_or_else(|error| panic!("{mode}: {error}"))
|
||||
}
|
||||
@@ -267,6 +268,7 @@ fn strict_supervisor_enforces_memory_cpu_and_output_limits() {
|
||||
original_document: None,
|
||||
output_limit: 64 * 1024,
|
||||
timeout: Duration::from_secs(2),
|
||||
stdlib_dir: None,
|
||||
};
|
||||
let cpu = launch_strict_capture(&command).expect_err("CPU loop must be stopped");
|
||||
let message = cpu.to_string();
|
||||
@@ -283,6 +285,7 @@ fn strict_supervisor_enforces_memory_cpu_and_output_limits() {
|
||||
original_document: None,
|
||||
output_limit: 64 * 1024,
|
||||
timeout: Duration::from_secs(3),
|
||||
stdlib_dir: None,
|
||||
})
|
||||
.expect("output helper should be captured, not spawn-failed");
|
||||
assert!(
|
||||
|
||||
Reference in new issue
Block a user