Skip to content

[v3-4-test] Redact secrets written through RedactedIO.writelines() (#72063) - #75463

Merged
vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-3d5c533-v3-4-test
Oct 24, 2026
Merged

vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-3d5c533-v3-4-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

RedactedIO exists so that output produced by user code is masked before it
reaches stdout, and its docstring says "Writes to stdout will be redacted".
write() applied redact(); writelines() forwarded straight to the target, so a
secret written that way was printed verbatim.

The one call site is task_test() in cli/commands/task_command.py, so this is
reachable from airflow tasks test, which deliberately routes task output up
to the console handler for local debugging.

Non-string elements now stringify rather than raising TypeError, matching what
write() already does.
(cherry picked from commit 3d5c533)

Co-authored-by: Mahathir Mohammad Shuvo 48558774+MahathirMohammadShuvo@users.noreply.github.com

…72063)

RedactedIO exists so that output produced by user code is masked before it
reaches stdout, and its docstring says "Writes to stdout will be redacted".
write() applied redact(); writelines() forwarded straight to the target, so a
secret written that way was printed verbatim.

The one call site is task_test() in cli/commands/task_command.py, so this is
reachable from `airflow tasks test`, which deliberately routes task output up
to the console handler for local debugging.

Non-string elements now stringify rather than raising TypeError, matching what
write() already does.
(cherry picked from commit 3d5c533)

Co-authored-by: Mahathir Mohammad Shuvo <48558774+MahathirMohammadShuvo@users.noreply.github.com>
@vatsrahul1001
vatsrahul1001 marked this pull request as ready for review October 23, 2026 12:45
@vatsrahul1001
vatsrahul1001 merged commit b06c51b into v3-4-test Oct 24, 2026
153 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-3d5c533-v3-4-test branch October 24, 2026 10:39
@github-actions github-actions Bot added this to the Airflow 3.4.1 milestone Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.4.1 based on: merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants