Skip to content

[v3-3-test] Walk nested lists/tuples/sets in secrets masker key-name … - #70189

Merged
potiuk merged 1 commit into
apache:v3-3-testfrom
potiuk:backport-4d39a85-v3-3-test
Jul 21, 2026
Merged

[v3-3-test] Walk nested lists/tuples/sets in secrets masker key-name …#70189
potiuk merged 1 commit into
apache:v3-3-testfrom
potiuk:backport-4d39a85-v3-3-test

Conversation

@potiuk

@potiuk potiuk commented Jul 21, 2026

Copy link
Copy Markdown
Member

…redaction (#68422)

The secrets masker walks dicts unconditionally for key-name-based redaction, so a sensitive key nested in dicts is masked at any depth. Lists, tuples, and sets were only walked below the recursion-depth cutoff, so a value carrying a sensitive key wrapped in an iterable beyond the cutoff was returned without key-name redaction.

Walk nested lists/tuples/sets unconditionally too, mirroring the dict handling, keeping the depth cutoff only for pattern-based string masking. Add regression tests for sensitive keys wrapped in lists and tuples past MAX_RECURSION_DEPTH.
(cherry picked from commit 4d39a85)

Generated-by: Claude Opus 4.8 (1M context) following the guidelines at
https: //github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

…redaction (apache#68422)

The secrets masker walks dicts unconditionally for key-name-based
redaction, so a sensitive key nested in dicts is masked at any depth.
Lists, tuples, and sets were only walked below the recursion-depth
cutoff, so a value carrying a sensitive key wrapped in an iterable
beyond the cutoff was returned without key-name redaction.

Walk nested lists/tuples/sets unconditionally too, mirroring the dict
handling, keeping the depth cutoff only for pattern-based string
masking. Add regression tests for sensitive keys wrapped in lists and
tuples past MAX_RECURSION_DEPTH.
(cherry picked from commit 4d39a85)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Generated-by: Claude Opus 4.8 (1M context) following the guidelines at
https: //github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
@potiuk
potiuk requested review from amoghrajesh and ashb as code owners July 21, 2026 12:52
@potiuk
potiuk merged commit 3a157b1 into apache:v3-3-test Jul 21, 2026
74 checks passed
@potiuk
potiuk deleted the backport-4d39a85-v3-3-test branch July 21, 2026 14:53
@github-actions github-actions Bot added this to the Airflow 3.3.1 milestone Jul 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.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.

@vatsrahul1001 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label Jul 27, 2026
vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
…redaction (#68422) (#70189)

The secrets masker walks dicts unconditionally for key-name-based
redaction, so a sensitive key nested in dicts is masked at any depth.
Lists, tuples, and sets were only walked below the recursion-depth
cutoff, so a value carrying a sensitive key wrapped in an iterable
beyond the cutoff was returned without key-name redaction.

Walk nested lists/tuples/sets unconditionally too, mirroring the dict
handling, keeping the depth cutoff only for pattern-based string
masking. Add regression tests for sensitive keys wrapped in lists and
tuples past MAX_RECURSION_DEPTH.
(cherry picked from commit 4d39a85)


Generated-by: Claude Opus 4.8 (1M context) following the guidelines at
https: //github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants