Mask credentials in the failure log with logline.Redact (AHT-204) #162
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
queue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/fzt-automate!162
Loading…
Reference in a new issue
No description provided.
Delete branch "aht-204-redact-failures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fzt-automate's failure log masks credentials before writing, so it can join the NAS log pile (
appLogs). Work package: https://openproject.home.romaine.life/wp/AHT-204Why: at-home-tools docs/app-logs.md lets a log into
appLogsonly once what it writes holds no secrets. Every field here can carry outside text:nameis sometimes the whole action line (with arguments typed at run time, e.g.input:entries),errora failed command's output (e.g.bw-grant),directorya folder.Changed:
logFailurepassesname,directoryanderrorthroughlogline.Redact(logline v0.1.2, already taken up on main; the estate's one list) before cutting each to its bound, so a cut can't leave part of a credential unrecognised. Caps unchanged (16 KiB name/directory, 64 KiB error). The message returned for the screen is the original, unmasked.Tests:
TestFailureHistoryMasksCredentialslogs a failure per credential shape (URL parameter, bearer header, basic credentials,PASSWORD=, JSON field,BW_SESSION, secret flag, password in a URL, JWT, GitHub token, OpenBao token) in all three fields and checks each is written as***, none reaches the file, and the returned message is unchanged; checked to fail with the masking removed. README says the fields are masked.ci-checkpassed.🤖 Generated with Claude Code