Skip to content

redact passwords only, and say what each step did in the log - #93

Draft
priyanshujain wants to merge 7 commits into
masterfrom
redact-only-passwords
Draft

redact passwords only, and say what each step did in the log#93
priyanshujain wants to merge 7 commits into
masterfrom
redact-only-passwords

Conversation

@priyanshujain

Copy link
Copy Markdown
Owner

android was redacting every typed value, not just passwords. turns out maestro's tree mapper copies a fixed attribute list off the device xml and password isn't on it, so nothing on android ever reported the fact and the conservative rule redacted everything. sidecar now re-reads that xml once per settled snapshot and puts the fact back on the text fields it can match, anything it can't match stays redacted.

also the step log was useless. it now says screen, action, target and the typed value (through the same redaction), and screen isn't empty on native any more, it falls back to the *Screen route marker in the tree.

verified on all three targets with real folio runs. android: password redacted, email/account name/amount in clear. ios and web: screen name and log format fine.

one thing i found and did not fix, written up in docs/manual/runs.md: ios and web both state secure:false for a compose password field because they derive it from a widget type compose never has, so the password lands in the trace in clear text there. separate change.

The screen name was web-only: the Chrome driver stamps sanderling-screen on
the root and nothing else does, so every Android and iOS step recorded and
logged an empty screen. The route marker the tree already carries (the
resource id ending in Screen, the same one Transitional counts) names it.
One line per step carried only an index and a node count. It now names the
screen, the action, its target and the typed value, the last through the
same redaction the trace and the prompt use. Emitted after the apply so the
line reports what actually happened, skip reason included.
maestro's tree mapper copies a fixed attribute list off the device's XML and
password is not on it, so no android element ever reported the fact and the
conservative rule downstream redacted every typed value in the trace, the
prompt and the log. The XML still carries it: re-read it once per settled
snapshot and state the fact on the text fields it matches. A field it cannot
match stays unstated, which still reads as a credential.
Four places said android reports the fact for nothing and that every typed
value there is redacted. The sidecar now states it, so they described the
old behaviour.
collectTextFields matched on class only, so a node the go side calls editable
off its hintText was left unstated and its typed value redacted.
… fields

Both derive the fact from a widget type a compose app never has, so the
value reaches the trace in the clear. Verified on folio on both targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant