Repository navigation
fix(workbench): redact sensitive fields in run result JSON - #13
Conversation
The Agent Workbench Result panel stringified run.wait() output, so sessionKey, token, password, and nested key fields appeared in the browser. Recipes and starter CLIs already redact. Copy the standalone redact helper into the workbench example and format the Result JSON through it. Keep the helper local so the browser example does not import recipes/_shared/run-main.ts. Restores the closed unmerged PR 10 fix after a rebase-push race. Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 10:44 PM ET / September 8, 2026, 02:44 UTC. ClawSweeper reviewWhat this changesAgent Workbench masks sensitive field names in its Result JSON using a local helper, with regression tests and documentation of the masking limits. Merge readiness✅ Ready for maintainer review The fix remains necessary on main, and the fresh final-head browser report resolves the previous proof concern. No blocking patch defects were found. Priority: P2 Review scores
Verification
How this fits togetherAgent Workbench is a copyable browser starter that sends run settings to the SDK and displays streamed events and final results. This change filters the final result for display without changing SDK requests or session controls. flowchart LR
A[Run controls] --> B[SDK run]
B --> C[Assistant stream and events]
B --> D[Final result]
D --> E[Field-name masking]
E --> F[Result JSON panel]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep masking at the Result display boundary, preserve independently copyable browser code, and retain the explicit limits on field-name masking. Do we have a high-confidence way to reproduce the issue? Yes. The captured browser report reproduces raw session output on the pinned main baseline through Run → wait → Result, consistent with inspected source; this reviewer did not execute the app. Is this the best way to solve the issue? Yes. A display-only helper follows the existing standalone CLI pattern, avoids importing Node-only recipe code into the browser, and leaves SDK state intact. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against d4c2718b8a7c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Verified the exact PR head Built the baseline (
Both screenshots were inspected and contain only synthetic local data. This proves the Result display boundary using the supported local shim; it does not claim live Gateway/provider verification or whole-page redaction. The implementation and tests were retained as submitted. A maintainer documentation commit clarifies the exact field-name policy and its limits. The screenshots show the same implementation before that documentation-only commit; rebuilding and repeating the browser run at the final head produced the same redacted result (run |


Agent Workbench renders the raw
run.wait()result, exposing the session key in its Result JSON. Apply the cookbook's existing field-name redaction convention at the Result display boundary, matching recipes and the standalone CLIs.The helper remains local so this browser starter stays independently copyable without importing Node-only recipe code. SDK state, session controls, and assistant text keep their existing behavior. The README explicitly describes the name-based matching, its overmasking, and its limits; this does not sanitize an entire page or recording.
This restores the fix from closed, unmerged #10 on current main. The cause of that earlier closure is unconfirmed. The implementation and regression tests are by @SebTardif; the maintainer clarified the documentation and captured fresh browser proof.
Validation
pnpm check: formatting, types, lint, all 23 tests, documentation for six recipes, all four starter builds, and both compiled CLI smokes pass.[REDACTED]. Both complete with three events andhello from OpenClaw.pnpm audit --json: zero vulnerabilities. Independent autoreview through P2 is clean; final head8ab8dc14823d2da5b6a563252a56e3ddee6c12dbpassed Check. Maintainer proof includes the final-head browser rerun after the documentation clarification.The changelog entry is in the separate final notes PR #14, to merge after this one. Merge and first-release decisions remain with the maintainer.