Redact: the estate's one list of credential shapes (AHT-204) #3
Loading…
Reference in a new issue
No description provided.
Delete branch "redact"
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?
Adds
Redact(Go) andredact(Rust): the estate's one list of credential shapes, replacing each credential with***and keeping the text around it. For any field or message holding text from outside the program (command output or arguments, another tool's error text, URLs, headers). Work package: https://openproject.home.romaine.life/wp/AHT-204Why: fzt-automate's failure log can't join the NAS log pile until its
error=text is masked (at-home-tools docs/app-logs.md: a log joinsappLogsonly once what it writes holds no secrets). Today the masking lives in two private copies in at-home-tools (homesvc's container-logsecretPatterns, owner-guard'sRedact); this makes it one public list the estate shares. at-home-tools then deletes both copies and calls this.The list is the union of both copies, each pattern keeping its broader form:
code,state,sig,token,access_token,password,key, cloud signatures, ...)Authorization:headers with or without a scheme; bearer tokens; basic credentialsNAME=value/NAME: valuefortoken,password,passwd,secret,api_key,access_key,client_secret,pat; added:BW_SESSION(the Bitwarden CLI's session key, since bw-grant is an at-menu entry) and the JSON form"password": "x"(the shape a failing tool's error text usually takes)--token,--password,--secret,--api-key,--client-secretflagsClasses are spelled out in ASCII so Go's and Rust's regular expressions read them the same; the Rust crate gains a
regexdependency.Tests:
testdata/redact.jsonholds 25 cases (every case from both at-home-tools tests, plus the added shapes and lines that must stay untouched), run by bothredact_test.goandrust/tests/redact.rs; each also checks masking twice changes nothing. README gains "Masking credentials".ci-checkpassed.Not changed: the line format,
Logger(it doesn't mask on its own; callers pass outside text throughRedact).🤖 Generated with Claude Code