Repository navigation
Open
Labels
follow-upValid but deferred until after successful live test + v0.1.0Valid but deferred until after successful live test + v0.1.0parkedParked per the Lothrop Muses protocol: filed, not started without Lothrop's goParked per the Lothrop Muses protocol: filed, not started without Lothrop's go
Description
Follow-ups from the whole-branch review of the teach recorder (#361). None of these breaks a REQ-TCH row. They are listed so they are not lost.
Robustness against a busy or hostile page
- The CDP event channel is unbounded. A page that produces events faster than the recorder reads them grows memory. Make it bounded, or rate-limit listener reports.
- The listener reports script-dispatched events as if a person made them. Record
isTrustedon each report and do not count untrusted events as the person's steps. strip::touchedis quadratic in the URL length when a one-character value was typed.- A request body over 64 MiB is over the CDP frame limit. The session then ends and the file says the window was closed. Record transport loss as its own ending, or cap post data with
Network.enable'smaxPostDataSize. - A popup or frame whose setup fails is silently not watched. That should become a note or a flag in the recording.
Browser::closewaits for the child with no timeout, and the launch-failure path does not wait for the process group before it removes the profile.search_pairand the pair's whole-word check rebuild the base64 ofuser:passwordon every call. The single-marker needles are built once; these are not. Small cost, since no digests are involved.- The snap check reads the first 4 KiB of a
#!wrapper and skips it when the text mentions/snap/. A non-snap wrapper with that text in a comment is skipped too. The next candidate is tried, or the error says to pass--browser.
Classification
- A mistyped password followed by a correct retry on a reloaded page reads as two different passwords, so the recording is
unrecognized. Compare only the values in the last document that sent a password. - A typed value with outer whitespace that the site trims is not matched in kept text.
- The listener's
is_topand navigation's "first tab's main frame" disagree for a popup's top document. - Starting the recording only on the first tab means a link opened in a new tab never starts it. Start on the first page that leaves the notice.
Hardening
kharon-teach showon a file that does not parse prints serde's error line, which can carry bytes from the file, including terminal escape sequences. Print a fixed message. The summary itself already replaces control characters.- The DevTools port on 127.0.0.1 is reachable by any local process while a recording runs.
--remote-debugging-pipewould remove the port. - URL and attribute strings held during capture are plain
String, not zeroized.
Tests
- Classifier: a Document request that is not a main-frame navigation; a submitting click keeps
milliseconds; a child-frame navigation is not two-step; the earliest of two plain-hit requests picks the leg;needs_personwins over an earlieragent_continues. - A hello with the wrong nonce is ignored (no test today).
- Cleanup tests should assert that no browser process is left, everywhere they assert the profile is gone.
- The real-binary tests can leak a headless browser when an assertion fails midway (
Live::dropkills only the recorder).
To check on real systems
- Ubuntu's default Chromium is a snap. The recorder now skips it, on the reasoning that a snap cannot see a profile in
/tmp. That reasoning has not been checked on an Ubuntu machine.
Filed by Duet (kharon session). Refs #361.
Metadata
Metadata
Assignees
Labels
follow-upValid but deferred until after successful live test + v0.1.0Valid but deferred until after successful live test + v0.1.0parkedParked per the Lothrop Muses protocol: filed, not started without Lothrop's goParked per the Lothrop Muses protocol: filed, not started without Lothrop's go
Activity
cycle-five-duet commentedon Nov 19, 2026
Muse's seven Important items from her review of #364 (#364 (review)), filed here as she allowed. Line numbers are at
ab5a1d4.kharon-recording/src/classify.rs:172-186): an earliest plain-password carrier that is a non-main-frameDocument(a same-origin iframe form post,target=<iframe>) or anOtherrequest makes the whole loginunrecognized, even when a later clean leg exists. The design definesunrecognizedas "none of the above".body_unavailableis checked before the digest search (classify.rs:188-197vs:199-204): a confident digest hit plus any unrelated unavailable body classifiesunrecognized, against the "password found nowhere andbody_unavailable" definition.transformeddigest is unscoped (classify.rs:199-204): a digest hit anywhere (a breach-check call, say) names the transform while the real login goes encrypted. This is the one classification that errs in the unsafe direction.username_only_requesthas no lower time bound (classify.rs:163-167): it never consultsusername_t, so the first navigation to a prefill link (/login?email=…,t=0) makes every such logintwo_step.capture/mod.rs:321,capture/resolve.rs:173): keystroke prefixes and in-page corrections never become markers, so a route that mirrors them (/u/<typo>,/search/<prefix>) keeps them. Mistypes separated by a reload are covered. If the in-page case is an accepted limit, REQ-TCH-002's "every value typed in the window" should say so.cdp.rs:38,:354), against the module's own "errors are built from fixed words and numbers only" (cdp.rs:5-6). No path builds one from a typed value today, since thegetRequestPostDataerror is swallowed, but the documented invariant does not hold.browser.rs:233-270): the owner file can be forged (name shape plus a dead pid), so "it never removes a directory it did not make" claims more than the code delivers. The risk is low. A random token in the owner file, or softer wording, closes it.Items 2 to 4 of her Required list are fixed on #364 at
1cb3f7b(host labels, CSS unescape,cross_sitewording); the REQ-TCH-003 row change is still to land.Duet (kharon session)
Generated by Claude Code