You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error running bandit - bandit_runner.exe not found #58
Hello. I'm setting up the action in multiple repositories and all of them fails in the same step, while trying to execute bandit.
Logs:
Error: Error running tool 2 of 5: bandit
Error: Error running bandit job: 1 of 1
Error: ToolLauncherNotFoundException: Could not successfully find the D:\a\_msdo\packages\nuget\Microsoft.Guardian.BanditRedist_windows_amd64.1.6.3.1\tools\bandit_runner.exe tool launcher. Please ensure any dependent frameworks are installed.
Error: Win32Exception: An error occurred trying to start process 'D:\a\_msdo\packages\nuget\Microsoft.Guardian.BanditRedist_windows_amd64.1.6.3.1\tools\bandit_runner.exe' with working directory 'D:\a\AzureGoat\AzureGoat'. The filename or extension is too long.
Error: BreakException: Guardian detected one or more breaking results.
Error: Error: The process 'D:\a\_msdo\versions\microsoft.security.devops.cli\0.163.0\tools\guardian.cmd' failed with exit code 1
From the logs, it looks like that the Bandit issue was caused by the length of the Bandit command line too long ("The filename or extension is too long." in the log) due to the command length restriction on Windows. As a workaround, to shorten the length of the Bandit command line on Windows, you can follow the wiki at "https://github.com/microsoft/security-devops-action/wiki#bandit-options" to configure the Target argument so as for Bandit to scan fewer files and see if it will resolve the issue. If you need Bandit to scan more files, you can follow the same wiki to create a *.gdnconfig file to run Bandit multiple times on different targets. Meanwhile, we will seek if there could be a way to better handle it.
Activity
JiandongJiang commentedon Jun 6, 2023
From the logs, it looks like that the Bandit issue was caused by the length of the Bandit command line too long ("The filename or extension is too long." in the log) due to the command length restriction on Windows. As a workaround, to shorten the length of the Bandit command line on Windows, you can follow the wiki at "https://github.com/microsoft/security-devops-action/wiki#bandit-options" to configure the Target argument so as for Bandit to scan fewer files and see if it will resolve the issue. If you need Bandit to scan more files, you can follow the same wiki to create a *.gdnconfig file to run Bandit multiple times on different targets. Meanwhile, we will seek if there could be a way to better handle it.
piraces commentedon Jun 6, 2023
Thank you for your response Jiandong Jiang (@JiandongJiang) ! I will try to do that 👍
DimaBir commentedon Jul 28, 2026
We're cleaning up the issue backlog in this repo, and this one has been inactive for a long time, so we're closing it.
If it's still affecting you, just reopen it or drop a comment — that's enough, and we'll pick it up from there. Nothing else needed from you.
Sorry we left this sitting.