Azure AD consent detections: repair Scope regex broken by a line wrap - #4291
Merged
nasbench merged 3 commits intoSep 24, 2026
Merged
Conversation
The permissions extraction in Azure AD User Consent Blocked for Risky Application and Azure AD OAuth Application Consent Granted By User reads 'Scope: (?<Scope> [ ^,]+)'. The two stray spaces turn the negated class [^,]+ into a literal class of space, caret and comma, so Scope never matches and the findings carry no permission list. History: the original (v4.16.0, 2023-11) was 'Scope: (?<Scope>[^,]+)'. The output-normalization commit 195547e (2025-02-06) wrapped the search across lines and split the pattern at '(?<Scope> ' / '[ ^,]+)', putting a line break and indentation inside the regex; the YAML formatting job in splunk#3889 (2026-02-25) then collapsed that break into the spaces seen today. Verified on live azure:monitor:aad 'Consent to application' events over 45 days: the shipped pattern matches 0 of 18, the restored pattern matches 18 of 18. Three sibling detections in the same release already use the '(?<Scope>[^,]+)' form. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
sbaker-gre
requested review from
P4T12ICK,
RavenTait,
ljstella,
nasbench,
onurmerdogan,
patel-bhavin,
pyth0n1c,
rosplk and
tccontre
as code owners
September 24, 2026 15:35
nasbench
approved these changes
Sep 24, 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.
Two Azure AD consent detections extract the granted permission list with
The two stray spaces turn the negated class
[^,]+into a literal class of space, caret and comma, soScopenever matches.fillnullthen sets it to0and every finding reports the application was granted permission "0".Affected detections
How it broke
Scope: (?<Scope>[^,]+)(?<Scope>/[ ^,]+), leaving a line break and indentation inside the regexFix
Restore
Scope: (?<Scope>[^,]+), the form three sibling detections in the same release already use. Version bumps on both detections.Verification
azure:monitor:aad"Consent to application" events, 45 days: shipped pattern matches 0 of 18, restored pattern matches 18 of 18.contentctl-ng buildpasses; unit tests pass in a local Splunk 10.4 container with CIM 8.5.0 and Splunk_TA_microsoft-cloudservices 6.3.3.Scopewas checked on live data.🤖 Generated with Claude Code