question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't auth with snyk

See original GitHub issue

When I’m authed with the snyk cli snyk auth and there is a snyk config with my api token, npq is unable to query for known vulnerabilities:

    - Unable to query vulnerabilities for packages

But when I delete the snyk config rm -rf ~/.config/configstore/snyk.json, npq is running just fine.

So I have the situation, that I cant use both tools at the same time. Reproduced this behaviour on two different machines.

Expected Behavior

I expect, that the snyk cli can co-exist with the npq tool. So I can snyk test and npq i <whatever> in the same environment, without changing anything in my settings / configs.

Current Behavior

npq will run into an error with the vulnerabilities check when snyk cli is authed.

Possible Solution

Steps to Reproduce (for bugs)

  • Install snyk cli npm i -g snyk
  • Auth with snyk cli snyk auth
  • Install npq npm i -g npq
  • Install something through npq npq i axios
  • You should see an error
  • Delete the snyk config with api token rm -rf ~/.config/configstore/snyk.json
  • Install something through npq npq i axios
  • It should work fine

Your Environment

  • Mac, Node: v15.8.0
  • Windows, Node: v14.15.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
yoavaincommented, Apr 19, 2021

Opened a PR. Had some problems with hooks not working on a Windows development environment, so I couldn’t really test it. This should only fix the API issue. Will open a different issue for the explicit version not being used.

1reaction
yoavaincommented, Apr 18, 2021

For me - as a new user

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authenticate the CLI with your account - Snyk User Docs
1. Go to your Snyk account (Account Settings > API Token section). · 2. In the KEY field, click click to show; then...
Read more >
Failed authentication when installing Snyk through the CLI. #898
To solve this trouble just make the authorization docker --login --token "YOUR_SNYK_API_TOKEN" before using docker scan IMAGE_NAME command. That ...
Read more >
java - IntelliJ IDE MissingApiTokenError: `snyk` requires an ...
I tried to see if i can find any options to set the snyk auth from IDE toolbar , but i could not...
Read more >
snyk - npm
If you need support using Snyk CLI, please contact support. We do not actively monitor GitHub Issues so any issues there may go...
Read more >
How to Find and Fix Security Vulnerabilities Using Snyk
We often download and install packages from PyPi but we're not sure ... Now what we need to do is to authenticate ourselves...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found