Skip to content

fix: fail closed on invalid debug logging flags - #4557

Closed
sylvesterkaczmarek wants to merge 2 commits into
openai:mainfrom
sylvesterkaczmarek:fix/debug-flags-fail-closed
Closed

fix: fail closed on invalid debug logging flags#4557
sylvesterkaczmarek wants to merge 2 commits into
openai:mainfrom
sylvesterkaczmarek:fix/debug-flags-fail-closed

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

This pull request fixes parsing of the privacy-oriented OPENAI_AGENTS_DONT_LOG_MODEL_DATA and OPENAI_AGENTS_DONT_LOG_TOOL_DATA environment settings so malformed values do not silently enable sensitive logging.

_debug_flag_enabled() now trims surrounding whitespace, recognizes explicit 1/true and 0/false values, and falls back to the caller-supplied default for any unrecognized value. Because both DONT_LOG_* settings use default=True, a typo or deployment value such as " true " now preserves redaction instead of flipping it off.

Valid existing configurations retain their behavior. Focused regression coverage exercises whitespace-padded true/false values and invalid values for both model-data and tool-data logging controls.

This pull request resolves #4554.

@seratch seratch added the wontfix This will not be worked on label Aug 21, 2026
@seratch seratch closed this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debug logging flags fail open on whitespace or invalid environment values

2 participants