@ai-ecoverse/slicc-browsers 1.46.0 → 1.47.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 +2 -1
- package/fixture-server.mjs +1 -1
- package/guard-runner.mjs +1 -0
- package/guard-vectors.json +1399 -143
- package/package.json +3 -3
- package/protected-parent-iframes.mjs +551 -567
- package/schema/guard-vectors.schema.json +7 -0
package/README.md
CHANGED
|
@@ -185,7 +185,7 @@ For stock Playwright, Puppeteer and raw CDP clients, a guard that declares `stoc
|
|
|
185
185
|
- `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 its removal;
|
|
186
186
|
- exactly `Emulation.setFocusEmulationEnabled`, `setEmulatedMedia`, `setDeviceMetricsOverride` and `setTouchEmulationEnabled`;
|
|
187
187
|
- `Page.createIsolatedWorld` on a frame the guard already classifies as ordinary: strip `grantUniveralAccess` and `contentSecurityPolicy`, return no `executionContextId` for any other frame; `Runtime.addBinding` scoped to such a world by a non-empty `executionContextName` or its `executionContextId`, with `Runtime.bindingCalled` only from those worlds;
|
|
188
|
-
- `Target.setAutoAttach`: either narrow the filter to tab targets or hide per target; no protected-origin page, iframe
|
|
188
|
+
- `Target.setAutoAttach`: either narrow the filter to tab targets or hide per target; no protected-origin page, iframe or worker may reach the client; ordinary-origin children of a protected parent do reach it. A reported inherited origin is the frame’s own; pages under the tab are held like pages (same URL redaction in `targetInfo`); a transport that synthesizes it declares `syntheticAutoAttach`.
|
|
189
189
|
|
|
190
190
|
The strip holds whether or not a given Chrome lets that world reach another origin. Code init scripts, main-world bindings and other overrides stay refused or harmless. Admitted display overrides and no-code init scripts must not remain in effect on a protected document — refuse that navigation, or clear them before it runs. Undeclared, they skip, never pass.
|
|
191
191
|
|
|
@@ -219,6 +219,7 @@ You supply:
|
|
|
219
219
|
| capability | means the transport can |
|
|
220
220
|
| --- | --- |
|
|
221
221
|
| `autoAttach` | auto-attach to child targets |
|
|
222
|
+
| `protectedFrameDrivable` | keeps an ordinary page drivable while it holds a protected iframe; only that iframe is withheld |
|
|
222
223
|
| `iframeAutoAttach` | auto-attach non-tab child targets (out-of-process iframes) under a page session |
|
|
223
224
|
| `errorFrameClass` | tell whether a failed (error) iframe was loading a protected URL, without being given the URL |
|
|
224
225
|
| `browserSession` | send `Target.*` and `Browser.*` on the browser session |
|
package/fixture-server.mjs
CHANGED
|
@@ -138,7 +138,7 @@ function route(req, url, send, html, redirects) {
|
|
|
138
138
|
const marker = p.get('n') ?? '';
|
|
139
139
|
return html(
|
|
140
140
|
'oopif-srcdoc',
|
|
141
|
-
`<p>oopif-srcdoc ${escape(marker)}</p><iframe sandbox="allow-scripts allow-forms" srcdoc="${escape(`<!doctype html><title>srcdoc</title><p>ordinary srcdoc ${marker}</p>`)}"></iframe>`
|
|
141
|
+
`<p>oopif-srcdoc ${escape(marker)}</p><iframe${p.has('sandbox') ? ' sandbox="allow-scripts allow-forms"' : ''} srcdoc="${escape(`<!doctype html><title>srcdoc</title><p>ordinary srcdoc ${marker}</p>`)}"></iframe>`
|
|
142
142
|
);
|
|
143
143
|
},
|
|
144
144
|
'/held': () =>
|
package/guard-runner.mjs
CHANGED
|
@@ -1559,6 +1559,7 @@ class Execution {
|
|
|
1559
1559
|
protectedOrigin: this.vars.target,
|
|
1560
1560
|
cross: this.options.targets?.cross,
|
|
1561
1561
|
ordinary: this.vars.ordinary,
|
|
1562
|
+
browserSession: supported(['browserSession'], this.options.capabilities),
|
|
1562
1563
|
mode: step.protectedParentIframes,
|
|
1563
1564
|
tag: this.vars.tag,
|
|
1564
1565
|
internalSessions: this.internalSessions,
|