@ai-ecoverse/slicc 1.63.2 → 1.64.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 +10 -5
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -928,12 +928,17 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
|
|
|
928
928
|
- An error from such a browser reaches the page with only its `code` and scrubbed `message`, so nothing the browser adds as `data` passes.
|
|
929
929
|
- **The one exception to "a protected frame's address never reaches the stream":** a value the page itself puts in a console argument or returns from a script, such as an iframe's `src`. The page already knows it, and Chrome behaves the same.
|
|
930
930
|
- Commands are refused by default, as a second layer, and these are allowed because they were measured on real Crest not to reach a preloaded protected iframe: navigation (`Page.navigate`, `reload`, `stopLoading`, `navigateToHistoryEntry`, `getNavigationHistory`, `getFrameTree`, `getLayoutMetrics`, `createIsolatedWorld`), `Runtime.evaluate`, `callFunctionOn`, `getProperties`, `releaseObject`, `releaseObjectGroup`, `DOM.getDocument`, `querySelector`, `querySelectorAll`, `describeNode`, `resolveNode`, `requestNode`, `getBoxModel`, `getContentQuads`, `focus`, `Accessibility.getFullAXTree`, `Input.dispatchMouseEvent`, `dispatchKeyEvent`, `insertText`, the cookie commands, `Network.enable`, and `enable` and `disable` of the other domains. Anything else is refused with `slicc: refused: slicc can't see inside this browser's frames, so it allows only the commands measured not to reach one; …`, screenshots and PDFs included: those did show the frame.
|
|
931
|
-
- A selector must name the main frame. `frameId` must be the target's, and `contextId`, `uniqueContextId` and `executionContextId` a context the browser reported for it. `executionContextName` and `pierce` are refused. `grantUniveralAccess`
|
|
931
|
+
- A selector must name the main frame. `frameId` must be the target's, and `contextId`, `uniqueContextId` and `executionContextId` a context the browser reported for it. `executionContextName` and `pierce` are refused. `grantUniveralAccess` and `contentSecurityPolicy` are removed from `Page.createIsolatedWorld` before it's forwarded (as on every browser). Anything else gets `slicc: refused: slicc can't see inside this browser's frames, so a command can't name a frame or an execution context here`.
|
|
932
932
|
- A client's own guard must not reconfigure a hold that may be per tab, so the node answers it without forwarding: `Fetch.enable` with the one pattern `{ "urlPattern": "*", "resourceType": "Document", "requestStage": "Request" }`, `Fetch.disable`, and `Network.setBypassServiceWorker` with `bypass: true`. Other `Fetch` commands, `Network.disable` and `bypass: false` are refused.
|
|
933
933
|
- A session that isn't a guarded page's gets `Browser.getVersion`, `Browser.getWindowForTarget` and the target commands only.
|
|
934
934
|
- Every paused protected document locks the tab, whatever its `frameId`, from the moment the browser says `documents-only`, since these browsers share no convention for it.
|
|
935
935
|
- Client-issued requests (`Fetch.continueRequest` with `url`, and the other mutations) are refused there too, because later hops of such a request can't be paused.
|
|
936
|
-
- The node fails each such request into a protected origin with `Fetch.failRequest` (`BlockedByClient`), and the target shows Chrome's error page instead. Every other request continues untouched. So a touched target never loads a protected document, and nothing the stream installed on it (`Fetch`, `Network`, emulation, overrides) ever runs in a protected document. Document-persistent scripts, bindings and CSP bypass are refused even on ordinary pages: `Page.
|
|
936
|
+
- The node fails each such request into a protected origin with `Fetch.failRequest` (`BlockedByClient`), and the target shows Chrome's error page instead. Every other request continues untouched. So a touched target never loads a protected document, and nothing the stream installed on it (`Fetch`, `Network`, emulation, overrides) ever runs in a protected document: the navigation guard refuses that load (or clears the carry by never committing it). Document-persistent scripts, bindings and CSP bypass are refused even on ordinary pages, except the stock-client admits below: `Page.addScriptToEvaluateOnLoad`, `Page.setBypassCSP`, a `Page.addScriptToEvaluateOnNewDocument` whose `source` has code, an unscoped or main-world `Runtime.addBinding`, and `Page.removeScriptToEvaluateOnNewDocument` for an identifier this stream never got. Their CDP error is `slicc: refused: scripts and bindings for later documents could run in seven’s pages or the vault, so the guard doesn’t allow them; run a script in the page you see with Runtime.evaluate instead`. They are never forwarded or answered with fake success; use `Runtime.evaluate` for the current document instead.
|
|
937
|
+
- **Stock client setup admits** (so Playwright and Puppeteer can open a page through this guard):
|
|
938
|
+
- `Page.addScriptToEvaluateOnNewDocument` whose `source` matches `^(?:[ \t\n]|//[^\n\r\u2028\u2029]*)*$` on the whole string without the multiline flag (no code), with any `worldName` or `runImmediately`, and `Page.removeScriptToEvaluateOnNewDocument` for an identifier this stream got from such an admit;
|
|
939
|
+
- `Page.createIsolatedWorld` on a frame the guard has placed as ordinary: `grantUniveralAccess` and `contentSecurityPolicy` are always removed before the call is forwarded (on every browser, not only documents-only);
|
|
940
|
+
- `Runtime.addBinding` scoped to an isolated world by a non-empty `executionContextName`, or by the `executionContextId` of a context the guard has placed as ordinary and that isn't the main world; `Runtime.bindingCalled` reaches the page only from contexts placed as ordinary;
|
|
941
|
+
- exactly `Emulation.setFocusEmulationEnabled`, `Emulation.setEmulatedMedia`, `Emulation.setDeviceMetricsOverride` and `Emulation.setTouchEmulationEnabled`. Every other method matching `/^Emulation\.(set|add|update|remove)[A-Z]/` stays refused with the session-settings text below.
|
|
937
942
|
- Before admitting content commands on a touched tab, the node reads fresh navigation history and target info on its own sessions. An uninitialized new tab also needs a fresh current-frame decision and a history retry. Missing evidence fails closed. If the tab's history has held a protected entry during this CDP stream, content commands stay refused, even after navigation away or a history reset. A blocked main-document request quarantines the tab before the node fails it. This includes script, DOM, input, screenshots, accessibility and target-session IO. Clean tabs keep their normal command path. CDP navigation still works; open a new tab to resume content commands. This conservative rule also applies to protected URLs that failed to load and to authorization flows that redirect through a protected callback.
|
|
938
943
|
- Seven's own tab and its vault frame are never touched, because attaching to them is refused.
|
|
939
944
|
- Page commands on a touched target's session wait, in order, until the node's own session there is ready; commands on other sessions of the stream don't wait. No page command on that session reaches the browser before the node's session is ready. The node's `Network.enable` and `Network.setBypassServiceWorker` answer only once the target's renderer does, which a loaded host can take a minute or more to start, so the wait has no fixed length. It fails closed on no progress, or at an outer bound:
|
|
@@ -966,7 +971,7 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
|
|
|
966
971
|
- A target that has no URL after 10 s is treated as protected. A session that the node does forward makes the target touched (see above).
|
|
967
972
|
- **Page commands need a page's session,** for every browser, from the moment a stream opens. A command in a page's domain (`Page`, `Runtime`, `DOM`, `DOMSnapshot`, `Input`, `Accessibility`, `Emulation`, `CSS` and the rest) sent without a session, or on a browser session, is refused with `slicc: refused: this command needs a page's session; …`. Chrome answers those with `wasn't found` anyway, so only the error text changes. `Network` and `Memory` aren't among them: Chromium serves `Memory` at browser scope, and `Network` commands keep their own rules there. A documents-only browser refuses both once it has said so.
|
|
968
973
|
- **`Slicc.action`** is answered by the node on every browser and never forwarded. On a documents-only target, `Input` from a client that sent it is acknowledged and dropped too, because such a client checks `isTrusted` and dispatches its own events, so a second delivery would toggle a checkbox twice. A relay stream can't open on a page-level socket (`/devtools/page/<id>`), where Chrome answers `Target.attachToBrowserTarget` with `Not allowed`.
|
|
969
|
-
- **Session-wide settings are refused on every relay session, including ordinary pages.** `Network.setExtraHTTPHeaders`, `Network.setUserAgentOverride`, `Emulation.setUserAgentOverride`, `Emulation.setLocaleOverride`, `Emulation.setTimezoneOverride`, `Network.setCacheDisabled`, `Network.emulateNetworkConditions`, `Network.emulateNetworkConditionsByRule`, `Network.overrideNetworkState`, `Network.setBlockedURLs`, and every method matching `/^Emulation\.(set|add|update|remove)[A-Z]/` receive `slicc: refused: settings for a whole session (headers, user agent, locale, time zone, cache, network conditions, blocked URLs, emulation) could reach seven’s pages or the vault, so the guard doesn’t allow them; change a request through Fetch instead`. These calls are never forwarded or answered with fake success.
|
|
974
|
+
- **Session-wide settings are refused on every relay session, including ordinary pages.** `Network.setExtraHTTPHeaders`, `Network.setUserAgentOverride`, `Emulation.setUserAgentOverride`, `Emulation.setLocaleOverride`, `Emulation.setTimezoneOverride`, `Network.setCacheDisabled`, `Network.emulateNetworkConditions`, `Network.emulateNetworkConditionsByRule`, `Network.overrideNetworkState`, `Network.setBlockedURLs`, and every method matching `/^Emulation\.(set|add|update|remove)[A-Z]/` other than the four display admits above receive `slicc: refused: settings for a whole session (headers, user agent, locale, time zone, cache, network conditions, blocked URLs, emulation) could reach seven’s pages or the vault, so the guard doesn’t allow them; change a request through Fetch instead`. These calls are never forwarded or answered with fake success.
|
|
970
975
|
- **Browser-side inheriting navigation is refused.** `Page.navigate` to any `about:` URL, including `about:blank` and `about:srcdoc`, receives `slicc: refused: a browser-side navigation to about: gives the page the origin of whatever drives the browser, so the guard doesn’t send it; open a new tab on about:blank instead`. An absent or unparseable navigation URL receives the same error. Creating a fresh tab with `Target.createTarget` on `about:blank` remains available.
|
|
971
976
|
|
|
972
977
|
- **Listing.** `Target.getTargets`, `Target.getTargetInfo`, `Target.targetCreated` and `Target.targetInfoChanged` still show protected targets, so seven knows its tab exists, but their `url` and `title` are only the origin (`https://seven.sliccy.ai`, `chrome://settings`, `chrome-extension://<id>`, or `about:blank`), or only the scheme for a URL without a host (`file:`). A target whose URL slicc can't parse isn't listed at all, since it has no origin to show: `Target.getTargets` leaves it out, and its `targetCreated` and `targetInfoChanged` are dropped. A target of a `targetTypes` type (`browser_ui`) is never shown: `Target.getTargets` leaves it out, its `targetCreated`, `targetInfoChanged`, `targetDestroyed` and `targetCrashed` are dropped, and `Target.getTargetInfo` on its id is refused like any other command that names it. Service worker registrations and versions on a protected origin are left out of `ServiceWorker` events, and `Storage`, `DOMStorage` and `BackgroundService` events that name a protected origin are dropped.
|
|
@@ -1446,7 +1451,7 @@ slicc cdp --signal stdio [--port <n>] [--json]
|
|
|
1446
1451
|
- **HTTP,** the part of Chrome's that clients use:
|
|
1447
1452
|
- `GET /json/version`: `{ "Browser", "Protocol-Version", "User-Agent", "V8-Version", "WebKit-Version", "webSocketDebuggerUrl": "ws://<host>:<port>/devtools/browser/<id>" }`, from the OPENED `version` of a short stream. `<id>` is a random UUID per process, and `<host>` is the request's `Host` without its port.
|
|
1448
1453
|
- `GET /json` and `GET /json/list`: one short stream with `Target.getTargets`, and one entry per target in Chrome's shape, `{ "description": "", "id", "title", "type", "url", "webSocketDebuggerUrl": "ws://<host>:<port>/devtools/page/<id>" }`, every type but `browser` and `tab`. seven's guard has already filtered the list: protected targets are missing, or cut to their origin.
|
|
1449
|
-
- `PUT /json/new?<url>`: `
|
|
1454
|
+
- `PUT /json/new?<url>`: creates `about:blank`, attaches flat, navigates to `<url>` on that session (`about:blank` without a query), detaches, and answers with that target's entry. Creating the target with the URL directly would refuse the attach while it is still loading. If attach, the session, or that navigate is refused, the node sends `Target.closeTarget` for the created id before answering, so a refused PUT leaves the target list unchanged.
|
|
1450
1455
|
- `GET /json/activate/<id>`: `Target.activateTarget`, answered `Target activated`. `GET /json/close/<id>`: `Target.closeTarget`, answered `Target is closing`.
|
|
1451
1456
|
- `GET /json/new` is `405`, as in Chrome 111 and later: a web page can send a GET without a preflight, but not a PUT.
|
|
1452
1457
|
- A guard refusal or a CDP error is `500` with the error's message, and any other path is `404`.
|
|
@@ -2598,7 +2603,7 @@ In the same process, probe ports, dirs and a process list passed in explicitly (
|
|
|
2598
2603
|
|
|
2599
2604
|
**Port guard.** On CI (`CI` set), or with `SLICC_TEST_PORT_GUARD=1`, `TestMain` holds `127.0.0.1:9222` to `9229` (and `[::1]` where it can) for the whole run, and the run fails if anything connects to them, other than the one test that lends a port to its own fake browser. On CI a port it can't hold fails the run. Off CI it is off by default, so a developer's own Chrome on those ports is never touched; the guarded tests then skip.
|
|
2600
2605
|
|
|
2601
|
-
**Protected-origin vectors.** `test/integration/testdata/link/protect.js` exports `protectVectors`, the attacks the relay must stop, in a shape other guards reuse: `{ id, setup, trigger, control: { origin: 'ordinary', expected }, expected }`. Each runs three times, through the relay, against the same server under three names: an ordinary origin (`ordinary.test`, the control, which must succeed), seven (an `--origin`) and the vault (`vault.sliccy.ai`). A run passes when its observations match `control.expected` or `expected`, and a vector whose control fails fails as a whole. The only run left out is the vault in the same-site iframe cases, since no unprotected page is same-site with a `sliccy.ai` host. The observations come from the test server's log of requests and of the beacons an injected init script sends, and from what the page's own CDP session saw. The cases:
|
|
2606
|
+
**Protected-origin vectors.** `test/integration/testdata/link/protect.js` exports `protectVectors`, the attacks the relay must stop, in a shape other guards reuse: `{ id, setup, trigger, control: { origin: 'ordinary', expected }, expected }`. Each runs three times, through the relay, against the same server under three names: an ordinary origin (`ordinary.test`, the control, which must succeed), seven (an `--origin`) and the vault (`vault.sliccy.ai`). A run passes when its observations match `control.expected` or `expected`, and a vector whose control fails fails as a whole. The only run left out is the vault in the same-site iframe cases, since no unprotected page is same-site with a `sliccy.ai` host. The observations come from the test server's log of requests and of the beacons an injected init script sends, and from what the page's own CDP session saw. **Waivers on this head** (slicc-browsers 1.21.1; not pinned to 1.21.2 yet; each waiver accepts only its documented failing leg): `C3.tab-worker-leak` / `C3.tab-service-worker-leak` — control and live pass, guarded fail with `workerAttached` true until 1.21.2; `C3.tab-attach` — guarded settle failure of `window.open` under main's empty-URL hold (runner folds that into `control: fail`, #260), not any other non-pass; stock Playwright/Puppeteer popup through the link guard stays green; `C3.tab-iframe-leak` — control fail with `iframeAttached: false` (same-site `seven.guard.test` / `ordinary.guard.test`), guarded and live pass with `iframeAttached: false` (a guarded `iframeAttached: true` is not waived). Required green: `C3.popup`, `C3.tab-create`, `C3.tab-blank`, `C3.tab-protected`. The cases:
|
|
2602
2607
|
- C1, an init script, then `location.href`;
|
|
2603
2608
|
- C2, redirect chains through allowed hops (301, 302, 303, 307, 308, and a POST form through 307 and 308), and a chain that passes through the protected origin and back out;
|
|
2604
2609
|
- C3, an instrumented popup that navigates itself, a popup opened on a redirect chain, and popups opened on a redirect chain or straight on the origin that never reach the page: not through auto-attach with or without `waitForDebuggerOnStart`, `Target.attachToTarget`, `activateTarget` or `closeTarget`, and not after they navigate to another path of the origin and the opener turns auto-attach on again; `Target.getTargetInfo` shows them without their path;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.64.0",
|
|
4
4
|
"description": "SLICC's command line for seven: links a machine's network, compute and browsers to seven over WebRTC",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"node": ">=18"
|
|
19
19
|
},
|
|
20
20
|
"optionalDependencies": {
|
|
21
|
-
"@ai-ecoverse/slicc-darwin-arm64": "1.
|
|
22
|
-
"@ai-ecoverse/slicc-darwin-amd64": "1.
|
|
23
|
-
"@ai-ecoverse/slicc-linux-arm64": "1.
|
|
24
|
-
"@ai-ecoverse/slicc-linux-amd64": "1.
|
|
25
|
-
"@ai-ecoverse/slicc-windows-arm64": "1.
|
|
26
|
-
"@ai-ecoverse/slicc-windows-amd64": "1.
|
|
21
|
+
"@ai-ecoverse/slicc-darwin-arm64": "1.64.0",
|
|
22
|
+
"@ai-ecoverse/slicc-darwin-amd64": "1.64.0",
|
|
23
|
+
"@ai-ecoverse/slicc-linux-arm64": "1.64.0",
|
|
24
|
+
"@ai-ecoverse/slicc-linux-amd64": "1.64.0",
|
|
25
|
+
"@ai-ecoverse/slicc-windows-arm64": "1.64.0",
|
|
26
|
+
"@ai-ecoverse/slicc-windows-amd64": "1.64.0",
|
|
27
27
|
"@ai-ecoverse/slicc-jerk": "^1.4.2"
|
|
28
28
|
}
|
|
29
29
|
}
|