-
Notifications
You must be signed in to change notification settings - Fork 91
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
Driver ETW events #2668
Driver ETW events #2668
Conversation
} | ||
else | ||
{ | ||
if (Stream.CanSeek) { this.Stream.Seek(0, SeekOrigin.Begin); } |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems its false-positive, this.contents
is definitely null at here, only way falls to this else block is this.Stream != null
|
||
if (this.Contents != null) | ||
{ | ||
return (ulong?)this.Contents.Length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -692,7 +692,7 @@ public void AnalyzeCommand_TracesInMemory() | |||
levels: BaseLogger.ErrorWarningNote, | |||
kinds: BaseLogger.Fail); | |||
|
|||
var target = new EnumeratedArtifact(FileSystem.Instance) { Uri = uri, Contents = string.Empty }; | |||
var target = new EnumeratedArtifact(FileSystem.Instance) { Uri = uri, Contents = "A", SizeInBytes = 1 }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SarifDriver
, guidc84480b4-a77f-421f-8a11-48210c1724d4
.This change proposes ETW telemetry for a range of general, useful data points:
Open:
DriverEventSource
and add their own events? The 'danger' here is a failure to override provider name + guid. We could protect against this by declaring an abstract class for the core event generation. All of this would require adding more code to permit injection of a customized/derived event source.