fix: make trace_include_sensitive_data default to False for security#2392
Draft
OpenSourceSoul wants to merge 1 commit intoopenai:mainfrom
Draft
fix: make trace_include_sensitive_data default to False for security#2392OpenSourceSoul wants to merge 1 commit intoopenai:mainfrom
OpenSourceSoul wants to merge 1 commit intoopenai:mainfrom
Conversation
By default, trace_include_sensitive_data was set to True, which meant sensitive data (tool inputs/outputs, LLM generations) was included in traces without explicit user consent. This is a security risk as it could lead to accidental data leakage of PII, secrets, or confidential info. This change makes the SDK secure-by-default: - Changed OPENAI_AGENTS_TRACE_INCLUDE_SENSITIVE_DATA env default from 'true' to 'false' - Changed VoicePipelineConfig.trace_include_sensitive_data default from True to False - Updated tests to reflect new secure-by-default behavior Users can still opt-in to include sensitive data by: 1. Setting OPENAI_AGENTS_TRACE_INCLUDE_SENSITIVE_DATA=true environment variable 2. Explicitly passing trace_include_sensitive_data=True to RunConfig or VoicePipelineConfig Security impact: Prevents accidental exposure of sensitive data in production deployments.
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.
Problem
By default, was set to , which meant sensitive data (tool inputs/outputs, LLM generations) was automatically included in traces without explicit user consent. This violates the security principle of "secure by default" and could lead to:
Changes
This PR makes the SDK secure-by-default by changing the default value from to :
Impact
Migration for existing users
Users who want to maintain the previous behavior can:
This change aligns with security best practices and protects users from unintentional data exposure.