Skip to content

Emit per-binary ASan telemetry (BinSkim BA2032) from runtime-sanitized#130500

Draft
davidmrdavid wants to merge 1 commit into
dotnet:mainfrom
davidmrdavid:dev/dajusto/asan-ba2032-telemetry
Draft

Emit per-binary ASan telemetry (BinSkim BA2032) from runtime-sanitized#130500
davidmrdavid wants to merge 1 commit into
dotnet:mainfrom
davidmrdavid:dev/dajusto/asan-ba2032-telemetry

Conversation

@davidmrdavid

Copy link
Copy Markdown

Context: The MSVC ASan team ( 👋 ) is interested in capturing ASan-usage telemetry listing what binaries got instrumented with ASan. As the .NET runtime is a flagship customer, we're very interested in seeing this repo be a part of that effort.

The way we capture this telemetry is through a new opt-in BinSkim rule: BA2032. That rule is a no-fail rule that simply writes to kusto (when the pipeline environment is set up for Guardian telemetry, as most internal pipelines are) when an asanized binary is detected.

This PR attempts to add that telemetry for this repo. We may need help queue'ing the pipeline a few times to confirm this is working as expected. Thanks!

Copilot AI review requested due to automatic review settings July 10, 2026 16:22
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jul 10, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the runtime-sanitized Azure Pipelines definition to emit per-binary AddressSanitizer (ASan) usage telemetry on Windows by running BinSkim with the opt-in BA2032 rule and uploading results via Guardian.

Changes:

  • Add a Windows-only BinSkim@4 step configured to run only rule BA2032 over artifacts/bin/**/*.exe and artifacts/bin/**/*.dll.
  • Add a follow-on PostAnalysis@2 step to upload the BinSkim results to Guardian.
  • Apply the same telemetry steps to both the CoreCLR runtime-tests job and the NativeAOT job in this pipeline.
Show a summary per file
File Description
eng/pipelines/runtime-sanitized.yml Adds BinSkim BA2032 + PostAnalysis steps (Windows-only) to emit/upload ASan instrumentation telemetry for produced binaries.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment on lines +52 to +67
- task: BinSkim@4
displayName: 'Emit ASan usage telemetry (BinSkim BA2032)'
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Windows_NT'))
inputs:
TargetPattern: guardianGlob
AnalyzeTargetGlob: +:f|$(Build.SourcesDirectory)\artifacts\bin\**\*.exe;+:f|$(Build.SourcesDirectory)\artifacts\bin\**\*.dll
toolVersion: '4.4.9'
env:
GDN_BINSKIM_RUNONLYRULES: BA2032
GDN_BINSKIM_KIND: Fail;Pass;Informational
- task: PostAnalysis@2
displayName: 'Guardian: upload SDL results (BA2032)'
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Windows_NT'))
inputs:
GdnBreakAllTools: false
GdnBreakGdnToolBinSkim: false
Comment on lines +101 to +116
- task: BinSkim@4
displayName: 'Emit ASan usage telemetry (BinSkim BA2032)'
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Windows_NT'))
inputs:
TargetPattern: guardianGlob
AnalyzeTargetGlob: +:f|$(Build.SourcesDirectory)\artifacts\bin\**\*.exe;+:f|$(Build.SourcesDirectory)\artifacts\bin\**\*.dll
toolVersion: '4.4.9'
env:
GDN_BINSKIM_RUNONLYRULES: BA2032
GDN_BINSKIM_KIND: Fail;Pass;Informational
- task: PostAnalysis@2
displayName: 'Guardian: upload SDL results (BA2032)'
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Windows_NT'))
inputs:
GdnBreakAllTools: false
GdnBreakGdnToolBinSkim: false
@akoeplinger

Copy link
Copy Markdown
Member

/azp run runtime-sanitized

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines failed to run 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure-libraries community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants