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.
Since 0.12.1 the library masks only the scheme and token of an
Authorization: <scheme> <value> header, so a logged one-line JSON prompt
keeps the rest of its line (issue #249, sensitive-data-sanitizer#45); the
pre-pass that did this here is gone (issue #253).
Structs§
- Prepared
Log - Private temporary copy; dropping it removes its file and directory.
Constants§
- BLOCK_
SIZE - MINIMUM_
VERSION - Requires control-byte preservation, placeholders and bounded dense scanning.
- 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 when it is missing or older than MINIMUM_VERSION.
- find_
sanitizer - The library CLI: START_SENSITIVE_DATA_SANITIZER, else sensitive-data-sanitizer on PATH.
- parse_
version major.minor.patchfrom--versionoutput such as0.12.1.- 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