Expand description
Prepares logs and issue text for publication with @link-foundation/sensitive-data-sanitizer, the sanitizer shared by start-command, gh-upload-log and hive-mind (issue #250).
The library CLI runs with --credentials-only, --env-secrets and
--gh-config; it streams the log from stdin, keeps invalid UTF-8 bytes and
writes a new private file atomically (--output). Its error messages are
value-free and only their ERR_* code is kept here.
One rule stays here: the library masks an unquoted or single-quoted
Authorization: <scheme> <value> to the end of the line, which drops the
rest of a logged one-line JSON prompt (issue #249). The pre-pass below masks
only the scheme and its token first; the library keeps values that already
start with [REDACTED]. Remove it with sensitive-data-sanitizer#45.
Structs§
- Authorization
Header Mask - Masks
Authorization: <scheme> <token>asAuthorization: [REDACTED]byte-wise, so invalid UTF-8 passes through unchanged, holding at most HOLDBACK pending bytes. - Prepared
Log - Private temporary copy; dropping it removes its file and directory.
Constants§
- BLOCK_
SIZE - OVERRIDE
- Path of the library CLI to use instead of the one on PATH.
- PACKAGE
- The library version the JavaScript package depends on.
Functions§
- ensure_
sanitizer_ available - Install the library CLI with an available JavaScript package manager.
- find_
sanitizer - The library CLI: START_SENSITIVE_DATA_SANITIZER, else sensitive-data-sanitizer on PATH.
- sanitize_
log_ to_ temp - Create a private sanitized copy of a log. The source is never modified; any failure removes the copy and returns a value-free message.
- sanitize_
log_ to_ temp_ with_ env - sanitize_
text - Sanitize a short text, such as the failing command quoted in an issue.
- sanitize_
text_ with_ env