build: remove *tests* and all coverage/DIA DLLs from binskim (#41108)

This thing files about 900 bugs a month on us.

Before:

```
Done. 11,036 files scanned.
```

After:

```
Done. 4,753 files scanned.
```
This commit is contained in:
Dustin L. Howett
2025-08-18 06:00:13 -05:00
committed by GitHub
parent e8754e4cd6
commit efb48aa163
2 changed files with 7 additions and 0 deletions

View File

@@ -115,6 +115,7 @@ bigbar
bigobj bigobj
binlog binlog
binres binres
binskim
BITMAPFILEHEADER BITMAPFILEHEADER
bitmapimage bitmapimage
BITMAPINFO BITMAPINFO
@@ -255,6 +256,7 @@ Corpor
cotaskmem cotaskmem
COULDNOT COULDNOT
countof countof
covrun
cpcontrols cpcontrols
cph cph
cplusplus cplusplus
@@ -969,6 +971,7 @@ msc
mscorlib mscorlib
msctls msctls
msdata msdata
msdia
MSDL MSDL
MSGFLT MSGFLT
MSHCTX MSHCTX

View File

@@ -64,6 +64,10 @@ extends:
tsa: tsa:
enabled: true enabled: true
configFile: '$(Build.SourcesDirectory)\.pipelines\tsa.json' configFile: '$(Build.SourcesDirectory)\.pipelines\tsa.json'
binskim:
enabled: true
# Exclude every dll/exe in tests/*, as well as all msdia*, covrun* and vcruntime*
analyzeTargetGlob: +:file|$(Build.ArtifactStagingDirectory)/**/*.dll;+:file|$(Build.ArtifactStagingDirectory)/**/*.exe;-:file:regex|tests.*\.(dll|exe)$;-:file:regex|(covrun.*)\.dll$;-:file:regex|(msdia.*)\.dll$;-:file:regex|(vcruntime.*)\.dll$
stages: stages:
- stage: Build - stage: Build