Skip to content

Add isASanEnabled telemetry#1138

Draft
davidmrdavid wants to merge 2 commits intomicrosoft:mainfrom
davidmrdavid:dev/dajusto/add-asan-to-telemetry
Draft

Add isASanEnabled telemetry#1138
davidmrdavid wants to merge 2 commits intomicrosoft:mainfrom
davidmrdavid:dev/dajusto/add-asan-to-telemetry

Conversation

@davidmrdavid
Copy link
Member

A naive attempt at tackling: #981

Context:

The MSVC ASan team is tracking ASan usage information through BinSkim.

This PR attempts to generate telemetry containing whether an analyzed binary (.dll or .exe) is linked against one of the ASan dlls.

Next Steps:
To my knowledge, have yet to have an official conversation with BinSkim about this, so there's no real reason to merge or review this yet. I just wanted to create this PR as a 'best effort' attempt at prototyping the change. I'll look to try and drive that conversation internally so I can either abandon this PR, or officially publish it. Thank you!

Comment on lines +159 to +166
foreach (string import in target.PE.Imports)
{
if (import.StartsWith("clang_rt.asan_", StringComparison.OrdinalIgnoreCase) &&
import.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
{
return true;
}
}

Check notice

Code scanning / CodeQL

Missed opportunity to use Where Note

This foreach loop
implicitly filters its target sequence
- consider filtering the sequence explicitly using '.Where(...)'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant