Sometimes the user receives the following error for Snyk integration for Azure Pipelines:
Parameter 'toolPath' cannot be null or empty
This can happen when NodeJS and NPM are not in the toolPath of the environment.
Please note that adding NodeTool task from Microsoft is a requirement using Snyk Task in Azure pipelines.
This extension requires that Node.js and npm be installed on the build agent. These are available by default on all Microsoft-hosted build agents. However, if you are using a self-hosted build agent, you may need to explicitly activate Node.js and npm and ensure they are in your PATH. This can be done using the NodeTool task from Microsoft prior to the SnykSecurityScan task in your pipeline.
You can find the same in our documentation Azure Pipelines integration. So we suggest you add the NodeTool task with NodeJS version 10 or above, before the Snyk task and try again. This should resolve the error with toolPath.