@ai-ecoverse/slicc-browsers 1.19.2 → 1.20.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 CHANGED
@@ -165,6 +165,8 @@ Browser control must never navigate to, open, attach to, or read the cookies or
165
165
 
166
166
  URLs are judged the way the browser parses them, so `blob:`, `view-source:` and `about:` aliases, backslashes, encoded dots and full-width letters can't sneak past. A URL the guard can't parse counts as protected wherever the browser might load it. A tab that seven opened keeps seven's origin when it goes to `about:blank`. A refused call fails with `slicc: refused: target is on seven's origin`.
167
167
 
168
+ A browser extension's frame inside an ordinary page, such as a password manager's autofill list, doesn't make the tab protected. The frame itself stays out of reach: it can't be attached or read, and its URL never appears in target discovery, page reads, snapshots, accessibility trees or evaluate results. The tab's own page can still be read and snapshotted. Screenshots and input are allowed only while every extension frame is hidden (no layout box or `visibility: hidden`) and none holds focus through nested documents or shadow roots; a screenshot taken while one became shown is thrown away. Opacity and position don't count as hidden. A race between the visibility or focus check and the CDP reply is accepted. Whole-page captures and starting a screencast are refused while any extension frame is in the tab. If a screencast is already running when an extension frame appears, the guard stops it or drops every later `Page.screencastFrame` until the frame is gone; refusing `Page.startScreencast` on a clean tab is also fine. These refusals name the extension frame, not seven. A frame from the program's own extension, and any other protected frame, still makes the whole tab protected. `protectedOrigins.extensionFrames` lists the schemes, the methods and the refusals, and `protected.mjs` offers `extensionFrame(url)`.
169
+
168
170
  `catalog.json`'s `protectedOrigins` holds the rules, and `protected.json` the vectors: URLs, targets, cookie domains and storage keys, each with the expected answer. `protected.mjs` is the reference implementation:
169
171
 
170
172
  ```js
@@ -228,6 +230,7 @@ You supply:
228
230
  | `discovery` | report target creation and changes without a session |
229
231
  | `chromeUrlsAttach` | attach to `chrome://` pages (CDP over a DevTools port can; `chrome.debugger` can't) |
230
232
  | `extensionWorld` | host a foreign extension's content script on the test page |
233
+ | `extensionFrame` | host the harness extension, whose frame an ordinary test page embeds |
231
234
  | `clientExit` | close the guarded client in the middle of a row |
232
235
  | `siteIsolationOff`, `inboundDelay`, `forwardAudit` | run without site isolation, hold the browser's messages to the guard, and audit what the guard forwarded |
233
236
 
package/catalog.json CHANGED
@@ -745,6 +745,30 @@
745
745
  },
746
746
  "unparseable": "protected",
747
747
  "unparseableRefusal": "slicc: refused: slicc can't parse this URL, so it could be a protected page",
748
+ "extensionFrames": {
749
+ "schemes": ["chrome-extension"],
750
+ "whenShown": [
751
+ "Page.captureScreenshot",
752
+ "Input.dispatchKeyEvent",
753
+ "Input.dispatchMouseEvent",
754
+ "Input.dispatchTouchEvent",
755
+ "Input.dispatchDragEvent",
756
+ "Input.emulateTouchFromMouseEvent",
757
+ "Input.insertText",
758
+ "Input.imeSetComposition",
759
+ "Input.synthesizePinchGesture",
760
+ "Input.synthesizeScrollGesture",
761
+ "Input.synthesizeTapGesture"
762
+ ],
763
+ "whilePresent": [
764
+ "Page.captureSnapshot",
765
+ "Page.printToPDF",
766
+ "Page.startScreencast",
767
+ "HeadlessExperimental.beginFrame"
768
+ ],
769
+ "shownRefusal": "slicc: refused: a browser extension's frame (chrome-extension://) is showing or focused in this tab, such as a password manager's autofill list; close it or reload the tab",
770
+ "presentRefusal": "slicc: refused: this tab holds a browser extension's frame (chrome-extension://), such as a password manager's autofill list, so it can't be captured whole or streamed; reload the tab to remove it; an active screencast is stopped or its frames are dropped until the frame is gone"
771
+ },
748
772
  "refusal": "slicc: refused: target is on seven's origin"
749
773
  },
750
774
  "profiles": {