Spell the modifier json_meta_contains on sid 5017897 - #730
Merged
CGoggins56 merged 1 commit intoSep 11, 2026
Conversation
The rule excludes two applications with json_meta_content:!".ApplicationDisplayName",Power|20|BI,OneNoteLegacyClient; json_contains; and json_contains is not the modifier json_meta_content reads. rules.c line 2231 sets json_content_strstr[json_content_count-1], the last json_content, whatever keywords sit between the two; the meta branch reads json_meta_contains at line 2294. So the modifier lands on json_content:!".UserId","app@sharepoint", three options earlier, and turns that exclusion into a substring test, while the application list it was written for is compared whole. Two consequences, both measured against Sagan built from 3b9b0fa with 200 events per case, the count the rule's `after` needs: .UserId or .ApplicationDisplayName ships patched an ordinary user, an unlisted app alert alert UserId myapp@sharepoint.com silent alert ApplicationDisplayName "Power BI Desktop" alert silent ApplicationDisplayName "Power BI" silent silent The second row is a user excluded for holding app@sharepoint inside a longer name. The third is the exclusion the rule was written for not applying to a value that carries the listed one. The last row is the case that works today and still works: the exclusion bites on an exact match either way. Three other rules in the corpus exclude a list of application or method names, and all three write json_meta_contains. rev incremented.
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.
The rule excludes two applications with
json_meta_content:!".ApplicationDisplayName",Power|20|BI,OneNoteLegacyClient; json_contains;
and json_contains is not the modifier json_meta_content reads. rules.c line 2231 sets json_content_strstr[json_content_count-1], the last json_content, whatever keywords sit between the two; the meta branch reads json_meta_contains at line 2294.
So the modifier lands on json_content:!".UserId","app@sharepoint", three options earlier, and turns that exclusion into a substring test, while the application list it was written for is compared whole.
Two consequences, both measured against Sagan built from 3b9b0fa with 200 events per case, the count the rule's
afterneeds:.UserId or .ApplicationDisplayName ships patched
an ordinary user, an unlisted app alert alert
UserId myapp@sharepoint.com silent alert
ApplicationDisplayName "Power BI Desktop" alert silent
ApplicationDisplayName "Power BI" silent silent
The second row is a user excluded for holding app@sharepoint inside a longer name. The third is the exclusion the rule was written for not applying to a value that carries the listed one.
The last row is the case that works today and still works: the exclusion bites on an exact match either way.
Three other rules in the corpus exclude a list of application or method names, and all three write json_meta_contains.
rev incremented.