Add a redaction format to the shared logger
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
Read common/src/logger.ts, mailer/redact.ts, send.ts:67, and AuditLog.ts:6 to understand the existing formats, redaction rules, and sensitive-field list. The issue leaves pattern selection, key-based redaction, performance and false-positive tradeoffs, and whether this belongs in common unresolved; settle those decisions before implementation. Done means the shared logger’s redaction scope and behavior are defined and validated without replacing the call-site fixes tracked in #943.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
common/src/logger.ts is plain winston with errors, timestamp, json and prettyPrint. Nothing redacts, so any call site that puts PII into a log line succeeds silently.
mailer/redact.ts already has rules for exactly this, including a blanket email-address regex, but they only run inside the mailer. send.ts:67 passes SMTP replies through redactString before logging them. Lifting those rules into a winston format would apply the same protection to every log line in the app, including ones not written yet.
This does not replace the call-site fixes
A pattern-based format cannot recognise a JWT, and on a participant profile it would scrub the email while leaving date of birth, home address and phone number. So this is defence in depth for the cases nobody thought about, not the fix for the known ones. Those are tracked in #943.
Open decisions
- Which patterns. Email addresses are straightforward, free-text names are not.
- Whether to redact by key name as well as by value shape.
passwordandtokenare reliable key names, andAuditLog.ts:6already keeps aSENSITIVE_FIELDSlist that could be shared rather than duplicated. - The cost of a regex pass on every log call, and the false positive risk on legitimate strings.
- Whether this belongs in
commonor stays backend-only.
Related: #936, #943
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 0
- Merge medio
- 14h 50m
- PR unite (30g)
- 5
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Garvan-Data-Science-Platform/ctrl
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
-
admin-client backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 commento ·
-
backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Tutte le issue di Garvan-Data-Science-Platform/ctrl
Issue simili
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OWASP/cve-lite-cli#1335 ·
I maintainer di solito rispondono entro 1 giorno
-
Windows: main-screen mouse tracking requires WT_SESSION, so it never enables inside herdr panesAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
code-yeongyu/senpi#3353 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Channels status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
mastra-ai/mastra#27093 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs-triage ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno