-
Notifications
You must be signed in to change notification settings - Fork 156
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
Adding SARIF V1 read capability to compiler telemetry #613
Conversation
|
||
fileSystem.Verify(fileSystem => fileSystem.FileOpenRead(sarifLogPath), Times.Once); | ||
sendItems.Count.Should().Be(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.
This is the added test.
Used the Native_x86_VS2019_SDL_Enabled.exe
to generate a SARIF v1 output (in addition to the SARIF V2 used in the baseline tests).
Mocked the fileSystem to return this sarif output and verified that the fileSystem was called exactly one time as expected.
Finally, verified that we generated the single telemetry event as expected when calling CompilerDataLogger.Disepose()
. #Resolved
} | ||
|
||
return sarifLog; | ||
} |
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.
This is the bulk of the code change, loading based on SARIF version. #Resolved
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.
Need to add test for SARIF V2, as well.
src/ReleaseHistory.md
Outdated
@@ -5,6 +5,7 @@ | |||
* FEATURE: Add new PE `CV_CFL_LANG` language code for `ALIASOBJ` and `Rust`. [530](https://github.com/microsoft/binskim/pull/530) | |||
* BUGFIX: Fix `BA2014.DoNotDisableStackProtectionForFunctions` to eliminate false positive reports that `GsDriverEntry` has disabled the stack protector. [551](https://github.com/microsoft/binskim/pull/551) | |||
* BREAKING: Rename `BA2026.EnableAdditionalSdlSecurityChecks` to `BA2026.EnableMicrosoftCompilerSdlSwitch` to clarify rule purpose. [#586](https://github.com/microsoft/binskim/pull/586) | |||
* BUGFIX: Fix inability to emit `SummaryEvent` when SARIF V1. [613](https://github.com/microsoft/binskim/pull/613) |
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.
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.
Many customers have a strong dependency on SARIF V1 and are therefore unable to utilize the full compiler telemetry functionality. This change addresses this by adding capacity to distinguish SARIF version and convert before logging telemetry summary if needed. Additionally, test coverage was added to verify the reading and telemetry logging in this situation.