Expand description
Masking secret values in a task’s log and output (decision 167): each value the attempt
fetched, written ****.
A value is masked as it is, as JSON escapes it (" and \ in a value, a JSON log line;
also with every non-ASCII character as \uXXXX, as Python’s json.dumps writes it), as
Python’s repr quotes it (an exception’s message), and line by line when it spans several
lines; a form shorter than min_mask_length isn’t (masking 1 would mangle the log). In a
stored output a number equal to a value is masked too. Streams are masked as they are
copied, across the chunks they are read in: only bytes that could start a value are held
back, until the next chunk or the end.
Masking guards against a value shown by accident: a task holding a value can always write it in a form no mask knows (split between stdout and stderr, encoded, reversed).
Structs§
- Mask
- The mask a process’s output goes through: none, or an attempt’s values (compared by
identity, so a
crate::process::ProcessSpecstays comparable). - MaskSet
- The values masked for one attempt, and how often each was masked.
- Mask
Stream - A stream being masked (one per pipe: stdout and stderr each have their own).
Constants§
- MASK
- What a masked value is written as.