@ai-ecoverse/slicc-browsers 1.50.0 → 1.51.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 +7 -7
- package/catalog.json +10 -2
- package/engine/engine-wasm.mjs +1 -1
- package/engine/engine.wasm +0 -0
- package/engine-vectors.json +12 -7
- package/engine.mjs +17 -10
- package/guard-vectors.json +10 -10
- package/package.json +1 -1
- package/protected-worker.mjs +10 -0
- package/protected.json +429 -40
- package/protected.mjs +1 -1
- package/schema/catalog.schema.json +7 -1
- package/schema/protected.schema.json +29 -1
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ npm install @ai-ecoverse/slicc-browsers
|
|
|
75
75
|
| `./guard-runner`, `./guard-driver.mjs` | the guard vector runner and its helpers |
|
|
76
76
|
| `./fixture`, `./fixture-client` | the test server (Node only) and a client for a remote one |
|
|
77
77
|
|
|
78
|
-
Everything except `./fixture` runs in browsers and Node. `protected.mjs`
|
|
78
|
+
Everything except `./fixture` runs in browsers and Node. `protected.mjs` exports `engine()` and async `loadEngine()` without Web APIs or imports; `seven.mjs` is standalone. MV3 extensions using the engine need `'wasm-unsafe-eval'` in their extension pages CSP.
|
|
79
79
|
|
|
80
80
|
## Engine
|
|
81
81
|
|
|
@@ -91,11 +91,11 @@ One rules engine classifies protected origins, targets, cookie domains, storage
|
|
|
91
91
|
- **Profiles and platforms**: where SLICC keeps its browser profiles, and the config dirs and registry keys per OS.
|
|
92
92
|
- **Protected origins**: see [below](#protected-origins).
|
|
93
93
|
|
|
94
|
-
The catalog
|
|
94
|
+
The catalog uses schema 1. Minor releases only add fields; removing or changing fields requires schema 2 and a major release. slicc-cli has no browser tables: change `catalog.json`, release and bump the dependency.
|
|
95
95
|
|
|
96
96
|
## Discovery
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
Discovery ranks browsers from known user-data dirs’ `DevToolsActivePort` files, `--cdp` URLs, a port probe and the process list, and lists installed browsers it can launch. Output follows [`schema/browsers.schema.json`](schema/browsers.schema.json). Seven tabs expose only their origin, never a path, query or title.
|
|
99
99
|
|
|
100
100
|
The process scan finds other programs’ `--remote-debugging-port` browsers; see `discovery.process` and the `process-*` corpus cases.
|
|
101
101
|
|
|
@@ -147,15 +147,15 @@ slicc-cli's `test/integration/corpus_test.go` is a complete harness.
|
|
|
147
147
|
## Protected origins
|
|
148
148
|
|
|
149
149
|
Browser control must never navigate to, open, attach to, or read cookies or storage of:
|
|
150
|
-
- **seven and the vault**: `sliccy.ai` hosts one label deep, bar a few listed ones, over HTTP(S), any port; apex-domain cookies too, not apex or deeper pages. Unprotected pages there read and write them via `document.cookie` and `cookieStore` as in any browser; CDP filtering is defence in depth; SLICC's cookies are host-only;
|
|
150
|
+
- **seven and the vault**: `sliccy.ai` hosts one label deep, bar a few listed ones, over HTTP(S) or WS(S), any port; apex-domain cookies too, not apex or deeper pages. Unprotected pages there read and write them via `document.cookie` and `cookieStore` as in any browser; CDP filtering is defence in depth; SLICC's cookies are host-only;
|
|
151
151
|
- **the browser's own privileged pages**: `chrome://` and other Chromium browsers' equivalents, `devtools://`, `chrome-extension://` (home to password managers and wallets), `file://` and Chrome's UI targets, bar the new tab page;
|
|
152
152
|
- **a program's extra seven origins**.
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
Targets and frames use only their own URL and reported security origin (including inherited origins), never their parent, opener or history; unknown origins alone do not protect a target, but an unparseable URL does. Error documents are ordinary unless the failed URL is unparseable, and a protected failed URL is redacted to its origin. A refused call fails with `slicc: refused: target is on seven's origin`.
|
|
155
155
|
|
|
156
156
|
The engine withholds protected frames, not their ordinary page. Adapters report any mixed state from capture dispatch to release: screenshots and screencasts show Seven but blank other protected boxes; PDFs needing blanking are refused.
|
|
157
157
|
|
|
158
|
-
Foreign extension frames
|
|
158
|
+
Foreign extension frames cannot be attached or read. Their URLs are hidden in discovery, snapshots, accessibility trees and evaluate results; the tab remains readable and can be snapshotted. Screenshots and input require every extension frame to be hidden (no layout box or `visibility: hidden`) and unfocused, including through nested documents or shadow roots. Opacity and position don’t count. Drop screenshots if a frame becomes visible; a race between the check and CDP reply is accepted. While a frame is present, refuse whole-page captures and new screencasts; stop active screencasts or drop their frames. Refusals name the extension frame, not seven. `protectedOrigins.extensionFrames` lists the schemes, methods and refusals; `protected.mjs` offers `extensionFrame(url)`.
|
|
159
159
|
|
|
160
160
|
`catalog.json`’s `protectedOrigins` holds the rules. `protected.json` tests them across bindings. `protected.mjs` exposes the engine synchronously:
|
|
161
161
|
|
|
@@ -166,7 +166,7 @@ import { protectedOrigins } from '@ai-ecoverse/slicc-browsers/protected.mjs';
|
|
|
166
166
|
const guard = protectedOrigins(catalog.protectedOrigins, ['http://127.0.0.1:5710']);
|
|
167
167
|
guard.url('https://seven.sliccy.ai/');
|
|
168
168
|
guard.cookieDomain('.sliccy.ai');
|
|
169
|
-
guard.
|
|
169
|
+
guard.frame({ url: 'about:blank', securityOrigin: 'https://seven.sliccy.ai' });
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
It also offers `storageKey(key)` and `unparseable(text)`.
|
package/catalog.json
CHANGED
|
@@ -751,7 +751,7 @@
|
|
|
751
751
|
"unprotectedLabels": ["get", "mcpcat", "echo", "lease-pilot"]
|
|
752
752
|
}
|
|
753
753
|
],
|
|
754
|
-
"schemes": ["https", "http"],
|
|
754
|
+
"schemes": ["https", "http", "ws", "wss"],
|
|
755
755
|
"innerSchemes": ["blob", "filesystem", "view-source"],
|
|
756
756
|
"anySchemes": ["devtools"],
|
|
757
757
|
"protectedSchemes": [
|
|
@@ -786,11 +786,19 @@
|
|
|
786
786
|
"inheriting": ["about:blank", "about:srcdoc"],
|
|
787
787
|
"errorPage": {
|
|
788
788
|
"url": "chrome-error://chromewebdata/",
|
|
789
|
-
"target": "
|
|
789
|
+
"target": "ownOrigin",
|
|
790
790
|
"redact": "origin"
|
|
791
791
|
},
|
|
792
792
|
"unparseable": "protected",
|
|
793
793
|
"unparseableRefusal": "slicc: refused: slicc can't parse this URL, so it could be a protected page",
|
|
794
|
+
"extensionWorlds": {
|
|
795
|
+
"schemes": [
|
|
796
|
+
"chrome-extension",
|
|
797
|
+
"moz-extension",
|
|
798
|
+
"safari-web-extension",
|
|
799
|
+
"ms-browser-extension"
|
|
800
|
+
]
|
|
801
|
+
},
|
|
794
802
|
"extensionFrames": {
|
|
795
803
|
"schemes": ["chrome-extension"],
|
|
796
804
|
"whenShown": [
|