Skip to content

Commit 5d9fcdf

Browse files
authored
fix(audit): redact camelCase toolResult and toolArguments in audit trail (#329)
Tool results and arguments were only redacted under snake_case tool_result/tool_arguments, but audit payloads also carry them as toolResult/toolArguments (direct MCP and computer tool calls). The normalized check fell through because the set lacked the stripped forms toolresult/toolarguments, so plaintext secrets leaked into audit_events.payload. Add the two missing normalized keys so both spellings are covered. Verified with redactAuditPayload unit probes: snake, camel, nested, and upper-case variants now all return [REDACTED].
1 parent a3f1284 commit 5d9fcdf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎server/src/audit.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ const sensitiveKeys = new Set([
2929
"token",
3030
"tokens",
3131
"tool_arguments",
32+
"toolarguments",
3233
"tool_result",
34+
"toolresult",
3335
]);
3436

3537
export const auditEventTypes = [

0 commit comments

Comments
 (0)