Align the merge finding action with the object-level permission check - #16027
Merged
Maffooch merged 1 commit intoSep 23, 2026
Merged
Conversation
One branch of the merge view acted on a stricter intent than the check in front of it, so it accepted callers the sibling routes for the same action already refuse. The check runs before the merge writes anything, so a refusal cannot leave work half applied. Behaviour for correctly permissioned callers is unchanged, including the other branch of the same selector. Adds regression tests for the refusal, for the unaffected branch, and for the permitted caller.
Maffooch
approved these changes
Sep 23, 2026
blakeaowens
approved these changes
Sep 23, 2026
devGregA
approved these changes
Sep 23, 2026
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.
Hardening / consistency improvement to the finding merge view's permission checks.
One branch of the merge Finding Action selector acted on a stricter intent than the check in front of the route, so it accepted callers that the sibling routes for the same action already refuse. This adds the matching object-level check, plus regression tests.
The check runs before the merge writes anything, so a refusal cannot leave work half applied. No functional change for correctly-permissioned users, and the other branch of the same selector is untouched.
Tested:
unittests.test_bulk_finding_authorization10/10,unittests.test_merge_findings_locationsandunittests.test_finding_template_merge_endpoints_v36/6, on both theDD_V3_FEATURE_LOCATIONStrue and false legs.