Reputation: 2166
I have installed the snyk vulnerability analysis plugin on my IntelliJ IDE , but when i try to run the analysis , it gives me error as below :
Although i understand it is asking me to provide some auth credentials for my snyk server , but i am not able to understand where to provide it in the IDE . I tried to see if i can find any options to set the snyk auth from IDE toolbar , but i could not find any . Does anyone has an idea how to solve this issue ?
Upvotes: 5
Views: 3290
Reputation: 1693
Not a very polished plug-in with regard to installation, I must say; apparently they just expect you to know that their CLI tool must be installed in order to be able to use the plug-in. No mention of that on the JetBrains Marketplace Snyk plug-in page.
But from the error message I just guessed and went ahead: Installation instructions for the CLI tool.
For example, if you have Homebrew installed, run this from the CLI:
brew tap snyk/tap && brew install snyk
snyk auth
I later found out that the need for their CLI tool is mentioned on their support page about the plug-in, though. But it says there ‘The plugin will automatically download the CLI in the background.’
Once the CLI tool is installed, the plugin is a joy to use:
Upvotes: 5
Reputation: 1693
Alternatively (I cannot try this myself anymore, because even after uninstalling the CLI tools, the plug-in keeps working) it might be enough to acquire an API token and enter it into the plug-in’s configuration:
Go to IntelliJ IDEA ➤ Preferences ➤ Tools ➤ Snyk (on macOS; for Windows it starts with File ➤ Settings, I believe) and paste the token within the Token field.
Upvotes: 1