From ad4ef62f7b657007985db509617138d6e84f6432 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 1 Dec 2026 18:21:57 +0000 Subject: [PATCH] fix(teach): state network-swap candidates without promising a swap (#395) The recorder line now states that the password was found, as typed or encoded but not hashed, in exactly one stored request. docs/teach-mode.md says the never-in-the-page rung is not planned (#384/#394). The network_swap_candidate field is unchanged. Co-authored-by: Cycle Five --- crates/kharon-teach/src/cli.rs | 6 ++++-- docs/teach-mode.md | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/kharon-teach/src/cli.rs b/crates/kharon-teach/src/cli.rs index 7e93776..4328a34 100644 --- a/crates/kharon-teach/src/cli.rs +++ b/crates/kharon-teach/src/cli.rs @@ -302,7 +302,7 @@ pub fn summary(r: &Recording) -> String { )); out.push( if r.classification.network_swap_candidate { - "Network swap: this login looks like one where the password can be put in at the network level." + "Network swap: the password was found, as typed or encoded but not hashed, in exactly one stored request." } else { "Network swap: this login does not look like a candidate." } @@ -680,7 +680,9 @@ pub(crate) mod tests { ); assert!(s.contains("password is in the page for milliseconds")); assert!(s.contains("A captcha")); - assert!(s.contains("Network swap: this login looks like")); + assert!(s.contains( + "Network swap: the password was found, as typed or encoded but not hashed, in exactly one stored request." + )); assert!(s.contains("Note: a classifier note")); assert!(s.contains("Caution")); assert!(s.contains("5 typed value(s)")); diff --git a/docs/teach-mode.md b/docs/teach-mode.md index b547912..c9b1566 100644 --- a/docs/teach-mode.md +++ b/docs/teach-mode.md @@ -131,7 +131,7 @@ Strongest protection ("Strongest protection"), the best that kharon could do for | `agent_continues` | The agent has to continue after the fill. This is the case for two-step logins, logins with a captcha or a one-time-code step, and one-page logins where the password field was not in a form and no Enter key and no click on a button followed it. | | `needs_person` | A person has to look at the recording. This includes a two-step login whose password step is changed by the page, unless the change is a digest the program can name. With a named digest, the result is `agent_continues` and a note names the digest. | -"Network swap" says whether the password was found, as typed or encoded but not hashed, in exactly one stored request. Such a login might let kharon put the password in as the request leaves the browser, so the page never holds it. kharon cannot do this yet. The line records which logins might allow it. +"Network swap" records whether the password was found, as typed or encoded but not hashed, in exactly one stored request. Flags, each printed as "Flag:" with a sentence: @@ -328,7 +328,7 @@ Check a file with `kharon-teach show ` before you import it. For each fill ## What is not built yet -- Putting the password into the page without it ever sitting there, by swapping it into the request as it leaves the browser (rung 1 of #361, tracked in #384). Today the strongest rung is `milliseconds`: the password is in the page for the milliseconds between the fill and the submit. +- Putting the password into the page without it ever sitting there, by swapping it into the request as it leaves the browser (rung 1 of #361). This rung is not planned (see #384/#394). Today the strongest rung is `milliseconds`: the password is in the page for the milliseconds between the fill and the submit. - Logins with a one-time code. A recording notes the `otp_step` flag. A method has no step for it. - Sharing methods between brokers. A method lives in one broker's registry. Copy the file and import it on the other one. - Converting a login that needs a person (`unrecognized`, or a `transformed` login with no named digest). These are written by hand.