@ai-ecoverse/slicc-browsers 1.11.0 → 1.13.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 +20 -6
- package/corpus.json +91 -28
- package/extension-world.mjs +28 -4
- package/fixture-server.mjs +23 -3
- package/guard-driver.mjs +5 -1
- package/guard-runner.mjs +94 -18
- package/guard-vectors.json +1436 -52
- package/package.json +8 -5
- package/protected-error-page.mjs +29 -13
- package/redirect-fragments.mjs +38 -0
- package/redirect-secret.mjs +466 -0
- package/schema/browsers.schema.json +5 -1
- package/schema/guard-vectors.schema.json +10 -0
package/README.md
CHANGED
|
@@ -169,6 +169,8 @@ A same-site frame shares its parent's process and has no target of its own. Ever
|
|
|
169
169
|
|
|
170
170
|
**Storage keys** (`Storage`, `IndexedDB`, `CacheStorage` and `FileSystem` in CDP): a key is protected when its origin (up to the first `^`) or its top-level site (a part after `^0`) is a protected URL.
|
|
171
171
|
|
|
172
|
+
**Redirect secrets.** An allowed response can name a protected destination without becoming a protected document itself. Every protected URL in a nested delivered string or object key is redacted in place to its origin, including embedded `Location`, `Content-Location`, `Refresh` and `Link` values, raw `headersText` lines, `redirectResponse`, Page URL/history/error fields, console/exception text and Audits issues. Percent-encoded representations must not retain the tail. A separate `urlFragment` alongside a protected `url` is cleared too. The event remains delivered so Network ExtraInfo pairing survives; dropping an ExtraInfo event fails these vectors. A request whose response names a protected URL has its response body refused (`slicc: refused:`), through both Fetch and Network, even though the request started at an ordinary URL. Body reads, replay and URL overrides must not follow an ordinary redirect into protected content or send its cookies. Ordinary redirect headers and bodies stay readable.
|
|
173
|
+
|
|
172
174
|
**Refusals** carry the text in `refusal`, `slicc: refused: target is on seven's origin`.
|
|
173
175
|
|
|
174
176
|
**`protected.json`** (schema `schema/protected.schema.json`): `errorPage` (the committed-error previous-decision and origin-redaction rule), `unparseable` (`protected`) and `unparseableRefusal`, in step with the catalog; `origins`, the extra origins every vector runs with; `urls` (`url`, `protected`); `targets` (`url`, `documentURL?` and `unreachableURL?` for validated main-frame error-commit evidence, `navigating?` for a main-frame navigation in flight; `type?`, the target's `TargetInfo.type`; `previous?`, whether the target was protected before; `opener?`, `protected`, `unprotected` or `unknown`, and no `opener` for a target without one; `protected`); `cookieDomains` (`domain`, `protected`); `storageKeys` (`key`, `protected`). `npm run validate` runs every vector through `protected.mjs`, and no vector uses a port from 9222 to 9229.
|
|
@@ -182,17 +184,21 @@ Every CDP guard runs the vectors in `guard-vectors.json` (schema `schema/guard-v
|
|
|
182
184
|
- `C5.continue-request` and `C5.continue-response`, added next to `C5.document`;
|
|
183
185
|
- the `C8` rows for privileged pages: `C8.navigate` (a page navigates to `chrome://settings`, `chrome://password-manager`, an extension page or `file:///`; refused), `C8.view-source` (the same through `view-source:`; refused), `C8.create` (`Target.createTarget` straight on those pages; refused), `C8.browser-ui-listed` (`Target.getTargets` lists no `browser_ui` target) and `C8.browser-ui-attach` (`Target.attachToTarget` by a `browser_ui` target's id; refused). All five have an unguarded control, since the guard refuses them only on the privileged target. Two cases aren't rows, because Chrome itself blocks them, so an unguarded client can't tell a guard from none: a page's `window.open('chrome://settings')`, and an `about:` alias such as `about:settings`, which `Page.navigate` and `Target.createTarget` both turn into `about:blank#blocked`. The `about:` aliases are in `protected.json` instead.
|
|
184
186
|
|
|
185
|
-
The `C9` foreign extension isolated-world family requires `extensionWorld`: a browser hosting a foreign content-script extension on the ordinary fixture page. `C9.world-hidden` requires the page default context to remain visible after `Runtime.enable`, while the extension context and Runtime/Debugger identifiers remain hidden without cutting or detaching the session. `C9.world-select` probes numeric and unique context selectors, object and argument handles, promises, properties, named bindings and DOM node resolution; each command selecting the hidden world must fail with the `slicc: refused:` prefix, never an ordinary browser error. Numeric guesses also sweep ids 1–32: an id not exposed to this client must be refused, while every exposed numeric context must remain usable; none of those guarded probes may reach the fixture content-script marker. The marker combines the content script’s global lexical `root` binding with its extension-id DOM marker and `chrome.runtime.id`, and is independently required to be absent from the page default world. `C9.world-debugger` pauses inside that content script: the control must reach its frame, while the guard must refuse or hide it. `C9.page-drivable` evaluates `self.origin`, captures a DOM snapshot and dispatches an Input click on the same ordinary page; cutting the entire session fails this regression row. All four use an unguarded control, the default browser context and observer discovery of the real extension world, not an invented isolated world. Protected default contexts remain session-cutting evidence; hiding a foreign isolated world does not weaken any seven-origin row.
|
|
187
|
+
The `C9` foreign extension isolated-world family requires `extensionWorld`: a browser hosting a foreign content-script extension on the ordinary fixture page. `C9.world-hidden` requires the page default context to remain visible after `Runtime.enable`, while the extension context and Runtime/Debugger identifiers remain hidden without cutting or detaching the session. `C9.world-select` probes numeric and unique context selectors, object and argument handles, promises, properties, named bindings and DOM node resolution; each command selecting the hidden world must fail with the `slicc: refused:` prefix, never an ordinary browser error. Numeric guesses also sweep ids 1–32: an id not exposed to this client must be refused, while every exposed numeric context must remain usable; none of those guarded probes may reach the fixture content-script marker. The marker combines the content script’s global lexical `root` binding with its extension-id DOM marker and `chrome.runtime.id`, and is independently required to be absent from the page default world. `C9.world-debugger` pauses inside that content script: the control must reach its frame, while the guard must refuse or hide it. The control waits up to 5000 ms (scaled by `settleScale`) for `Debugger.paused`; when it never pauses, `reachable` records `"incomplete"`, not `false`, and the row fails with `extensionWorld debugger: no Debugger.paused within <ms>ms`. The guarded leg waits up to 1500 ms, scaled by `refusalScale`. `C9.page-drivable` evaluates `self.origin`, captures a DOM snapshot and dispatches an Input click on the same ordinary page; cutting the entire session fails this regression row. All four use an unguarded control, the default browser context and observer discovery of the real extension world, not an invented isolated world. Protected default contexts remain session-cutting evidence; hiding a foreign isolated world does not weaken any seven-origin row.
|
|
186
188
|
|
|
187
189
|
The integration launcher loads shared-web 1.25.2’s harness extension exactly once through `Extensions.loadUnpacked` (`ankmbodmgimjemnojmeddfcdlbocolob`), whose content script runs on HTTP(S) pages. shared-web 1.25.2 also loads it by default in its own harness. A transport unable to host a foreign content-script extension omits `extensionWorld` and reports `not-supported:extensionWorld`; an advertised capability with no observed world fails, rather than silently skipping.
|
|
188
190
|
|
|
191
|
+
`C2.redirect-secret` probes ordinary fixture 302s to seven’s `/auth/callback?code=…&state=…` and vault’s `/oauth/mcp-callback?code=…`, plus `#access_token=…` variants of both. It navigates with Page and scripted `location.href`, fetches a subresource and sends an XHR. The 302 carries `Location`, `Content-Location`, `Refresh: 0;url=…` and `Link: <…>; rel=preconnect`. Page, Network (including ExtraInfo), Runtime, Log, Audits and both Fetch stages are enabled. Every received raw message is scanned, including replies, across an eight-second tail, for raw, percent-encoded, JSON-escaped and base64 marker representations. Both response-body APIs are attempted on each hop; guarded bodies need matched refusals. Page frame trees, resource trees and navigation history are read before recovery to catch error-page leftovers. A separate structural check requires every protected `Network.Request.urlFragment` and `Page.Frame.urlFragment` to be empty or absent, even if its value contains no marker; the ordinary `#access_token` control independently requires fragment evidence in request events, frame events, frame-tree replies and resource-tree replies. The ordinary session must survive. The unguarded ordinary redirect control preserves all four headers in `redirectResponse`, ExtraInfo’s headers and `headersText`, and Fetch’s response headers. `C2.redirect-secret-mix` repeats that matrix with 301/303/307/308. The protected leg requires in-place ExtraInfo delivery with origin-only header values, not merely the absence of a marker.
|
|
192
|
+
|
|
193
|
+
`C2.redirect-body` calls `Network.loadNetworkResource` on an ordinary redirect with `includeCredentials: true`, reads any stream with `IO.read`, replays a redirected XHR, requests Page resource content, and captures Page/MHTML and DOM snapshots after a main-frame redirect. It also captures an ordinary parent containing an iframe redirected to vault, including its error document, and overrides a paused ordinary Fetch request to the allowed redirect URL. No protected marker may appear in any message or body, and no request from those operations may send the independently seeded seven cookie. The ordinary control must return the body, resource content and snapshots, and accept the URL override. Each probe cleans up its redirect registrations, observer session and cookie. The focused Chrome tests use HTTPS with SPKI-pinned fixture trust and default-port protected URLs; host resolver rules route seven and vault to the fixture rather than the public service.
|
|
194
|
+
|
|
189
195
|
`C8.unparseable` probes both raw and canonical space/U+200D/invalid-punycode URLs through creation and navigation. Every guarded destination needs a matched refusal. Its unguarded controls record `document` or `native-rejection` outcomes, including Chrome builds that reject raw U+200D instead of committing it. Both raw and encoded-space forms must commit real fixture documents, because that is the proven cookie leak. An independent observer loads the encoded-space document and confirms it shares a uniquely seeded `.sliccy.ai` cookie; the guarded client must neither list nor attach to it, read its cookie, query that cookie by URL, nor cause a cookie-bearing destination request. The guard does not erase the observer’s private browser state. The row runs on both browser-session and page-session-only transports, uses the default context, and cleans up its own targets and cookie. Cookie seeding always uses the unguarded observer’s browser session, never the guarded client. Only guarded browser-session target listing requires `browserSession`; without it, `listed` records `not-supported` explicitly in probe and observation evidence, and the result lists that field in `notSupported`. Creation, navigation, attachment and `Network.getCookies` with `urls` still require matched refusals; filtering cookies without refusing fails `cookieRefused`. Fixture URLs omit the colon when the port is empty, and reported URLs are compared after canonicalisation, including Chrome’s WHATWG-unparseable encoded-space hosts. Launchers must resolve the raw/canonical space, U+200D/punycode and invalid-punycode `.sliccy.ai` fixture hosts to the fixture server, including for default-port HTTP or HTTPS origins. The HTTP fixture accepts Chrome’s encoded-space Host header without reparsing it as a WHATWG origin.
|
|
190
196
|
|
|
191
197
|
`C8.chrome-search` requests `chrome-search://most-visited/` through `Page.navigate` and requires an explicit guard refusal. Its unguarded control requires a CDP response, not a successful document commit: Chrome can answer with `errorText` when that internal data source is unavailable outside an Instant process. Browser-side load failure is not a guard refusal, and merely hiding the target must fail this row.
|
|
192
198
|
|
|
193
199
|
The `C8.newtab` reachability control attaches through the guard to a settled ordinary new tab, including its internal frames, then navigates that same tab to an ordinary document. Both legs must succeed, including without a guard. It requires `chromeUrlsAttach`, so an extension transport reports it as `skip` with `not-supported:chromeUrlsAttach`. The C8 protection rows expect a refusal on the guarded leg and run their controls unguarded, so they don't require it and still run on extension transports. It uses the default browser context, since an incognito new tab omits the ordinary new tab's internal frames. It covers `chrome://newtab/` and directly opened `chrome://new-tab-page/`.
|
|
194
200
|
|
|
195
|
-
`C8.protected-error-page` touches an allowed tab, scripts a protected navigation, and requires the guard to fail its Document request. The independent observer verifies the committed error document and the exact unreachable/reported URL pair. The session stays attached; reload, navigation to `about:blank` and close succeed, while
|
|
201
|
+
`C8.protected-error-page` touches an allowed tab, scripts a protected navigation, and requires the guard to fail its Document request. The independent observer verifies the committed error document and the exact unreachable/reported URL pair. The session stays attached; reload, navigation to `about:blank` and close succeed, while `Target.getTargetInfo`, `Target.getTargets`, the `Target.attachedToTarget` of a fresh attach and the `targetCreated`/`targetInfoChanged` events redact URL and title to the origin (`infoRedacted`, `listRedacted`, `attachRedacted`, `eventsRedacted`), and none of them shows the full failed URL (`fullURL`). The failed URL carries a secret path, `?query` and `#fragment`; the `.query` and `.fragment` variants of this row and of `C8.protected-error-page-sticky` fail `/doc?query-secret=…` and `/doc#fragment-secret-…` instead, so no path, query or fragment secret may survive alone either. The unguarded control uses independent Fetch failure injection and keeps raw discovery values: its `fullURL` must be `true`. `C8.protected-document-restore` seeds a real protected document before attachment, navigates away, then restores it from BFCache in the same tab after the error/recovery sequence; evaluate, attach and close must be refused. A real `BackForwardCacheRestore` commit is required, so a second failed network request cannot masquerade as this control. `C8.protected-error-page-sticky` additionally fails a request after that real protected restore and requires the already-protected tab to remain locked. They run on browser-session and page-session-only transports alike, have unguarded controls and clean up their own targets. The regression tests include URL-only locking, unconditional error-page unlocking, and a plain client with only request-failure injection.
|
|
196
202
|
|
|
197
203
|
`C8.network-error` and `C8.iframe-error` are ordinary-error reachability controls: request the configured `network-error` URL (default `http://nonexistent.invalid/`) directly or in an ordinary iframe, observe a failed Document request, reattach to the settled tab, evaluate and snapshot its document, then navigate the same tab to an ordinary document. Both control and guarded legs must pass. The failing URL is unchanged on the control, rather than replaced with a healthy origin, and the rows require `browserSession` but not `chromeUrlsAttach`. With Chrome for Testing 156.0.8078.4, scheme-wide `chrome-error` protection made the direct-error row fail both legs because reattachment was refused; removing it passed both rows, with readable DOM and successful recovery. The old emulator still allowed the cross-process iframe parent because the iframe TargetInfo kept the failing HTTP URL, but that layout-specific behavior is not grounds for protecting the error scheme. Plain-client controls and reachability legs also passed both rows.
|
|
198
204
|
|
|
@@ -253,7 +259,9 @@ Popups are observed by `Target.targetCreated` with the opener's `openerId`, or b
|
|
|
253
259
|
|
|
254
260
|
`{ "extensionWorld": "hidden" | "select" | "debugger" | "drivable", "as": "world", "requires": ["extensionWorld"] }` runs the C9 compound probe on the current ordinary page. The runner attaches an independent observer to discover actual context ids, unique ids and names, and sends probes through the client session. Discovery matches the expected fixture extension’s exact origin, never the first extension world: `run()`’s optional `extensionWorldId` defaults to shared-web’s harness id `ankmbodmgimjemnojmeddfcdlbocolob`. Multiple unrelated content-script worlds are ignored for fixture selection, while guards must still protect foreign worlds. A custom fixture must provide the same content-script marker contract. Object handles are minted and validated on the unguarded control session, then replayed as guesses on the guarded leg; Chrome object handles and DOM node ids are session-local, so observer handles must never be mistaken for client handles. Numeric ids from the control are also replayed alongside fresh observer-discovered selectors, but numeric ids are local to a tab: a control id may name the next tab’s exposed default context, which must work and return no extension marker. The same-tab hidden world’s actual numeric id and every extension unique-id guess still require a matched refusal. Unknown numeric ids and stale object handles (`not exposed`) need explicit refusals rather than Chrome’s invalid-id errors. `guessesRefused` aggregates only required refusals; `guessesReached` must be false on the guarded leg, and `exposedContextsWork` must remain true. Its result contains boolean evidence consumed by ordinary `result` checks. The unguarded leg validates those selectors against Chrome itself before guarded evidence can pass.
|
|
255
261
|
|
|
256
|
-
`{ "errorPage": "recover", "
|
|
262
|
+
`{ "errorPage": "recover", "secret"?: "all" | "query" | "fragment", "as": "errorPage" }` (also modes `restore` and `sticky`; `secret` defaults to `all`) runs the protected-error-page compound probe with independent commit evidence, discovery redaction and recovery or sticky-lock checks. The unguarded observer seeds the protected history and failed commit, so the rows run on page-session-only transports too. The guarded client uses only `Target.getTargetInfo` with a `targetId`, `Target.getTargets`, `Target.setDiscoverTargets`, `Target.attachToTarget`, `Target.detachFromTarget` and `Target.closeTarget` without a session, which page-session transports answer themselves, and everything else on its page session; the rows require no capability. The runner leaves this probe’s independent Fetch sessions to the probe rather than answering their pauses itself.
|
|
263
|
+
|
|
264
|
+
`{ "redirectSecret": "headers" | "mix" | "body", "as": "redirect" }` runs a C2 compound probe and owns its Fetch pauses. The client must expose `messages`, an append-only array of every raw received CDP text frame, recorded before parsing; an events-only or reply-only tap fails `rawRecorded`. The fixture must implement `redirectSecret({ path, host?, search?, to?, code?, body, remove? })`: registering an allowed hop without putting the protected marker in the initiating URL, and registering the callback body on the protected host. `fixtureServer()` supplies it. Fixture logs must include headers for the cookie check. The guard’s events and raw messages must represent the same delivered stream.
|
|
257
265
|
|
|
258
266
|
`{ "unparseable": true, "as": "unparseable" }` runs the C8 malformed-URL compound probe on the current ordinary page: independent browser ground truth, raw/canonical destination commands, discovery/attach and cookie checks. Boolean evidence is consumed by ordinary `result` checks, with native Chrome outcomes retained in its diagnostics.
|
|
259
267
|
|
|
@@ -366,7 +374,7 @@ every alternative of an `any`, or a required (`all`, `not` or plain) check, need
|
|
|
366
374
|
selects one variant or an array; omission selects all. `parallel` defaults to 1.
|
|
367
375
|
With the `browserContexts` capability each leg runs in its own browser context. A `Target.createBrowserContext` that fails with a timeout is retried once, and the row's `notes` records it; any other failure fails the row.
|
|
368
376
|
|
|
369
|
-
`settleScale` (default 1) multiplies the bounds of waits for events the leg expects to happen: settles (beacon, served, title and load) on the control leg and `required` settles on either leg, `paused` on the control leg, page and child loads, the wait for a background step's `as` result (`<as> did not complete within <ms>ms`), and the wait for an observation the leg expects to be `true`. Adopters on slow hosts can set 3 or 4. Every wait polls and returns as soon as its event arrives, so a larger bound only costs time when something is really missing, and each timeout error names the bound it used. An observation read from the fixture (`observer: "fixture"`, such as a beacon or a served request) that the leg expects to be `true` is polled for up to 5000 ms (scaled) instead of read once. One that the leg expects to be `false` is still read once.
|
|
377
|
+
`settleScale` (default 1) multiplies the bounds of waits for events the leg expects to happen: settles (beacon, served, title and load) on the control leg and `required` settles on either leg, `paused` on the control leg, page and child loads, the wait for a background step's `as` result (`<as> did not complete within <ms>ms`), the wait for the pre-action beacons, the C9 control's `Debugger.paused`, and the wait for an observation the leg expects to be `true`. Adopters on slow hosts can set 3 or 4. Every wait polls and returns as soon as its event arrives, so a larger bound only costs time when something is really missing, and each timeout error names the bound it used. An observation read from the fixture (`observer: "fixture"`, such as a beacon or a served request) that the leg expects to be `true` is polled for up to 5000 ms (scaled) instead of read once. One that the leg expects to be `false` is still read once.
|
|
370
378
|
|
|
371
379
|
`refusalScale` (default 1) multiplies the bounds of waits for what the guarded leg expects to be absent, the beacon, request, title or navigation that the guard should block: settles that are not `required`, and `paused`, on the guarded leg. Such a wait runs to its full bound whenever the guard works, so `settleScale` leaves it alone. The trade-off: a larger `refusalScale` gives more sensitivity to a leak that arrives late on a slow host, because the observations after the wait see it, at the cost of that much more time per guarded row. Adopters should keep `refusalScale` at 1 or higher, never below 1; the runner refuses a `refusalScale` below 1 with `refusalScale must be a number of at least 1`.
|
|
372
380
|
|
|
@@ -401,7 +409,13 @@ observations: a missing or failing effect fails the control. Guarded liveness
|
|
|
401
409
|
requires the exact target URL in the fixture log or a target-origin `/live`
|
|
402
410
|
heartbeat; alternatively a pre-action `/live?tag=...&step=pre&to=...` request and
|
|
403
411
|
an exact-URL block/error from the client or unguarded frame tree. An error for a
|
|
404
|
-
different URL is not evidence.
|
|
412
|
+
different URL is not evidence. Before judging, the runner waits, bounded at 5 s (scaled by `settleScale`), for the
|
|
413
|
+
pre-action beacon of every trigger step it ran, since a keepalive beacon has no ordering
|
|
414
|
+
guarantee. When one never arrives, an `eitherWhen` that needs it is `"incomplete"` and
|
|
415
|
+
excluded from that field's expectations, and the guarded leg is not live with
|
|
416
|
+
`not live: pre beacon not observed for <url>` in the row's `why`, never a false
|
|
417
|
+
mismatch. Once the beacon is in, a failing `eitherWhen` whose field mismatches, and a
|
|
418
|
+
failing `liveCheck`, are rechecked for up to 1.5 s (scaled) before they count. `blocked` accepts either `{ url }` for one exact URL
|
|
405
419
|
or `{ anyOf: [url, ...] }` for a nonempty list of exact URLs; each URL can be a
|
|
406
420
|
string or `{ hops, to, index? }`. Both forms allow `session` and `frame`. With `frame`,
|
|
407
421
|
the unguarded observer also reads the page's out-of-process iframe targets (matched by
|
|
@@ -538,7 +552,7 @@ A six endpoint has tier `six`, whatever its seven tabs. **A program never choose
|
|
|
538
552
|
|
|
539
553
|
## Output schema 1
|
|
540
554
|
|
|
541
|
-
`schema/browsers.schema.json` describes `slicc browsers --json`, which `playwright-cli list --json` also prints. [slicc-cli's README](https://github.com/ai-ecoverse/slicc-cli#slicc-browsers---json---cdp-url---no-bundle-scan) is the authoritative spec for it; this schema is a copy and follows it. Fields can be added; `source` is one of `devtools-active-port`, `flag`, `probe` and `process`. `tier` is 1 to 6, and `six: true` marks an endpoint in SLICC six's profile (tier 6). An endpoint may carry `tabs`: every page target except those on protected origins. Seven's own tabs are protected, so they are in `sevenTabs` only, never in `tabs`. `playwright-cli list --json` prints it, and a corpus case that checks it needs `tabs`.
|
|
555
|
+
`schema/browsers.schema.json` describes `slicc browsers --json`, which `playwright-cli list --json` also prints. [slicc-cli's README](https://github.com/ai-ecoverse/slicc-cli#slicc-browsers---json---cdp-url---no-bundle-scan) is the authoritative spec for it; this schema is a copy and follows it. Fields can be added; `source` is one of `devtools-active-port`, `flag`, `probe` and `process`. `tier` is 1 to 6, and `six: true` marks an endpoint in SLICC six's profile (tier 6). An endpoint may carry `tabs`: every page target except those on protected origins. Seven's own tabs are protected, so they are in `sevenTabs` only, never in `tabs`. In `sevenTabs`, `url` and `title` are the origin only, never a path, query, fragment or document title, including configured extra seven origins and default-port normalization. `playwright-cli list --json` prints it, and a corpus case that checks it needs `tabs`.
|
|
542
556
|
|
|
543
557
|
## The corpus
|
|
544
558
|
|
package/corpus.json
CHANGED
|
@@ -761,8 +761,8 @@
|
|
|
761
761
|
"sevenTabs": [
|
|
762
762
|
{
|
|
763
763
|
"id": "P1",
|
|
764
|
-
"url": "https://lars.sliccy.ai
|
|
765
|
-
"title": "
|
|
764
|
+
"url": "https://lars.sliccy.ai",
|
|
765
|
+
"title": "https://lars.sliccy.ai"
|
|
766
766
|
}
|
|
767
767
|
],
|
|
768
768
|
"tabs": [
|
|
@@ -854,13 +854,13 @@
|
|
|
854
854
|
"sevenTabs": [
|
|
855
855
|
{
|
|
856
856
|
"id": "O1",
|
|
857
|
-
"url": "https://dev.example.test
|
|
858
|
-
"title": "dev"
|
|
857
|
+
"url": "https://dev.example.test",
|
|
858
|
+
"title": "https://dev.example.test"
|
|
859
859
|
},
|
|
860
860
|
{
|
|
861
861
|
"id": "O3",
|
|
862
|
-
"url": "https://dev.example.test
|
|
863
|
-
"title": "dev
|
|
862
|
+
"url": "https://dev.example.test",
|
|
863
|
+
"title": "https://dev.example.test"
|
|
864
864
|
}
|
|
865
865
|
]
|
|
866
866
|
}
|
|
@@ -1298,8 +1298,8 @@
|
|
|
1298
1298
|
"sevenTabs": [
|
|
1299
1299
|
{
|
|
1300
1300
|
"id": "P1",
|
|
1301
|
-
"url": "https://lars.sliccy.ai
|
|
1302
|
-
"title": "
|
|
1301
|
+
"url": "https://lars.sliccy.ai",
|
|
1302
|
+
"title": "https://lars.sliccy.ai"
|
|
1303
1303
|
}
|
|
1304
1304
|
]
|
|
1305
1305
|
}
|
|
@@ -1713,8 +1713,8 @@
|
|
|
1713
1713
|
"sevenTabs": [
|
|
1714
1714
|
{
|
|
1715
1715
|
"id": "S1",
|
|
1716
|
-
"url": "https://b.sliccy.ai
|
|
1717
|
-
"title": "
|
|
1716
|
+
"url": "https://b.sliccy.ai",
|
|
1717
|
+
"title": "https://b.sliccy.ai"
|
|
1718
1718
|
}
|
|
1719
1719
|
]
|
|
1720
1720
|
}
|
|
@@ -1737,8 +1737,8 @@
|
|
|
1737
1737
|
"sevenTabs": [
|
|
1738
1738
|
{
|
|
1739
1739
|
"id": "S2",
|
|
1740
|
-
"url": "https://a.sliccy.ai
|
|
1741
|
-
"title": "
|
|
1740
|
+
"url": "https://a.sliccy.ai",
|
|
1741
|
+
"title": "https://a.sliccy.ai"
|
|
1742
1742
|
}
|
|
1743
1743
|
]
|
|
1744
1744
|
}
|
|
@@ -2012,8 +2012,8 @@
|
|
|
2012
2012
|
"sevenTabs": [
|
|
2013
2013
|
{
|
|
2014
2014
|
"id": "D1",
|
|
2015
|
-
"url": "https://seven.sliccy.ai
|
|
2016
|
-
"title": "seven"
|
|
2015
|
+
"url": "https://seven.sliccy.ai",
|
|
2016
|
+
"title": "https://seven.sliccy.ai"
|
|
2017
2017
|
}
|
|
2018
2018
|
]
|
|
2019
2019
|
}
|
|
@@ -2039,6 +2039,69 @@
|
|
|
2039
2039
|
]
|
|
2040
2040
|
}
|
|
2041
2041
|
},
|
|
2042
|
+
{
|
|
2043
|
+
"name": "seven-tab-origin-redaction",
|
|
2044
|
+
"case": {
|
|
2045
|
+
"description": "sevenTabs URL and title reveal only the origin, never a secret path, query, fragment or document title",
|
|
2046
|
+
"needs": [
|
|
2047
|
+
"flag"
|
|
2048
|
+
],
|
|
2049
|
+
"cdp": [
|
|
2050
|
+
"127.0.0.1:9531"
|
|
2051
|
+
],
|
|
2052
|
+
"http": {
|
|
2053
|
+
"127.0.0.1:9531": {
|
|
2054
|
+
"version": {
|
|
2055
|
+
"Browser": "Chrome/154.0.8037.98",
|
|
2056
|
+
"Protocol-Version": "1.3",
|
|
2057
|
+
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.8037.98 Safari/537.36",
|
|
2058
|
+
"V8-Version": "15.4.79.1",
|
|
2059
|
+
"WebKit-Version": "537.36 (@a1b2c3)",
|
|
2060
|
+
"webSocketDebuggerUrl": "ws://127.0.0.1:9531/devtools/browser/d1"
|
|
2061
|
+
},
|
|
2062
|
+
"list": [
|
|
2063
|
+
{
|
|
2064
|
+
"id": "D1",
|
|
2065
|
+
"type": "page",
|
|
2066
|
+
"url": "https://seven.sliccy.ai/auth/secret-path-marker?code=secret-query-marker#access_token=secret-fragment-marker",
|
|
2067
|
+
"title": "secret-title-marker",
|
|
2068
|
+
"webSocketDebuggerUrl": "ws://127.0.0.1/devtools/page/D1"
|
|
2069
|
+
}
|
|
2070
|
+
]
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
},
|
|
2074
|
+
"expected": {
|
|
2075
|
+
"schema": 1,
|
|
2076
|
+
"minChromium": 116,
|
|
2077
|
+
"entries": [
|
|
2078
|
+
{
|
|
2079
|
+
"id": "cdp:127.0.0.1:9531",
|
|
2080
|
+
"kind": "endpoint",
|
|
2081
|
+
"tier": 1,
|
|
2082
|
+
"name": "Chrome",
|
|
2083
|
+
"version": "154.0.8037.98",
|
|
2084
|
+
"endpoint": {
|
|
2085
|
+
"cdp": "http://127.0.0.1:9531",
|
|
2086
|
+
"webSocketDebuggerUrl": "ws://127.0.0.1:9531/devtools/browser/d1",
|
|
2087
|
+
"name": "Chrome",
|
|
2088
|
+
"version": "154.0.8037.98",
|
|
2089
|
+
"product": "Chrome/154.0.8037.98",
|
|
2090
|
+
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.8037.98 Safari/537.36",
|
|
2091
|
+
"source": "flag",
|
|
2092
|
+
"sevenOpen": true,
|
|
2093
|
+
"sevenTabs": [
|
|
2094
|
+
{
|
|
2095
|
+
"id": "D1",
|
|
2096
|
+
"url": "https://seven.sliccy.ai",
|
|
2097
|
+
"title": "https://seven.sliccy.ai"
|
|
2098
|
+
}
|
|
2099
|
+
]
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
]
|
|
2103
|
+
}
|
|
2104
|
+
},
|
|
2042
2105
|
{
|
|
2043
2106
|
"name": "seven-tabs",
|
|
2044
2107
|
"case": {
|
|
@@ -2189,13 +2252,13 @@
|
|
|
2189
2252
|
"sevenTabs": [
|
|
2190
2253
|
{
|
|
2191
2254
|
"id": "T1",
|
|
2192
|
-
"url": "https://lars.sliccy.ai
|
|
2193
|
-
"title": "
|
|
2255
|
+
"url": "https://lars.sliccy.ai",
|
|
2256
|
+
"title": "https://lars.sliccy.ai"
|
|
2194
2257
|
},
|
|
2195
2258
|
{
|
|
2196
2259
|
"id": "T6",
|
|
2197
|
-
"url": "https://seven.sliccy.ai
|
|
2198
|
-
"title": "seven
|
|
2260
|
+
"url": "https://seven.sliccy.ai",
|
|
2261
|
+
"title": "https://seven.sliccy.ai"
|
|
2199
2262
|
}
|
|
2200
2263
|
]
|
|
2201
2264
|
}
|
|
@@ -2218,8 +2281,8 @@
|
|
|
2218
2281
|
"sevenTabs": [
|
|
2219
2282
|
{
|
|
2220
2283
|
"id": "V1",
|
|
2221
|
-
"url": "https://team-7.sliccy.ai
|
|
2222
|
-
"title": "
|
|
2284
|
+
"url": "https://team-7.sliccy.ai",
|
|
2285
|
+
"title": "https://team-7.sliccy.ai"
|
|
2223
2286
|
}
|
|
2224
2287
|
]
|
|
2225
2288
|
}
|
|
@@ -2400,8 +2463,8 @@
|
|
|
2400
2463
|
"sevenTabs": [
|
|
2401
2464
|
{
|
|
2402
2465
|
"id": "S1",
|
|
2403
|
-
"url": "https://lars.sliccy.ai
|
|
2404
|
-
"title": "
|
|
2466
|
+
"url": "https://lars.sliccy.ai",
|
|
2467
|
+
"title": "https://lars.sliccy.ai"
|
|
2405
2468
|
}
|
|
2406
2469
|
]
|
|
2407
2470
|
}
|
|
@@ -2522,8 +2585,8 @@
|
|
|
2522
2585
|
"sevenTabs": [
|
|
2523
2586
|
{
|
|
2524
2587
|
"id": "S1",
|
|
2525
|
-
"url": "https://lars.sliccy.ai
|
|
2526
|
-
"title": "
|
|
2588
|
+
"url": "https://lars.sliccy.ai",
|
|
2589
|
+
"title": "https://lars.sliccy.ai"
|
|
2527
2590
|
}
|
|
2528
2591
|
]
|
|
2529
2592
|
}
|
|
@@ -2674,8 +2737,8 @@
|
|
|
2674
2737
|
"sevenTabs": [
|
|
2675
2738
|
{
|
|
2676
2739
|
"id": "S1",
|
|
2677
|
-
"url": "https://lars.sliccy.ai
|
|
2678
|
-
"title": "
|
|
2740
|
+
"url": "https://lars.sliccy.ai",
|
|
2741
|
+
"title": "https://lars.sliccy.ai"
|
|
2679
2742
|
}
|
|
2680
2743
|
]
|
|
2681
2744
|
}
|
|
@@ -2775,8 +2838,8 @@
|
|
|
2775
2838
|
"sevenTabs": [
|
|
2776
2839
|
{
|
|
2777
2840
|
"id": "S1",
|
|
2778
|
-
"url": "https://lars.sliccy.ai
|
|
2779
|
-
"title": "
|
|
2841
|
+
"url": "https://lars.sliccy.ai",
|
|
2842
|
+
"title": "https://lars.sliccy.ai"
|
|
2780
2843
|
}
|
|
2781
2844
|
]
|
|
2782
2845
|
}
|
package/extension-world.mjs
CHANGED
|
@@ -73,7 +73,17 @@ async function drivable(client, session, live) {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
async function debuggerWorld({
|
|
76
|
+
async function debuggerWorld({
|
|
77
|
+
client,
|
|
78
|
+
reader,
|
|
79
|
+
session,
|
|
80
|
+
observer,
|
|
81
|
+
world,
|
|
82
|
+
events,
|
|
83
|
+
live,
|
|
84
|
+
side,
|
|
85
|
+
pauseMs,
|
|
86
|
+
}) {
|
|
77
87
|
const debug = await outcome(client.send('Debugger.enable', {}, session));
|
|
78
88
|
const probe = outcome(
|
|
79
89
|
reader.send(
|
|
@@ -87,7 +97,7 @@ async function debuggerWorld({ client, reader, session, observer, world, events,
|
|
|
87
97
|
observer
|
|
88
98
|
)
|
|
89
99
|
);
|
|
90
|
-
const deadline = Date.now() +
|
|
100
|
+
const deadline = Date.now() + pauseMs;
|
|
91
101
|
while (
|
|
92
102
|
debug.ok &&
|
|
93
103
|
!events().some((event) => event.method === 'Debugger.paused') &&
|
|
@@ -123,9 +133,11 @@ async function debuggerWorld({ client, reader, session, observer, world, events,
|
|
|
123
133
|
event.method === 'Debugger.scriptParsed' && event.params.executionContextId === world.id
|
|
124
134
|
) || Boolean(paused);
|
|
125
135
|
await outcome(client.send('Debugger.disable', {}, session));
|
|
136
|
+
const incomplete = side === 'control' && debug.ok && !paused;
|
|
126
137
|
return {
|
|
127
138
|
exists: true,
|
|
128
|
-
reachable: reached,
|
|
139
|
+
reachable: incomplete ? 'incomplete' : reached,
|
|
140
|
+
...(incomplete ? { incomplete: `no Debugger.paused within ${pauseMs}ms` } : {}),
|
|
129
141
|
protected: refused(debug) || frameRefused || !exposed,
|
|
130
142
|
alive: await live(),
|
|
131
143
|
};
|
|
@@ -310,6 +322,7 @@ export async function extensionWorld({
|
|
|
310
322
|
side,
|
|
311
323
|
controls,
|
|
312
324
|
extensionId = DEFAULT_EXTENSION_WORLD_ID,
|
|
325
|
+
pauseMs = side === 'control' ? 5000 : 1500,
|
|
313
326
|
}) {
|
|
314
327
|
const attached = await reader.send('Target.attachToTarget', { targetId, flatten: true });
|
|
315
328
|
const observer = attached.sessionId;
|
|
@@ -370,7 +383,18 @@ export async function extensionWorld({
|
|
|
370
383
|
await outcome(client.send('Debugger.disable', {}, session));
|
|
371
384
|
return { exists: true, listed, leaks, defaultSeen, alive: enabled.ok && (await live()) };
|
|
372
385
|
}
|
|
373
|
-
const input = {
|
|
386
|
+
const input = {
|
|
387
|
+
client,
|
|
388
|
+
reader,
|
|
389
|
+
session,
|
|
390
|
+
observer,
|
|
391
|
+
world,
|
|
392
|
+
events,
|
|
393
|
+
live,
|
|
394
|
+
side,
|
|
395
|
+
controls,
|
|
396
|
+
pauseMs,
|
|
397
|
+
};
|
|
374
398
|
if (mode === 'drivable') return await drivable(client, session, live);
|
|
375
399
|
if (mode === 'debugger') return await debuggerWorld(input);
|
|
376
400
|
return await selectWorld(input);
|
package/fixture-server.mjs
CHANGED
|
@@ -26,7 +26,20 @@ function trigger(p) {
|
|
|
26
26
|
return `<p>trigger</p><button onclick="go()">Go</button>${frame}<script>const to=${JSON.stringify(to)};function go(){const k=${JSON.stringify(kind)};if(k==='href'||k==='deferred')location.href=to;if(k==='replace')location.replace(to);if(k==='popup')window.open(to);if(k==='form'){const u=new URL(to);const f=document.createElement('form');f.action=u.origin+u.pathname;for(const [name,value] of u.searchParams){const i=document.createElement('input');i.type='hidden';i.name=name;i.value=value;f.append(i);}document.body.append(f);f.submit();}return 'went';}${kind === 'deferred' ? `setTimeout(go,${Number(p.get('defer') ?? 3000)});` : ''}</script>`;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function route(req, url, send, html) {
|
|
29
|
+
function route(req, url, send, html, redirects) {
|
|
30
|
+
const secret =
|
|
31
|
+
redirects.get(`${url.hostname}${url.pathname}${url.search ?? ''}`) ??
|
|
32
|
+
redirects.get(`${url.hostname}${url.pathname}`) ??
|
|
33
|
+
redirects.get(url.pathname);
|
|
34
|
+
if (secret) {
|
|
35
|
+
if (!secret.to) return send(200, secret.body, 'text/plain');
|
|
36
|
+
return send(secret.code ?? 302, secret.body, 'text/plain', {
|
|
37
|
+
location: secret.to,
|
|
38
|
+
'content-location': secret.to,
|
|
39
|
+
refresh: `0;url=${secret.to}`,
|
|
40
|
+
link: `<${secret.to}>; rel=preconnect`,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
30
43
|
const p = url.searchParams;
|
|
31
44
|
const routes = {
|
|
32
45
|
'/beacon': () => send(204, ''),
|
|
@@ -95,6 +108,7 @@ function requestURL(req, scheme) {
|
|
|
95
108
|
|
|
96
109
|
export async function fixtureServer({ host = '127.0.0.1', port = 0, tls, latency } = {}) {
|
|
97
110
|
let entries = [];
|
|
111
|
+
const redirects = new Map();
|
|
98
112
|
const scheme = tls ? 'https' : 'http';
|
|
99
113
|
const handler = (req, res) => {
|
|
100
114
|
const url = requestURL(req, scheme);
|
|
@@ -123,8 +137,8 @@ export async function fixtureServer({ host = '127.0.0.1', port = 0, tls, latency
|
|
|
123
137
|
headers
|
|
124
138
|
);
|
|
125
139
|
const wait = latency?.(url) ?? 0;
|
|
126
|
-
if (wait > 0) setTimeout(() => route(req, url, send, html), wait);
|
|
127
|
-
else route(req, url, send, html);
|
|
140
|
+
if (wait > 0) setTimeout(() => route(req, url, send, html, redirects), wait);
|
|
141
|
+
else route(req, url, send, html, redirects);
|
|
128
142
|
};
|
|
129
143
|
const server = tls ? createSecureServer(tls, handler) : createServer(handler);
|
|
130
144
|
await new Promise((resolve, reject) => {
|
|
@@ -133,6 +147,12 @@ export async function fixtureServer({ host = '127.0.0.1', port = 0, tls, latency
|
|
|
133
147
|
});
|
|
134
148
|
const address = server.address();
|
|
135
149
|
return {
|
|
150
|
+
redirects,
|
|
151
|
+
redirectSecret: async ({ path, host = '', search = '', remove, ...value }) => {
|
|
152
|
+
const key = `${host}${path}${search}`;
|
|
153
|
+
if (remove) redirects.delete(key);
|
|
154
|
+
else redirects.set(key, value);
|
|
155
|
+
},
|
|
136
156
|
port: address.port,
|
|
137
157
|
origin: `${scheme}://${host}:${address.port}`,
|
|
138
158
|
log: () => structuredClone(entries),
|
package/guard-driver.mjs
CHANGED
|
@@ -144,10 +144,14 @@ export function judge(vector, side, observed) {
|
|
|
144
144
|
(observed?.[k] === 'not-supported' && vector.observe?.[k]?.requires?.length > 0) ||
|
|
145
145
|
(vector.observe?.[k]?.dependsOn ?? []).some((d) => refused.includes(d))
|
|
146
146
|
);
|
|
147
|
+
const incomplete = Object.keys(want).filter(
|
|
148
|
+
(k) => !skipped.includes(k) && observed?.[`${k}.either`] === 'incomplete'
|
|
149
|
+
);
|
|
147
150
|
const mismatches = Object.entries(want)
|
|
148
151
|
.filter(
|
|
149
152
|
([k, v]) =>
|
|
150
153
|
!skipped.includes(k) &&
|
|
154
|
+
!incomplete.includes(k) &&
|
|
151
155
|
!matches(observed?.[`${k}.either`] === true ? 'either' : v, observed?.[k])
|
|
152
156
|
)
|
|
153
157
|
.map(([k, v]) => `${k}: got ${q(observed?.[k])}, want ${q(v)}`);
|
|
@@ -222,7 +226,7 @@ export function result(vector, run) {
|
|
|
222
226
|
why.push('refused on the protected target without a passing control');
|
|
223
227
|
} else why.push(...g.mismatches);
|
|
224
228
|
const live = run.live === true ? 'pass' : 'fail';
|
|
225
|
-
if (live === 'fail') why.push('not live');
|
|
229
|
+
if (live === 'fail') why.push(['not live', run.liveWhy].filter(Boolean).join(': '));
|
|
226
230
|
return {
|
|
227
231
|
...row,
|
|
228
232
|
control,
|