Skip to main content

Module shown_once

Module shown_once 

Source
Expand description

A secret a web page shows once: a new OAuth client secret, an app registration’s client secret, a key next to a Copy button (docs/specs/SPEC_VAULT_GENERATE_CAPTURE_AND_BROWSER_SIGNINS_2026_10_28.md §15.1).

The shape alone would hide too much (a long identifier, a path), so callers use it only where a page shows such a value: a read-only field, a code, pre, kbd or samp element, or the row or container of a button named like “Copy”. There, a value with the shape is hidden from the agent, which saves it with Browser capture instead of reading it.

Constants§

SHOWN_ONCE
What the agent sees in place of the value.

Functions§

has_shown_once
Whether text holds a value with that shape.
looks_shown_once
Whether one whitespace-free piece of text has the shape of a one-time secret: 20 to 512 characters, at least two of lowercase, uppercase, digits and symbols, and not a GUID, pure hex (a commit SHA, which agents need) or a URL.
mask
text with every value of that shape replaced by SHOWN_ONCE; the rest, and its spacing, as it was.