@botiverse/porthole 0.14.3 → 0.14.4
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/CHANGELOG.md +59 -0
- package/dist/check/page-source.js +1 -1
- package/dist/conformance/harness-source.js +1 -1
- package/dist/host/locate.d.ts +1 -1
- package/dist/host/locate.js +2 -2
- package/dist/isolation/served.d.ts +17 -1
- package/dist/isolation/served.js +24 -1
- package/dist/isolation/types.d.ts +5 -0
- package/dist/isolation/types.js +5 -0
- package/dist/platform/focus-guard.d.ts +40 -0
- package/dist/platform/focus-guard.js +176 -32
- package/dist/platform/web.js +24 -9
- package/dist/server/files.js +7 -7
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/nested.d.ts +13 -7
- package/dist/server/nested.js +31 -9
- package/dist/server/server.js +5 -2
- package/dist/shell/frame.d.ts +5 -2
- package/dist/shell/frame.js +41 -18
- package/docs/ADOPTING.md +32 -14
- package/docs/ARCHITECTURE.md +5 -1
- package/docs/DECISIONS.md +312 -2
- package/docs/DESIGN.md +8 -3
- package/docs/THREAT_MODEL.md +85 -30
- package/package.json +1 -1
- package/src/host/locate.ts +2 -2
- package/src/isolation/served.ts +29 -0
- package/src/isolation/types.ts +6 -0
- package/src/platform/focus-guard.ts +218 -34
- package/src/platform/web.ts +29 -12
- package/src/server/files.ts +5 -6
- package/src/server/index.ts +1 -0
- package/src/server/nested.ts +44 -12
- package/src/server/server.ts +5 -4
- package/src/shell/frame.ts +43 -18
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,65 @@
|
|
|
4
4
|
section); the reasons for every change are in [docs/DECISIONS.md](docs/DECISIONS.md), by the
|
|
5
5
|
P-numbers below.
|
|
6
6
|
|
|
7
|
+
## 0.14.4
|
|
8
|
+
|
|
9
|
+
- **Docs (P123):** a display taking the keyboard is an accepted risk (THREAT_MODEL §5): the guard
|
|
10
|
+
stays best effort, and no new rule covers slower typists. P122's entry says what its reading of
|
|
11
|
+
the typing before an activation loosens (porthole#81).
|
|
12
|
+
- **Security (P122, after 0.14.4's CI):** full Chromium let a nested page that took the keyboard
|
|
13
|
+
while the person typed keep it (its first key reached the page before the shell answered the
|
|
14
|
+
host's ask, and passed for a press). No press of the person's comes within 250 ms of a key they
|
|
15
|
+
typed on the host's page: a move into a nested page's frame, or its shell's activation turning
|
|
16
|
+
on, that soon is taken back as the page's, on every engine. And P120's pointer rule now reads the
|
|
17
|
+
person's typing before the activation, never after (a key typed after a real press, before the
|
|
18
|
+
shell's word came, made it look like a key). Cost: a real press into a nested page within 250 ms
|
|
19
|
+
of typing on the host's page is taken back (no person's hand is that fast).
|
|
20
|
+
- **Tests (P122):** `leak/served/nested-key.spec.ts` (negative control `key-press`); the honest
|
|
21
|
+
cases that type and then press the page pause 400 ms between, as a hand does; the in-set link
|
|
22
|
+
cases (`navigate-guard`'s probes) fail by their verdict when the display restarts under it.
|
|
23
|
+
|
|
24
|
+
- **Changed (P121, after the audit of 0.14.2):** a nested page's shell runs on a `porthole-` label
|
|
25
|
+
of its own alone, outside `/server` too: `createHost` refuses a nested page located on any other
|
|
26
|
+
label (a host error, `locate`; no frame is made), the shell frames nothing and says nothing on
|
|
27
|
+
another origin, and `nestedShellResponse` and `frameShellScript` throw for one. A content Worker
|
|
28
|
+
of a host's own that served the shell on its scope's label (0.14.0's layout) now fails closed.
|
|
29
|
+
- **New (P121):** `nestedFileCsp(role, directives)` from `/server`: a nested page's CSP
|
|
30
|
+
(`sandbox allow-scripts`), a script's (`sandbox`), any other file's (inert), as `/server` sends
|
|
31
|
+
them, for a content Worker of a host's own (ADOPTING "Nested pages").
|
|
32
|
+
- **Docs (P121):** `annotations.clearSelection()` tells the page when the person was done with its
|
|
33
|
+
selection (it sees the clear); ADOPTING now clears on every close of the composer, never only
|
|
34
|
+
when a draft is added (which told the page a draft exists). THREAT_MODEL §6's guard names
|
|
35
|
+
`tracked`, and ADOPTING's React example arms the card again as it moves.
|
|
36
|
+
- **Tests (P121):** `leak/served/nested-siblings.spec.ts` `[nested-label]` (negative control
|
|
37
|
+
`nested-host-label`); `shell-label` now runs with `nested-host-label` and `nested-shell-origin`;
|
|
38
|
+
`test/nested.test.ts` (the helpers' refusals, the shell on another origin, `nestedFileCsp`).
|
|
39
|
+
|
|
40
|
+
- **Security (P120, porthole#56, the audit's NG-1):** on Firefox a nested page that focused its
|
|
41
|
+
field as it loaded, and again whenever it lost focus, got everything the person typed in the
|
|
42
|
+
host's composer and was never stopped: the guard waited for the shell's word on the page's move,
|
|
43
|
+
and the person's next key, landing in the page, turned the shell's activation on as a press
|
|
44
|
+
would. Now a nested frame that takes focus again while the guard is taking it back is judged as
|
|
45
|
+
any frame is (a Tab, the host's own move, a press the engine shows), taken back at once and
|
|
46
|
+
counted toward the stop, and an activation it reports then is no gesture (`comments.open`
|
|
47
|
+
included); a wait never ends with the frame let be; the host asks the shell to look as it hears
|
|
48
|
+
a move (`porthole/shell/look`), so a key typed a frame later can't pass for a press; and where
|
|
49
|
+
the host's page sees the pointer over its frames (Firefox, and frames in the host's process), an
|
|
50
|
+
activation with the pointer elsewhere, within a second of typing on the host's page, is no press.
|
|
51
|
+
Measured: Firefox, at most 2 keys of a sentence to the page, stopped. Cost: a press back into
|
|
52
|
+
the page within 300 ms of focus going back to the host's field is taken back on full Chromium.
|
|
53
|
+
Residual on full Chromium (neither the host nor the shell sees the pointer there): a key typed
|
|
54
|
+
before the shell answers the ask passes for a press, the page keeping the keyboard and getting
|
|
55
|
+
`comments.open`; and so, more often, on Chromium with the page's frames in the host's process
|
|
56
|
+
(Chrome on Android, the headless shell) until the host has seen the pointer over one of its
|
|
57
|
+
frames (THREAT_MODEL §7). After its review, whether a key passes for a press is judged when the
|
|
58
|
+
activation turns on, not a second later.
|
|
59
|
+
- **Tests (P120):** `leak/served/nested.spec.ts`: a page that holds the keyboard from its load and
|
|
60
|
+
takes it back on its own blur (negative control `nested-fight`); `leak/served/nested-keyboard.spec.ts`:
|
|
61
|
+
one that starts while the person types (its `comments.open` on a key it got reaches no handler; a
|
|
62
|
+
race, no control's probe); the guard driven directly: an activation that came as the person typed,
|
|
63
|
+
the pointer elsewhere, is no gesture (negative control `pointer-rule`). `test/nested.test.ts`:
|
|
64
|
+
the pointer rule, and the shell's answer to the host's ask.
|
|
65
|
+
|
|
7
66
|
## 0.14.3
|
|
8
67
|
|
|
9
68
|
- **Changed (P119, part of porthole#42):** on touch, an annotation marker takes a tap anywhere in a
|