Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing crash in dump-events #2717

Merged
merged 4 commits into from
Sep 29, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Sarif.Driver/DumpEventsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public int Run(DumpEventsOptions options)

case "RuleFired":
{
FailureLevel level = (FailureLevel)(int)(uint)traceEvent.PayloadByName("level");
var level = (FailureLevel)(int)(uint)traceEvent.PayloadByName("level");
data1 = level;
data2 = traceEvent.PayloadByName("matchIdentifier");
ruleId = (string)traceEvent.PayloadByName(nameof(ruleId));
Expand Down Expand Up @@ -297,8 +297,9 @@ public int Run(DumpEventsOptions options)
case "ManifestData":
{
return;

}

case "EventTrace/PartitionInfoExtension":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PartitionInfoExtension

well, okey-doke. :) you collected the legacy form, it appears.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's obvious what I did to trigger legacy form mode instead of V2, I'd love to be corrected. This is the command I'm using. [1]

[1] Sarif.PatternMatcher.cli.exe analyze ..\..\..\..\..\..\AzureDevOps\ --recurse true --max-file-size-in-kb 999999999 --output .\ado.sarif --level "Error;Warning;Note" --plugin ".\SEC101.SecurePlaintextSecretsInternal.json" --log ForceOverwrite --insert ContextRegionSnippets --etw .\ADO-Run.etl

case "EventTrace/PartitionInfoExtensionV2":
{
eventName = "SessionStarted";
Expand Down
Loading