Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(storage-bypass): cover chrome windows lock probe exemption

Steven Enamakelceba3eb8005b
diff --git a/scripts/__tests__/storage-bypass.test.mjs b/scripts/__tests__/storage-bypass.test.mjs
index 012459981d..8585795b5a 100644
--- a/scripts/__tests__/storage-bypass.test.mjs
+++ b/scripts/__tests__/storage-bypass.test.mjs
@@ -228,3 +228,13 @@ test("a verbatim copy of an allowlisted line is still a finding", () => {
[[3, 2]],
);
});
+
+ test("Chrome's Windows lock probe is not persisted state; additional writes still fail", () => {
+ const file = `${SRC}/modules/browser_profile.rs`;
+ const probe = "lock.exists() && std::fs::OpenOptions::new().write(true).open(&lock).is_err()";
+ const { status, out } = run({ [file]: probe }, []);
+ assert.equal(status, 0, out);
+ const extra = run({ [file]: `${probe}\nstd::fs::write(path, data);` }, []);
+ assert.equal(extra.status, 1, extra.out);
+ assert.match(extra.out, /New storage-bypass sites/);
+});