@ai-ecoverse/slicc-browsers 1.39.0 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/bfcache-restore.mjs +123 -6
- package/guard-runner.mjs +1 -0
- package/guard-vectors.json +2 -1
- package/package.json +3 -3
- package/schema/guard-vectors.schema.json +6 -0
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ slicc-browsers = { version = "1", features = ["corpus"] }
|
|
|
65
65
|
| `serde` | typed `Catalog`, `catalog()`, `Catalog::browser` and `Catalog::priority` |
|
|
66
66
|
| `corpus` | the vectors (`CORPUS`, `PROTECTED`, `GUARD_VECTORS`, `DEBUGGER_STAGE1`) and the modules `corpus`, `protected`, `guard` and `debugger_stage1`, for tests |
|
|
67
67
|
|
|
68
|
-
Every feature builds for `wasm32-wasip1`.
|
|
68
|
+
Every feature builds for `wasm32-wasip1`.
|
|
69
69
|
|
|
70
70
|
### npm
|
|
71
71
|
|
|
@@ -209,7 +209,7 @@ const fixture = await fixtureServer();
|
|
|
209
209
|
const execution = await run(set, {
|
|
210
210
|
clientFactory: (row) => connectGuardAndObserver(row),
|
|
211
211
|
targets: originsFor(fixture),
|
|
212
|
-
capabilities: { autoAttach: true, browserSession: true
|
|
212
|
+
capabilities: { autoAttach: true, browserSession: true },
|
|
213
213
|
parallel: 4,
|
|
214
214
|
fixture,
|
|
215
215
|
});
|
|
@@ -237,6 +237,7 @@ You supply:
|
|
|
237
237
|
| `extensionFrame` | host the harness extension frame an ordinary test page embeds |
|
|
238
238
|
| `clientExit` | close the guarded client mid-row |
|
|
239
239
|
| `siteIsolationOff`, `inboundDelay`, `forwardAudit` | no site isolation; hold inbound; audit forwarded commands |
|
|
240
|
+
| `frameOwnershipProbe` | forward only `DOM.getDocument` then `DOM.disable` during a restore, never the reply |
|
|
240
241
|
| `secureOrigin` | HTTPS origins (service workers) |
|
|
241
242
|
| `stockSetup`, `syntheticAutoAttach` | admit stock clients' setup calls; synthesize auto-attach |
|
|
242
243
|
| `explicitAttach` | attach only explicitly (no init-script check on a popup's first document) |
|
package/bfcache-restore.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { createObserverTarget } from './observer-target.mjs';
|
|
|
3
3
|
import { containsSecret } from './redirect-secret.mjs';
|
|
4
4
|
|
|
5
5
|
const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
6
|
+
const graceMs = 400;
|
|
6
7
|
const refusal = (out) =>
|
|
7
8
|
!out.ok &&
|
|
8
9
|
/^(slicc: refused:)|session.*(closed|not found)|no session|target.*closed/i.test(
|
|
@@ -26,6 +27,21 @@ const methods = [
|
|
|
26
27
|
'Page.captureScreenshot',
|
|
27
28
|
'IO.read',
|
|
28
29
|
];
|
|
30
|
+
const plain = (item) => item !== null && typeof item === 'object' && !Array.isArray(item);
|
|
31
|
+
const ownershipRead = (command) =>
|
|
32
|
+
command.method === 'DOM.getDocument' &&
|
|
33
|
+
plain(command.params) &&
|
|
34
|
+
Object.keys(command.params).length === 2 &&
|
|
35
|
+
command.params.depth === -1 &&
|
|
36
|
+
command.params.pierce === true;
|
|
37
|
+
const ownershipRelease = (command) =>
|
|
38
|
+
command.method === 'DOM.disable' &&
|
|
39
|
+
(command.params === undefined ||
|
|
40
|
+
(plain(command.params) && Object.keys(command.params).length === 0));
|
|
41
|
+
const ledgerEntry = (command) =>
|
|
42
|
+
plain(command) &&
|
|
43
|
+
typeof command.method === 'string' &&
|
|
44
|
+
(command.params === undefined || plain(command.params));
|
|
29
45
|
|
|
30
46
|
async function bounded(work, ms) {
|
|
31
47
|
let timer;
|
|
@@ -44,7 +60,7 @@ class Restore {
|
|
|
44
60
|
this.url = `${this.protectedOrigin}/bfcache?n=${encodeURIComponent(`${this.tag}-p`)}`;
|
|
45
61
|
this.result = { probes: [], delay: { requestedMs: this.delayMs } };
|
|
46
62
|
this.missing = [];
|
|
47
|
-
this.pending =
|
|
63
|
+
this.pending = new Map();
|
|
48
64
|
this.probeId = 0;
|
|
49
65
|
}
|
|
50
66
|
|
|
@@ -214,7 +230,8 @@ class Restore {
|
|
|
214
230
|
const out = await bounded(work, Math.min(this.budget, 250));
|
|
215
231
|
this.answer(record, out);
|
|
216
232
|
record.windowOutcome = record.outcome;
|
|
217
|
-
this.pending.
|
|
233
|
+
this.pending.set(
|
|
234
|
+
record,
|
|
218
235
|
outcome(work).then((answer) => {
|
|
219
236
|
this.answer(record, answer);
|
|
220
237
|
record.answeredAt = Date.now();
|
|
@@ -309,6 +326,7 @@ class Restore {
|
|
|
309
326
|
options: { disableCache: true, includeCredentials: false },
|
|
310
327
|
});
|
|
311
328
|
this.stream = resource.result?.resource?.stream;
|
|
329
|
+
if (this.frameOwnershipProbe) await this.firstProbe();
|
|
312
330
|
this.result.probeStartedAt = Date.now();
|
|
313
331
|
do {
|
|
314
332
|
await this.round();
|
|
@@ -331,20 +349,100 @@ class Restore {
|
|
|
331
349
|
}
|
|
332
350
|
|
|
333
351
|
async settleProbes() {
|
|
352
|
+
this.grace = this.held().some((probe) => probe.answeredAt === undefined)
|
|
353
|
+
? Math.min(graceMs, this.budget)
|
|
354
|
+
: 0;
|
|
355
|
+
this.graceEnd = Date.now() + this.budget;
|
|
334
356
|
await waitFor(
|
|
335
357
|
() => this.result.probes.every((probe) => probe.answeredAt !== undefined),
|
|
336
|
-
this.budget
|
|
358
|
+
this.budget - this.grace
|
|
337
359
|
);
|
|
338
360
|
await this.audit(true);
|
|
339
361
|
if (
|
|
340
362
|
this.result.probes.some(
|
|
341
363
|
(probe) =>
|
|
342
|
-
probe.answeredAt === undefined &&
|
|
364
|
+
probe.answeredAt === undefined &&
|
|
365
|
+
!(
|
|
366
|
+
this.finalAuditComplete &&
|
|
367
|
+
(probe.forwarded === false || (this.ownershipExempt && ownershipRead(probe)))
|
|
368
|
+
)
|
|
343
369
|
)
|
|
344
370
|
)
|
|
345
371
|
this.missingEvidence('probe replies or terminal non-forwarding evidence unavailable');
|
|
346
372
|
}
|
|
347
373
|
|
|
374
|
+
async firstProbe() {
|
|
375
|
+
const audit = await bounded(
|
|
376
|
+
typeof this.gate.audit === 'function'
|
|
377
|
+
? Promise.resolve().then(() => this.gate.audit({ probes: [], final: false }))
|
|
378
|
+
: Promise.reject(new Error('forwarding audit unavailable')),
|
|
379
|
+
this.budget
|
|
380
|
+
);
|
|
381
|
+
this.result.delay.firstProbeAudit = audit;
|
|
382
|
+
this.firstProbeLedger = this.ledger(audit)?.map((command) => JSON.stringify(command));
|
|
383
|
+
this.lastLedger = this.firstProbeLedger;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
held() {
|
|
387
|
+
return this.frameOwnershipProbe
|
|
388
|
+
? this.result.probes.filter(
|
|
389
|
+
(probe) =>
|
|
390
|
+
probe.forwarded === true && ownershipRead(probe) && probe.windowOutcome === 'no answer'
|
|
391
|
+
)
|
|
392
|
+
: [];
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
async late() {
|
|
396
|
+
const held = this.held();
|
|
397
|
+
const ms = Math.max(0, Math.min(this.grace, this.graceEnd - Date.now()));
|
|
398
|
+
if (ms > 0) await bounded(Promise.all(held.map((probe) => this.pending.get(probe))), ms);
|
|
399
|
+
const late = held.filter(
|
|
400
|
+
(probe) => probe.answeredAt !== undefined && probe.outcome !== 'refused'
|
|
401
|
+
);
|
|
402
|
+
this.result.grace = { ms, late: late.length };
|
|
403
|
+
if (!late.length) return;
|
|
404
|
+
this.result.markerHidden = false;
|
|
405
|
+
this.result.probesRefusedOrUnforwarded = false;
|
|
406
|
+
if (
|
|
407
|
+
containsSecret(
|
|
408
|
+
late.map((probe) => probe.reply),
|
|
409
|
+
this.protectedOrigin
|
|
410
|
+
)
|
|
411
|
+
)
|
|
412
|
+
this.result.originHidden = false;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
ledger(audit) {
|
|
416
|
+
const commands = audit.result?.commands;
|
|
417
|
+
return Array.isArray(commands) && commands.every(ledgerEntry) ? commands : undefined;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
ownership(audit) {
|
|
421
|
+
const forwards = this.result.probes.filter((probe) => probe.forwarded === true);
|
|
422
|
+
const exempt = forwards.filter(ownershipRead).length;
|
|
423
|
+
const others = forwards.length > exempt;
|
|
424
|
+
const commands = this.ledger(audit);
|
|
425
|
+
const listed = commands?.map((command) => JSON.stringify(command));
|
|
426
|
+
const previous = this.lastLedger;
|
|
427
|
+
if (listed && previous && !previous.every((entry, index) => entry === listed[index]))
|
|
428
|
+
this.ledgerBreak = true;
|
|
429
|
+
this.lastLedger = listed && previous && !this.ledgerBreak ? listed : undefined;
|
|
430
|
+
const start = this.firstProbeLedger;
|
|
431
|
+
if (!this.lastLedger) return { others, ledger: false };
|
|
432
|
+
const probed = commands.slice(start.length);
|
|
433
|
+
const first = probed.findIndex(ownershipRead);
|
|
434
|
+
const reads = probed.filter(ownershipRead).length;
|
|
435
|
+
return {
|
|
436
|
+
others,
|
|
437
|
+
reads,
|
|
438
|
+
ledger: reads >= exempt,
|
|
439
|
+
shaped: probed.every((command) => ownershipRead(command) || ownershipRelease(command)),
|
|
440
|
+
ordered: probed.every(
|
|
441
|
+
(command, index) => !ownershipRelease(command) || (first >= 0 && index > first)
|
|
442
|
+
),
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
|
|
348
446
|
async audit(final = false) {
|
|
349
447
|
if (!this.forwardAudit) {
|
|
350
448
|
this.result.commandsUnforwarded = 'not-supported';
|
|
@@ -372,12 +470,28 @@ class Restore {
|
|
|
372
470
|
? true
|
|
373
471
|
: matches.find((entry) => entry.forwarded === false)?.forwarded;
|
|
374
472
|
}
|
|
473
|
+
const owned = this.frameOwnershipProbe ? this.ownership(audit) : undefined;
|
|
375
474
|
const forwarded =
|
|
376
475
|
this.result.commandsUnforwarded === false ||
|
|
377
|
-
|
|
378
|
-
|
|
476
|
+
(owned
|
|
477
|
+
? owned.others || owned.shaped === false || (owned.ledger && !owned.ordered)
|
|
478
|
+
: this.result.probes.some((probe) => probe.forwarded));
|
|
479
|
+
const proven = complete && (!owned || owned.ledger);
|
|
480
|
+
this.result.commandsUnforwarded = forwarded ? false : proven ? true : 'incomplete';
|
|
379
481
|
if (final) this.finalAuditComplete = complete;
|
|
380
482
|
if (final && !complete) this.missingEvidence('forwarding audit unavailable');
|
|
483
|
+
if (final && owned) this.ownershipVerdict(owned, complete);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
ownershipVerdict(owned, complete) {
|
|
487
|
+
this.ownershipExempt = complete && owned.ledger;
|
|
488
|
+
if (!owned.ledger) {
|
|
489
|
+
this.result.skips = ['commandsUnforwarded: frameOwnershipProbe: command ledger unavailable'];
|
|
490
|
+
this.missingEvidence(
|
|
491
|
+
`frameOwnershipProbe: command ledger unavailable${this.ledgerBreak ? ' (ledger does not extend the previous audit)' : ''}`
|
|
492
|
+
);
|
|
493
|
+
} else if (owned.reads > 0)
|
|
494
|
+
this.notes.push(`commandsUnforwarded: exempt:frameOwnershipProbe (${owned.reads} forwards)`);
|
|
381
495
|
}
|
|
382
496
|
|
|
383
497
|
async judge() {
|
|
@@ -493,6 +607,7 @@ class Restore {
|
|
|
493
607
|
}
|
|
494
608
|
} finally {
|
|
495
609
|
if (this.delay?.release) this.result.delay.release = await outcome(this.delay.release());
|
|
610
|
+
if (this.ownershipExempt && this.grace) await this.late();
|
|
496
611
|
if (this.session)
|
|
497
612
|
await bounded(
|
|
498
613
|
this.client.send('Target.detachFromTarget', { sessionId: this.session }),
|
|
@@ -521,6 +636,7 @@ export function bfcacheRestore({
|
|
|
521
636
|
notes = [],
|
|
522
637
|
budget = 5000,
|
|
523
638
|
forwardAudit = true,
|
|
639
|
+
frameOwnershipProbe = false,
|
|
524
640
|
delayMs = 1500,
|
|
525
641
|
windowMs = delayMs + 1000,
|
|
526
642
|
}) {
|
|
@@ -536,6 +652,7 @@ export function bfcacheRestore({
|
|
|
536
652
|
notes,
|
|
537
653
|
budget,
|
|
538
654
|
forwardAudit,
|
|
655
|
+
frameOwnershipProbe: frameOwnershipProbe && forwardAudit && side !== 'control',
|
|
539
656
|
delayMs,
|
|
540
657
|
windowMs,
|
|
541
658
|
}).run();
|
package/guard-runner.mjs
CHANGED
|
@@ -1333,6 +1333,7 @@ class Execution {
|
|
|
1333
1333
|
tag: this.vars.tag,
|
|
1334
1334
|
mode: step.bfcacheRestore,
|
|
1335
1335
|
forwardAudit: supported(['forwardAudit'], this.options.capabilities),
|
|
1336
|
+
frameOwnershipProbe: supported(['frameOwnershipProbe'], this.options.capabilities),
|
|
1336
1337
|
side: this.side,
|
|
1337
1338
|
notes: this.notes,
|
|
1338
1339
|
budget: this.bound(5000),
|
package/guard-vectors.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"setVersion": "1.
|
|
3
|
+
"setVersion": "1.40.0",
|
|
4
4
|
"sources": [
|
|
5
5
|
{
|
|
6
6
|
"repo": "ai-ecoverse/slicc-cli",
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
"siteIsolationOff": "the browser runs without site isolation, so a cross-site iframe shares its parent's process",
|
|
113
113
|
"inboundDelay": "a harness gate holding browser-to-guard messages until release during a history restore, with seed and release evidence",
|
|
114
114
|
"forwardAudit": "a complete browser-side forwarding ledger for history-restore probes and for checks of a command's forwarded params (client.forwarded)",
|
|
115
|
+
"frameOwnershipProbe": "needs forwardAudit; on a ready, history-locked page session during a history restore the guard may forward exactly DOM.getDocument with params {depth:-1,pierce:true} and no other keys, then DOM.disable with no params on the same session after that DOM.getDocument was forwarded, and holds the DOM.getDocument reply while the document is protected, never delivering it; the audit reply then carries commands: the ordered list the harness observed the browser receiving; it is judged from the first probe on; commands the row's scenario issues before it are not probes. The list covers that session from the hold's start until the audit, client- or guard-originated, each {method, params}, from the harness's own record of the wire between the guard and the browser and never from anything the guard reports about itself, and each audit's list starts with the previous one's; the runner audits right before its first probe and judges only the entries after that list; commandsUnforwarded then holds when every other probe stays unforwarded, the judged entries hold only those two shapes with no DOM.disable before the first such DOM.getDocument, and the audit is complete; a missing or partial ledger, or, from the audit right before the first probe on, a list that does not start with the previous audit's, leaves commandsUnforwarded incomplete; probesRefusedOrUnforwarded, markerHidden, originHidden and sideEffectAbsent still judge the forwarded DOM.getDocument; before detaching, the runner waits up to 400 ms for a held DOM.getDocument reply, taken from the end of its settle wait so the row takes no longer, and any reply delivered for it by then other than a refusal fails markerHidden and probesRefusedOrUnforwarded; each run that uses it notes commandsUnforwarded: exempt:frameOwnershipProbe (<n> forwards); the runner does not check that the session is history-locked and ready, nor how the reply is held beyond its non-delivery. The forward happens while the guard still sees an ordinary document, so the probe can execute in the browser before or after the restore commits. If it executes in the protected document the guard withholds the reply but cannot prevent the execution, and a DOM read leaves no side effect the runner can observe. A run where the reply is delivered, or where the probe is observed executing in the protected document, is a guard failure and not a flake. A reply delivered after that wait is not observable to the runner.",
|
|
115
116
|
"stockSetup": "the guard admits stock clients' setup calls: init scripts with no code (the no-code regex is matched on the whole string without the multiline flag), the four display emulation calls, bindings scoped to an isolated world, Page.createIsolatedWorld on an ordinary frame with grantUniveralAccess and contentSecurityPolicy stripped and no executionContextId for any other frame, and Target.setAutoAttach that either narrows to tab targets or hides per target so no protected-origin page, iframe or worker reaches the client (pages under the tab held like pages, with the same URL redaction in targetInfo)",
|
|
116
117
|
"syntheticAutoAttach": "the transport has no native Target.setAutoAttach, so the guard attaches new tabs, pages and their children itself and synthesizes Target.attachedToTarget, with the same placement and holds",
|
|
117
118
|
"secureOrigin": "the fixture and page origins are secure contexts (HTTPS), so service worker registration is available",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-browsers",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.0",
|
|
4
4
|
"description": "SLICC's shared browser catalog, JSON schemas and discovery conformance corpus",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"validate": "node scripts/validate.mjs",
|
|
80
80
|
"lint": "slicc-lint && test -z \"$(gofmt -l .)\" && go mod tidy -diff && go vet ./... && GOOS=darwin go vet ./... && GOOS=windows go vet ./... && golangci-lint run && cargo fmt --check && cargo clippy --all-features --all-targets -- -D warnings && cargo check --target wasm32-wasip1 --no-default-features && cargo check --target wasm32-wasip1 --features serde && cargo check --target wasm32-wasip1 --all-features",
|
|
81
81
|
"format": "biome check --write . && gofmt -w . && cargo fmt",
|
|
82
|
-
"test": "export PATH=\"$HOME/.cargo/bin:$PATH\" && node --test --test-concurrency=1 test/integration/debugger-stage1-packaging.test.mjs test/integration/debugger-raw-control.test.mjs test/integration/debugger-cleanup.test.mjs test/integration/debugger-stage1-install-vectors.test.mjs test/integration/protected-premise.test.mjs test/integration/debugger-stage1-vectors.test.mjs test/integration/self-contained.test.mjs test/integration/seven-corpus.test.mjs test/integration/browser-runner.test.mjs test/integration/fixture-client.test.mjs test/integration/guard-redirect-carrier.test.mjs test/integration/guard-redirect-session-end.test.mjs test/integration/guard-redirect-history.test.mjs test/integration/guard-redirect-iframe.test.mjs test/integration/guard-redirect-through.test.mjs test/integration/guard-incomplete.test.mjs test/integration/guard-unparseable-wipe.test.mjs test/integration/guard-browser-ui.test.mjs test/integration/guard-snapshot-settle.test.mjs test/integration/guard-stall.test.mjs test/integration/guard-forged.test.mjs test/integration/guard-trusted-emulation.test.mjs test/integration/guard-exit-steps.test.mjs test/integration/guard-exit-refusal.test.mjs test/integration/guard-frame-read.test.mjs test/integration/guard-bfcache.test.mjs test/integration/guard-bfcache-marker.test.mjs test/integration/guard-bfcache-history.test.mjs test/integration/guard-bfcache-review.test.mjs test/integration/guard-bfcache-quarantine.test.mjs test/integration/guard-error-page-navigation.test.mjs test/integration/guard-error-page-events.test.mjs test/integration/guard-error-page-reload.test.mjs test/integration/guard-close-protected.test.mjs test/integration/guard-close-protected-shapes.test.mjs test/integration/guard-close-protected-shapes-chrome.test.mjs test/integration/guard-credential-export.test.mjs test/integration/guard-protected-parent-iframes.test.mjs test/integration/guard-protected-parent-iframes-chrome.test.mjs test/integration/guard-error-frame-class.test.mjs test/integration/guard-sign-in-hold.test.mjs test/integration/guard-cookie-plant-chrome.test.mjs test/integration/guard-cookie-plant.test.mjs test/integration/guard-protected-parent-page.test.mjs test/integration/guard-protected-parent-page-chrome.test.mjs test/integration/guard-world-paint.test.mjs test/integration/gates.test.mjs test/integration/validate.test.mjs test/integration/validate-guard-stock-setup.test.mjs test/integration/validate-guard-explicit.test.mjs test/integration/go.test.mjs test/integration/cargo.test.mjs test/integration/workflows.test.mjs test/integration/guard-refusable-nav.test.mjs test/integration/guard-protected-worker.test.mjs test/integration/guard-protected-worker-chrome-narrow.test.mjs test/integration/guard-protected-worker-chrome-hide.test.mjs test/integration/guard-protected-worker-chrome-hide-cut.test.mjs test/integration/guard-protected-worker-chrome-admit.test.mjs test/integration/guard-protected-worker-chrome-late.test.mjs test/integration/guard-protected-worker-chrome-rewrite.test.mjs test/integration/guard-protected-worker-chrome-rewrite-late.test.mjs test/integration/guard-sweep-union.test.mjs test/integration/guard-explicit-attach-chrome.test.mjs && node --test --test-concurrency=2 test/integration/guard-lifecycle.test.mjs test/integration/chromium-launch.test.mjs test/integration/guard-fit.test.mjs test/integration/guard-chain.test.mjs test/integration/guard-validation.test.mjs test/integration/guard-liveness.test.mjs test/integration/guard-observations.test.mjs test/integration/guard-child-latency.test.mjs test/integration/guard-child-latency-stress.test.mjs test/integration/guard-adoption.test.mjs test/integration/guard-scoping.test.mjs test/integration/guard-late-pause.test.mjs test/integration/guard-cookie-plant-raw-leg.test.mjs test/integration/guard-cookie-plant-deletion.test.mjs test/integration/guard-cookie-plant-attach.test.mjs test/integration/guard-cookie-plant-attach-retry.test.mjs test/integration/guard-cookie-plant-open-commit.test.mjs test/integration/guard-cookie-plant-legacy-setup.test.mjs test/integration/guard-legs.test.mjs test/integration/guard-fetch-enable.test.mjs test/integration/guard-diagnostics.test.mjs test/integration/guard-chrome.test.mjs test/integration/guard-worlds.test.mjs test/integration/guard-world-discovery.test.mjs test/integration/guard-world-guesses.test.mjs test/integration/guard-unparseable.test.mjs test/integration/guard-redirect-secret.test.mjs test/integration/guard-error-page.test.mjs test/integration/guard-discovery.test.mjs test/integration/guard-bfcache-chrome.test.mjs test/integration/guard-browser-page.test.mjs test/integration/guard-scales.test.mjs test/integration/guard-shared-log.test.mjs test/integration/guard-pre-beacon.test.mjs test/integration/guard-world-pause.test.mjs test/integration/guard-reveal-overlap.test.mjs test/integration/guard-extension-frame-cast.test.mjs test/integration/guard-extension-frame-mouse.test.mjs test/integration/guard-extension-frame-click.test.mjs test/integration/guard-extension-frame-key.test.mjs test/integration/guard-extension-frame-attach.test.mjs test/integration/guard-extension-frames.test.mjs test/integration/guard-stock-setup.test.mjs test/integration/guard-explicit-attach.test.mjs test/integration/guard-explicit-order.test.mjs test/integration/guard-stock-attack.test.mjs test/integration/guard-parallel.test.mjs test/integration/guard-client-exit.test.mjs test/integration/guard-runner-record.test.mjs test/integration/guard-runner.test.mjs test/integration/guard-sweep-ordinary.test.mjs test/integration/guard-sweep-seven.test.mjs test/integration/guard-sweep-vault.test.mjs test/integration/guard-sweep-vault-x.test.mjs test/integration/guard-sweep-apex.test.mjs test/integration/guard-sweep-idp.test.mjs test/integration/guard-sweep-others.test.mjs test/integration/guard-browser-storage.test.mjs test/integration/guard-control-premises.test.mjs test/integration/guard-control-probe-failure.test.mjs",
|
|
82
|
+
"test": "export PATH=\"$HOME/.cargo/bin:$PATH\" && node --test --test-concurrency=1 test/integration/debugger-stage1-packaging.test.mjs test/integration/debugger-raw-control.test.mjs test/integration/debugger-cleanup.test.mjs test/integration/debugger-stage1-install-vectors.test.mjs test/integration/protected-premise.test.mjs test/integration/debugger-stage1-vectors.test.mjs test/integration/self-contained.test.mjs test/integration/seven-corpus.test.mjs test/integration/browser-runner.test.mjs test/integration/fixture-client.test.mjs test/integration/guard-redirect-carrier.test.mjs test/integration/guard-redirect-session-end.test.mjs test/integration/guard-redirect-history.test.mjs test/integration/guard-redirect-iframe.test.mjs test/integration/guard-redirect-through.test.mjs test/integration/guard-incomplete.test.mjs test/integration/guard-unparseable-wipe.test.mjs test/integration/guard-browser-ui.test.mjs test/integration/guard-snapshot-settle.test.mjs test/integration/guard-stall.test.mjs test/integration/guard-forged.test.mjs test/integration/guard-trusted-emulation.test.mjs test/integration/guard-exit-steps.test.mjs test/integration/guard-exit-refusal.test.mjs test/integration/guard-frame-read.test.mjs test/integration/guard-bfcache.test.mjs test/integration/guard-bfcache-marker.test.mjs test/integration/guard-bfcache-history.test.mjs test/integration/guard-bfcache-review.test.mjs test/integration/guard-bfcache-quarantine.test.mjs test/integration/guard-error-page-navigation.test.mjs test/integration/guard-error-page-events.test.mjs test/integration/guard-error-page-reload.test.mjs test/integration/guard-close-protected.test.mjs test/integration/guard-close-protected-shapes.test.mjs test/integration/guard-close-protected-shapes-chrome.test.mjs test/integration/guard-credential-export.test.mjs test/integration/guard-protected-parent-iframes.test.mjs test/integration/guard-protected-parent-iframes-chrome.test.mjs test/integration/guard-error-frame-class.test.mjs test/integration/guard-sign-in-hold.test.mjs test/integration/guard-cookie-plant-chrome.test.mjs test/integration/guard-cookie-plant.test.mjs test/integration/guard-protected-parent-page.test.mjs test/integration/guard-protected-parent-page-chrome.test.mjs test/integration/guard-world-paint.test.mjs test/integration/gates.test.mjs test/integration/validate.test.mjs test/integration/validate-guard-stock-setup.test.mjs test/integration/validate-guard-explicit.test.mjs test/integration/go.test.mjs test/integration/cargo.test.mjs test/integration/workflows.test.mjs test/integration/guard-refusable-nav.test.mjs test/integration/guard-protected-worker.test.mjs test/integration/guard-protected-worker-chrome-narrow.test.mjs test/integration/guard-protected-worker-chrome-hide.test.mjs test/integration/guard-protected-worker-chrome-hide-cut.test.mjs test/integration/guard-protected-worker-chrome-admit.test.mjs test/integration/guard-protected-worker-chrome-late.test.mjs test/integration/guard-protected-worker-chrome-rewrite.test.mjs test/integration/guard-protected-worker-chrome-rewrite-late.test.mjs test/integration/guard-sweep-union.test.mjs test/integration/guard-explicit-attach-chrome.test.mjs && node --test --test-concurrency=2 test/integration/guard-lifecycle.test.mjs test/integration/chromium-launch.test.mjs test/integration/guard-fit.test.mjs test/integration/guard-chain.test.mjs test/integration/guard-validation.test.mjs test/integration/guard-liveness.test.mjs test/integration/guard-observations.test.mjs test/integration/guard-child-latency.test.mjs test/integration/guard-child-latency-stress.test.mjs test/integration/guard-adoption.test.mjs test/integration/guard-scoping.test.mjs test/integration/guard-late-pause.test.mjs test/integration/guard-cookie-plant-raw-leg.test.mjs test/integration/guard-cookie-plant-deletion.test.mjs test/integration/guard-cookie-plant-attach.test.mjs test/integration/guard-cookie-plant-attach-retry.test.mjs test/integration/guard-cookie-plant-open-commit.test.mjs test/integration/guard-cookie-plant-legacy-setup.test.mjs test/integration/guard-legs.test.mjs test/integration/guard-fetch-enable.test.mjs test/integration/guard-diagnostics.test.mjs test/integration/guard-chrome.test.mjs test/integration/guard-worlds.test.mjs test/integration/guard-world-discovery.test.mjs test/integration/guard-world-guesses.test.mjs test/integration/guard-unparseable.test.mjs test/integration/guard-redirect-secret.test.mjs test/integration/guard-error-page.test.mjs test/integration/guard-discovery.test.mjs test/integration/guard-bfcache-chrome.test.mjs test/integration/guard-bfcache-ownership-probe.test.mjs test/integration/guard-browser-page.test.mjs test/integration/guard-scales.test.mjs test/integration/guard-shared-log.test.mjs test/integration/guard-pre-beacon.test.mjs test/integration/guard-world-pause.test.mjs test/integration/guard-reveal-overlap.test.mjs test/integration/guard-extension-frame-cast.test.mjs test/integration/guard-extension-frame-mouse.test.mjs test/integration/guard-extension-frame-click.test.mjs test/integration/guard-extension-frame-key.test.mjs test/integration/guard-extension-frame-attach.test.mjs test/integration/guard-extension-frames.test.mjs test/integration/guard-stock-setup.test.mjs test/integration/guard-explicit-attach.test.mjs test/integration/guard-explicit-order.test.mjs test/integration/guard-stock-attack.test.mjs test/integration/guard-parallel.test.mjs test/integration/guard-client-exit.test.mjs test/integration/guard-runner-record.test.mjs test/integration/guard-runner.test.mjs test/integration/guard-sweep-ordinary.test.mjs test/integration/guard-sweep-seven.test.mjs test/integration/guard-sweep-vault.test.mjs test/integration/guard-sweep-vault-x.test.mjs test/integration/guard-sweep-apex.test.mjs test/integration/guard-sweep-idp.test.mjs test/integration/guard-sweep-others.test.mjs test/integration/guard-browser-storage.test.mjs test/integration/guard-control-premises.test.mjs test/integration/guard-control-probe-failure.test.mjs",
|
|
83
83
|
"test:unit": "mkdir -p coverage/unit && node --experimental-test-coverage --test --test-concurrency=1 --test-reporter=lcov --test-reporter-destination=coverage/unit/lcov.info test/unit/*.test.mjs && go test -race -cover ./...",
|
|
84
84
|
"build": "go build ./... && cargo build --all-features && cargo build --target wasm32-wasip1 --all-features && npm pack --dry-run",
|
|
85
85
|
"prepublishOnly": "node scripts/set-crate-version.mjs \"$npm_package_version\"",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"test:unit:guard": "mkdir -p coverage/unit && node --experimental-vm-modules --no-warnings --experimental-test-coverage --test --test-concurrency=1 --test-coverage-include=guard-runner.mjs --test-coverage-include=guard-driver.mjs --test-coverage-include=extension-frame.mjs --test-coverage-include=fixture-server.mjs --test-coverage-include=fixture-client.mjs --test-coverage-include=observer-target.mjs --test-coverage-include=frame-read.mjs --test-coverage-include=bfcache-restore.mjs --test-coverage-include=protected-error-page.mjs --test-coverage-include=protected-parent-iframes.mjs --test-coverage-include=unparseable-url.mjs --test-coverage-include=scripts/browser-runner.mjs --test-coverage-include=scripts/validate.mjs --test-reporter=lcov --test-reporter-destination=coverage/unit/guard.lcov test/unit/guard-*.test.mjs && slicc-diff-cover coverage/unit/guard.lcov"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@ai-ecoverse/slicc-cdp": "2.1.
|
|
93
|
+
"@ai-ecoverse/slicc-cdp": "2.1.31",
|
|
94
94
|
"@ai-ecoverse/slicc-shared-web": "2.18.0",
|
|
95
95
|
"@biomejs/biome": "2.6.8",
|
|
96
96
|
"ajv": "8.20.0",
|
|
@@ -148,6 +148,11 @@
|
|
|
148
148
|
"type": "string",
|
|
149
149
|
"minLength": 1
|
|
150
150
|
},
|
|
151
|
+
"frameOwnershipProbe": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"minLength": 1,
|
|
154
|
+
"description": "Declared with forwardAudit, the audit reply on a history-restore session also carries commands: the ordered list the harness observed the browser receiving; it is judged from the first probe on; commands the row's scenario issues before it are not probes. The list covers that session from the hold's start until the audit, client- or guard-originated, each {method, params}, taken from the harness's own record of the wire between the guard and the browser and never from anything the guard reports about itself, and each audit's list starts with the previous one's. Before detaching, the runner waits up to 400 ms for a held DOM.getDocument reply; a reply delivered after that wait is not observable to it."
|
|
155
|
+
},
|
|
151
156
|
"stockSetup": {
|
|
152
157
|
"type": "string",
|
|
153
158
|
"minLength": 1
|
|
@@ -228,6 +233,7 @@
|
|
|
228
233
|
"inboundDelay",
|
|
229
234
|
"secureOrigin",
|
|
230
235
|
"forwardAudit",
|
|
236
|
+
"frameOwnershipProbe",
|
|
231
237
|
"stockSetup",
|
|
232
238
|
"syntheticAutoAttach",
|
|
233
239
|
"closeProtected",
|