Repository navigation
feat(logger-json): JSON logger with a fail-closed secret scrubber - #22
Conversation
|
| Topic | Details | ||||||
|---|---|---|---|---|---|---|---|
| Secret scrubbing | Implement redactString and scrubFields to remove secret-named values, credentials, tokens, URLs, unsafe objects, and oversized structures before serialization, with comprehensive safety and limit tests.Modified files (5)
Latest Contributors(1)
| ||||||
| JSON logger flow | Add createJsonLogger with configurable levels, destinations, clocks, child fields, timestamps, and event output while ensuring logging never throws.Modified files (6)
Latest Contributors(1)
|
2409c1c to
010b7a0
Compare
b4e97a3 to
1868ceb
Compare
1868ceb to
45d1d8c
Compare
🐕 Shuni ReviewNo new issues found. 🤖 Model: Review scope: Partial incremental re-review Reviewed new changes (2)
🐕 Review complete — View session on Shuni Portal 🐾 🤖 Model: |
Pull request was converted to draft
… structured key rule
Pull request was converted to draft
…ary values count as binary
Pull request was converted to draft
What changed
The JSON logger adapter
packages/adapters/logger-json: it implements the core logger port, writes one JSON object per line, and scrubs secrets fail-closed (a value it cannot judge is redacted, never printed). Tests cover the output format, the redaction rules and the size limits. 7 files, plus the workspace entry inbun.lock, the roottsconfig.jsonreference and a line inAGENTS.md.Rebased onto
main(the slices below it have merged); auto-merge is on.Why
Logs must never leak a token, a cookie or a password; the scrubber is tested against those cases before any server code can log anything.
How it was verified
From the branch:
bun install --frozen-lockfile, lint, typecheck, build,bun run test(1178 tests),bun run test:tools,bun run licence, gitleaks (this branch's history, as CI runs it, and the tree), actionlint, zizmor: all exit 0. The diff against its base is exactly the planned files plus the three named above.Visuals
Not applicable: no user-visible behaviour yet; the log format is shown in the test expectations.
Not here yet
The development-role adapters and everything that uses the logger (server).
Checklist