Repository navigation
fix(redaction): redact sensitive table rows in logged inputs - #10221
grapestore wants to merge 1 commit into
Conversation
Table sub-blocks store each row as { cells: { Key, Value } }, so a header
named Authorization is a cell value and key-based redaction never saw it.
Redact the Value of rows whose Key is a sensitive name.
Signed-off-by: inkyu-bae <inkyu.bae@navercorp.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The change reaches several logging and preview paths that share the redactor. Preserve recursive redaction of extra cell fields before merging. Findings
SummaryAdds table-row redaction to
Reviews (1) · Last reviewed commit: "fix(redaction): redact sensitive table r..." · Reviewed by Greptile |
| } else if (isSensitiveTableCells(key, value)) { | ||
| result[key] = { ...value, Value: REDACTED_MARKER } |
There was a problem hiding this comment.
Extra secrets escape redaction
The new branch skips recursive redaction for every field beside Value. redactApiKeys also receives arbitrary JSON from block inputs and workflow outputs, not just two-column tables. For example, {"cells":{"Key":"Authorization","Value":"token","password":"secret"}} now leaves password in plain text in logs; previously it was redacted. Nested secrets beside Value also escape.
Recursively redact the copied cells before replacing Value, and add a regression test for an extra sensitive field.
How this was verified: Block inputs are parsed as JSON and passed to redactApiKeys, where the new shallow copy preserves sensitive sibling fields instead of visiting them.
Summary
Table sub-blocks (such as the API block's Headers and Query Params) store each row as
{ cells: { Key, Value } }.redactApiKeysonly matches object keys, so a header namedAuthorizationis a cell value it never sees, and a token typed into the API block's Headers table is persisted in plain text in the block's logged input.This adds one branch to
redactApiKeys: when acellsobject has a stringKeythatisSensitiveKeymatches, itsValueis replaced with[REDACTED]. Other rows and the existing key-based redaction are unchanged.Secrets referenced through
{{NAME}}are already covered by the resolved-secret trace projection. This covers values typed directly into a table.Type of Change
Testing
bun vitest run lib/core/security/redaction.test.ts: 88 passed, including 3 new tests. The sensitive-row test fails without the change.bun vitest run lib/core/security lib/logs executor/execution: 1351 passed.Checklist