[v3-3-test] Mask nested entities when writing bulk audit-log entries (#70890) - #71043
Merged
Merged
Conversation
…pache#70890) The audit-log maskers for Variables and Connections dispatch on top-level key names. A bulk request body has exactly one top-level key, `actions`, and the entities sit two levels down in `actions[].entities[]` -- so neither `val`/`value` nor `extra` was ever seen, and the payload was recorded as supplied. The masker also runs on the raw request body before validation, so `extra` can arrive as any JSON type. `json.loads` raises `TypeError` rather than `JSONDecodeError` for a non-string, which escaped the audit-log path entirely. Bulk bodies newly reach this branch, so the shape is now reachable where it previously was not. (cherry picked from commit fc8d6d8)
potiuk
requested review from
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
jason810496,
pierrejeambrun,
rawwar and
shubhamraj-git
as code owners
August 4, 2026 01:10
Contributor
|
Hi maintainer, this PR was merged without a milestone set.
|
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.
Backport of #70890 to
v3-3-test.The audit-log maskers for Variables and Connections dispatch on top-level key
names. A bulk request body has exactly one top-level key,
actions, and theentities sit two levels down in
actions[].entities[]— so neitherval/valuenor
extrawas ever seen, and the payload was recorded as supplied.The masker also runs on the raw request body before validation, so
extracanarrive as any JSON type;
json.loadsraisesTypeErrorrather thanJSONDecodeErrorfor a non-string, which escaped the audit-log path entirely.Backport note: the original commit's context included
TestActionLoggingUserFields,which belongs to #70583 (
get_display_nameonBaseUser) and is not inv3-3-test.That class and its imports are dropped here; the rest is identical to the original commit.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines