Skip to content

Redact secrets in tool telemetry argsSummary #295

Closed

Description

@tt-a1i

Problem

Tool invocation telemetry stores argsSummary for generic tools by stringifying raw tool args. The runtime already imports redactSecrets, but summarizeArgs() currently truncates the raw JSON string without redaction. Desktop web search has a narrow wrapper-level scrub, but sibling tool callers still flow through the generic runtime telemetry path.

Evidence

  • packages/runtime/src/tool-runtime.ts records argsSummary: summarizeArgs(args) for tool invocation telemetry.
  • summarizeArgs() currently JSON.stringifys args and truncates them without calling redactSecrets.
  • packages/runtime/src/telemetry/record-tool-invocation.ts persists the summary without another redaction pass.

Proposed fix

Redact at the shared runtime summarization boundary, before truncation, so success and error telemetry paths get the same behavior. Add a focused contract test with sensitive arg names/values such as bearer tokens, API keys, and passwords.

Validation

  • Runtime telemetry test covering redacted argsSummary.
  • Workspace typecheck/test commands where available.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions