Repository navigation
BinSkim failed. Verify the target(s) to be scanned. #45
Copy link
Copy link
Closed as not planned
Description
We have a project that I recently tried adding the following YAML to the build pipeline:
- task: UseDotNet@2
displayName: 'Use dotnet'
condition: eq(variables['Build.SourceBranchName'], '18321-add-vulnerability-scan')
inputs:
version: 3.1.x
- task: UseDotNet@2
displayName: 'Use dotnet'
condition: eq(variables['Build.SourceBranchName'], '18321-add-vulnerability-scan')
inputs:
version: 6.0.x
- task: MicrosoftSecurityDevOps@1
displayName: 'Microsoft Security DevOps'
condition: eq(variables['Build.SourceBranchName'], '18321-add-vulnerability-scan')
inputs:
tools: 'BinSkim,CredScan,ESlint'
But BinSkim fails with the following:
D:\a\_msdo\packages\nuget\Microsoft.CodeAnalysis.BinSkim.1.9.5\tools\netcoreapp3.1\win-x64\BinSkim.exe analyze --config default --hashes --statistics --sarif-output-version OneZeroZero --output D:\a\1\s\.gdn\.r\binskim\001\binskim.sarif @D:\a\1\s\.gdn\.r\binskim\001\.gdntoolinput
Analyzing...
D:\a\1\s\UserPortalAPI\bin\Release\netcoreapp3.1\runtimes\win-arm64\native\sni.dll : error ERR997.ExceptionLoadingPdb : 'sni.dll' was not evaluated because its PDB could not be loaded (E_PDB_NOT_FOUND).
D:\a\1\s\UserPortalAPI\bin\Release\netcoreapp3.1\runtimes\win-x64\native\sni.dll : error ERR997.ExceptionLoadingPdb : 'sni.dll' was not evaluated because its PDB could not be loaded (E_PDB_NOT_FOUND).
D:\a\1\s\UserPortalAPI\bin\Release\netcoreapp3.1\runtimes\win-x86\native\sni.dll : error ERR997.ExceptionLoadingPdb : 'sni.dll' was not evaluated because its PDB could not be loaded (E_PDB_NOT_FOUND).
Done. 125 files scanned.
One or more rules was disabled for an analysis target, as it was determined not to be applicable to it (this is a common condition). Pass --verbose on the command-line for more information.
Analysis did not complete due to one or more unrecoverable execution conditions.
Unexpected fatal runtime condition(s) observed: ExceptionLoadingPdb
Tool run time: 3.1682485 seconds
------------------------------------------------------------------------------
BinSkim completed with exit code 1
##[error]Error running binskim job: 1 of 1
##[error]GuardianErrorExitCodeException: binskim completed with an Error exit code: 1. BinSkim failed. Verify the target(s) to be scanned. BinSkim targets must be a specific filename, or a pattern with a wildcard like *.dll, dir\*.dll, or dir\*
------------------------------------------------------------------------------
Although it doesn't fail the entire build pipeline, I am still curious why it fails.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
jmarti326 commentedon Aug 9, 2023
Where you able to get an answer of this error? I am having the same problem, but don't find anything in the docs.
mhborg-timextender commentedon Aug 14, 2023
No, currently have binskim disabled in our pipelines.
DimaBir commentedon Jul 28, 2026
We're cleaning up the issue backlog in this repo. This one never got a response from us, which isn't good enough, and at this age we're not able to reconstruct what was happening at the time — so we're closing it.
If it's still affecting you, just reopen it or drop a comment and we'll pick it up properly this time.