Add content redaction controls and mask API key input#11
Open
Add content redaction controls and mask API key input#11
Conversation
Introduce three env vars to control what sensitive content is included in exported trace spans: - ARIZE_LOG_PROMPTS (default: on) — user prompts. Model responses are always included. - ARIZE_LOG_TOOL_DETAILS (default: off) — what tools were asked to do: bash commands, file paths, URLs, grep patterns. - ARIZE_LOG_TOOL_CONTENT (default: off) — what tools returned: file contents, command output, API responses. When a flag is off, content is replaced with <redacted (N chars)>. Redaction is applied across all Claude Code hooks and Codex notify.sh. Setup.sh now prompts users to choose their content logging level during interactive setup, with a security note explaining the tradeoffs. Also masks API key input in setup.sh (read -sp instead of read -p).
3ae284b to
c826e3b
Compare
duncankmckinnon
approved these changes
Apr 6, 2026
dirkbrnd
requested changes
Apr 10, 2026
Collaborator
dirkbrnd
left a comment
There was a problem hiding this comment.
Only blocking because we are refactoring to python, so these will have to be updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ARIZE_LOG_PROMPTS(default: on) — user prompt text. Model responses are always included.ARIZE_LOG_TOOL_DETAILS(default: off) — tool arguments like bash commands, file paths, URLs, search patterns.ARIZE_LOG_TOOL_CONTENT(default: off) — full tool input/output content, which can include raw file contents and command output.<redacted (N chars)>so you still get content length for sizing/debugging.stop,user_prompt_submit,post_tool_use,subagent_stop,notification,permission_request) and Codexnotify.sh.setup.shwhere users choose their logging level during interactive setup.setup.sh(read -spinstead ofread -p).Motivation
The kit currently captures and exports user prompts, bash commands, file paths, and tool output by default with no way to control what sensitive content is included. Prompts and tool output can contain credentials, PII, and confidential data. Claude Code's own OTEL-based tracing does not enable any of this by default. Other tracing integrations (Braintrust, LangSmith) also log everything once enabled with no granular controls at the plugin level. This PR adds opt-in content controls so users can match their security requirements.
Test plan
<redacted (N chars)>ARIZE_LOG_PROMPTS=false: user prompts show<redacted (N chars)>, model responses still appearARIZE_LOG_TOOL_DETAILS=true: bash commands, file paths, URLs appear in tool spansARIZE_LOG_TOOL_CONTENT=true: full tool input/output appears in tool spanstool_commandfor a non-Bash tool) do not produce spurious<redacted (0 chars)>span attributessetup.sh: API key input is masked, content logging prompts appear with correct defaults (prompts Y, details N, content N)notify.sh: user prompt redacted when flag is off, assistant output always included, tool output in child spans redacted when flag is off