Log scrubber: redact rma_ API keys and tk_ Vikunja tokens #86

Merged
jfro merged 1 commit from fix-84-log-scrubber into main 2026-11-13 03:15:00 +00:00
Owner

What changed

The log scrubber now also redacts rma_ API keys (keeping their 10-character prefix readable) and tk_ Vikunja tokens; red-then-green C13, precommit C14.

Red, then green

  • The log scrubber replaces rma_ API keys and tk_ Vikunja tokens with [REDACTED], keeping a key's short rma_ prefix and words like stk_ untouched.: bash -o pipefail -c 'eval "$(mise activate bash --shims)"; MIX_ENV=test mix test test/rm_analyzer/log_scrubber_test.exs 2>&1 | tail -3'
    • fails on the base (60213ac): exit 1
    • passes on the branch (df7584d): exit 0

Checks

  • mix precommit passes on the #84 branch. (Upper Wolfjaw): bash -o pipefail -c 'eval "$(mise activate bash --shims)"; mix precommit 2>&1 | tail -3', exit 0
  • Read the diff and ApiKeys' key format; the rma_ and tk_ patterns redact full tokens, leave the 10-char prefix and stk_ words alone, and the tests fail on main. Untested: other Vikunja token formats, tokens glued to a preceding word character. (Prover): bash -o pipefail -c 'eval "$(mise activate bash --shims)"; MIX_ENV=test mix test test/rm_analyzer/log_scrubber_test.exs 2>&1 | tail -3', exit 0

Risks

Patterns are by shape: a tk_ word of 16+ letters/digits in a log line would be redacted too; a Vikunja token format other than tk_ plus alphanumerics wouldn't be. No docs change (no doc lists the scrubber's patterns). Branch is local only (fix-84-log-scrubber @ df7584d in ~/work/rm-analyzer-1-6-1/rm-analyzer-84).

Prover

Passed (Sonnet): Read the diff and ApiKeys' key format; the rma_ and tk_ patterns redact full tokens, leave the 10-char prefix and stk_ words alone, and the tests fail on main. Untested: other Vikunja token formats, tokens glued to a preceding word character.

Every command above was run by Fortysix's Basecamp itself, on the branch named.

## What changed The log scrubber now also redacts rma_ API keys (keeping their 10-character prefix readable) and tk_ Vikunja tokens; red-then-green C13, precommit C14. ## Red, then green - The log scrubber replaces rma_ API keys and tk_ Vikunja tokens with [REDACTED], keeping a key's short rma_ prefix and words like stk_ untouched.: `bash -o pipefail -c 'eval "$(mise activate bash --shims)"; MIX_ENV=test mix test test/rm_analyzer/log_scrubber_test.exs 2>&1 | tail -3'` - fails on the base (60213ac): exit 1 - passes on the branch (df7584d): exit 0 ## Checks - mix precommit passes on the #84 branch. (Upper Wolfjaw): `bash -o pipefail -c 'eval "$(mise activate bash --shims)"; mix precommit 2>&1 | tail -3'`, exit 0 - Read the diff and ApiKeys' key format; the rma_ and tk_ patterns redact full tokens, leave the 10-char prefix and stk_ words alone, and the tests fail on main. Untested: other Vikunja token formats, tokens glued to a preceding word character. (Prover): `bash -o pipefail -c 'eval "$(mise activate bash --shims)"; MIX_ENV=test mix test test/rm_analyzer/log_scrubber_test.exs 2>&1 | tail -3'`, exit 0 ## Risks Patterns are by shape: a tk_ word of 16+ letters/digits in a log line would be redacted too; a Vikunja token format other than tk_ plus alphanumerics wouldn't be. No docs change (no doc lists the scrubber's patterns). Branch is local only (fix-84-log-scrubber @ df7584d in ~/work/rm-analyzer-1-6-1/rm-analyzer-84). ## Prover Passed (Sonnet): Read the diff and ApiKeys' key format; the rma_ and tk_ patterns redact full tokens, leave the 10-char prefix and stk_ words alone, and the tests fail on main. Untested: other Vikunja token formats, tokens glued to a preceding word character. Every command above was run by Fortysix's Basecamp itself, on the branch named.
jfro added this to the v1.6.1 milestone 2026-11-13 03:08:34 +00:00
fix(logs): redact rma_ API keys and tk_ Vikunja tokens
All checks were successful
CI / test (pull_request) Successful in 1m47s
df7584dd92
The log scrubber caught JWTs and sk-ant- keys only. Neither token is
logged today; this keeps a future log line from leaking one. A key's
10-character prefix, shown to tell keys apart, stays readable.

Closes #84
jfro merged commit 4ddb337e63 into main 2026-11-13 03:15:00 +00:00
jfro deleted branch fix-84-log-scrubber 2026-11-13 03:15:00 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/rm-analyzer!86
No description provided.