Skip to content

Commit 08bc639

Browse files
Redact args in the logs of audit log service
1 parent 45070dd commit 08bc639

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/server/src/audit/AuditLogService.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ export class AuditLogService {
5353
action: method,
5454
args: argsScrubbed,
5555
};
56-
log.info("audit", new TrustedValue(logEntry));
56+
const logEntryForLogging = {
57+
...logEntry,
58+
args: ["[redacted]"],
59+
};
60+
61+
log.info("audit", new TrustedValue(logEntryForLogging));
5762
await this.dbAuditLog.recordAuditLog(logEntry);
5863
}
5964

0 commit comments

Comments
 (0)