@ai-ecoverse/slicc-browsers 1.29.1 → 1.30.1
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 +9 -8
- package/guard-driver.mjs +5 -1
- package/guard-runner.mjs +494 -9
- package/guard-vectors.json +704 -3
- package/package.json +3 -3
- package/schema/guard-vectors.schema.json +74 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ One catalog, four vector sets and schemas, shared as a Go module, Rust crate and
|
|
|
20
20
|
|
|
21
21
|
| file | what it is |
|
|
22
22
|
| --- | --- |
|
|
23
|
-
| [`catalog.json`](catalog.json) | every known Chromium browser and Electron app,
|
|
23
|
+
| [`catalog.json`](catalog.json) | every known Chromium browser and Electron app, and the rules for finding, ranking and launching them ([below](#the-catalog)) |
|
|
24
24
|
| [`corpus/`](corpus), `corpus.json` | discovery conformance cases: a fake machine each, with the ranked browser list it must produce |
|
|
25
25
|
| [`protected.json`](protected.json), [`protected.mjs`](protected.mjs) | protected-origin test vectors, and a reference matcher in JavaScript |
|
|
26
26
|
| [`guard-vectors.json`](guard-vectors.json) | the CDP scenarios every guard must pass |
|
|
@@ -105,19 +105,19 @@ The catalog is `"schema": 1`. Minor releases only add fields; changing or removi
|
|
|
105
105
|
|
|
106
106
|
## Discovery
|
|
107
107
|
|
|
108
|
-
A program lists the browsers it can attach to, from four sources: `DevToolsActivePort` files in known user-data dirs and SLICC profiles, `--cdp` URLs, a probe
|
|
108
|
+
A program lists the browsers it can attach to, from four sources: `DevToolsActivePort` files in known user-data dirs and SLICC profiles, `--cdp` URLs, a port probe, and the process list. It ranks the endpoints, adds the installed browsers it could launch, and prints the list in the shape of [`schema/browsers.schema.json`](schema/browsers.schema.json). Seven's tabs are reported by origin only, never with a path, query or title.
|
|
109
109
|
|
|
110
110
|
### The process source
|
|
111
111
|
|
|
112
|
-
The process scan finds browsers that something else started with `--remote-debugging-port`.
|
|
112
|
+
The process scan finds browsers that something else started with `--remote-debugging-port`. The exact parsing rules are in `catalog.json`'s `discovery.process` and the corpus's `process-*` cases.
|
|
113
113
|
|
|
114
114
|
### SLICC six's profiles
|
|
115
115
|
|
|
116
|
-
SLICC six, the previous generation, launches Chrome in a profile of its own
|
|
116
|
+
SLICC six, the previous generation, launches Chrome in a profile of its own. Discovery lists such an endpoint, marks it `six: true` and ranks it last, but **never picks it by itself**. Only an explicit request, such as `slicc --profile six`, uses it. The roots per OS are in `catalog.json`'s `profiles.six`.
|
|
117
117
|
|
|
118
118
|
## The corpus
|
|
119
119
|
|
|
120
|
-
Each case in `corpus/<case>/` is a fake machine: a home directory, `DevToolsActivePort` files, fake `/json/version` and `/json/list` answers, a fake process list, `--cdp` URLs and installed browsers. `expected.json` holds the ranked list it must produce. `case.json`'s `needs` say what a program must support to run the case
|
|
120
|
+
Each case in `corpus/<case>/` is a fake machine: a home directory, `DevToolsActivePort` files, fake `/json/version` and `/json/list` answers, a fake process list, `--cdp` URLs and installed browsers. `expected.json` holds the ranked list it must produce. `case.json`'s `needs` say what a program must support to run the case, and a program skips cases it can't run.
|
|
121
121
|
|
|
122
122
|
For each case, a test harness:
|
|
123
123
|
1. writes the case's files into a temporary home;
|
|
@@ -154,7 +154,7 @@ for case in corpus().cases {
|
|
|
154
154
|
}
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
slicc-cli's `test/integration/corpus_test.go` is a complete harness.
|
|
157
|
+
slicc-cli's `test/integration/corpus_test.go` is a complete harness.
|
|
158
158
|
|
|
159
159
|
## Protected origins
|
|
160
160
|
|
|
@@ -185,7 +185,7 @@ Credential origins (`catalog.credentialOrigins`) withhold cookie/storage export
|
|
|
185
185
|
|
|
186
186
|
## Guard vectors
|
|
187
187
|
|
|
188
|
-
A guard sits between a CDP client and the browser and keeps the client away from protected origins. `guard-vectors.json` holds the attacks every guard must pass
|
|
188
|
+
A guard sits between a CDP client and the browser and keeps the client away from protected origins. `guard-vectors.json` holds the attacks every guard must pass.
|
|
189
189
|
|
|
190
190
|
Each vector runs twice. The **control** runs against an ordinary origin and must work. The **guarded** leg runs through the guard against a protected target and must be refused or have no effect. A **liveness** check outside the guard proves the target was really there. All three must pass.
|
|
191
191
|
|
|
@@ -243,6 +243,7 @@ You supply:
|
|
|
243
243
|
| `siteIsolationOff`, `inboundDelay`, `forwardAudit` | no site isolation; hold inbound; audit forwarded commands |
|
|
244
244
|
| `secureOrigin` | HTTPS origins (service workers) |
|
|
245
245
|
| `stockSetup`, `syntheticAutoAttach` | admit stock clients' setup calls; synthesize auto-attach |
|
|
246
|
+
| `explicitAttach` | attach only explicitly (no init-script check on a popup's first document) |
|
|
246
247
|
| `closeProtected` | close a protected tab, except live vault/seven-UI disguises |
|
|
247
248
|
| `signInHold` | hold seven's sign-in popups and hide callback-only authorize tabs (incl. callback-origin) without over-blocking ordinary ones |
|
|
248
249
|
| `jsonList` | expose `/json/list` (`client.jsonList` / `devtoolsHttp`); missing → not-supported, or incomplete if declared |
|
|
@@ -270,7 +271,7 @@ You need Go 1.26, Rust stable with `wasm32-wasip1`, Node 24+, and Chrome or Chro
|
|
|
270
271
|
| --- | --- |
|
|
271
272
|
| `npm run corpus` | rebuilds `corpus.json` from `corpus/` |
|
|
272
273
|
| `npm run validate` | checks every file against its schema and the rules a schema can't express, and runs `protected.json` through `protected.mjs` |
|
|
273
|
-
| `npm run lint` |
|
|
274
|
+
| `npm run lint` | the JavaScript, Go and Rust linters and formatters, and a `wasm32-wasip1` check of each feature |
|
|
274
275
|
| `npm test` | every file in `test/integration/`: validation, the Node, Go and Rust tests, and the reference runner against real Chromium with no guard, where every control must pass and every protection must fail |
|
|
275
276
|
| `npm run build` | the Go module, the crate (also for `wasm32-wasip1`), and the npm package |
|
|
276
277
|
|
package/guard-driver.mjs
CHANGED
|
@@ -378,6 +378,8 @@ function declaredCapabilities(value) {
|
|
|
378
378
|
return [];
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
+
const autoAttachCaps = ['autoAttach', 'stockSetup', 'syntheticAutoAttach'];
|
|
382
|
+
|
|
381
383
|
function skipWhy(vector, row, known, guard, declared) {
|
|
382
384
|
const { reason } = row;
|
|
383
385
|
if (typeof reason !== 'string' || reason === '') return 'skip without a reason';
|
|
@@ -389,8 +391,10 @@ function skipWhy(vector, row, known, guard, declared) {
|
|
|
389
391
|
: `skip with a reason the runner never gives: ${reason}`;
|
|
390
392
|
if (reason.startsWith('not-supported:')) {
|
|
391
393
|
const cap = reason.slice('not-supported:'.length);
|
|
392
|
-
if (
|
|
394
|
+
if (['extensionFrame', 'explicitAttach'].includes(cap) && declared.includes(cap))
|
|
393
395
|
return `skip with not-supported:${cap} while the run declared ${cap}`;
|
|
396
|
+
if (autoAttachCaps.includes(cap) && (vector?.requires ?? []).includes('explicitAttach'))
|
|
397
|
+
return `skip with not-supported:${cap} on an explicitAttach row`;
|
|
394
398
|
if (known.has(cap)) return null;
|
|
395
399
|
}
|
|
396
400
|
return `skip with a reason the runner never gives: ${reason}`;
|