Expand description
Scrubbing plaintext secrets out of free text.
Typed values never leak: Value::Secret serializes and displays as
SECRET_MASK. Free text is different. A node that needs a secret’s plaintext
(an HTTP call, a code sandbox, an LLM provider) can get it echoed back inside an
error message, for example a provider error body that repeats the API key. These
helpers replace every occurrence of known secret values with SECRET_MASK.
The engine keeps a SecretSet per run (environment secrets, re-supplied resume
secrets, secret-typed inputs and node outputs) and scrubs every node error message
with it before the error is emitted, retried, stored or turned into outputs.
Structs§
- Secret
Set - The plaintext of every secret a run has seen, for scrubbing free text.
Constants§
- MIN_
SCRUB_ LEN - Secrets shorter than this are not scrubbed from text: masking every occurrence of a one- to three-character value would mangle messages without protecting anything an attacker could not guess.
Functions§
- redact_
secrets - Replace every occurrence of each of
secretsintextwithSECRET_MASK.