Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker scan <REPOSITORY>:<TAG> - failed to get DockerScanID: bad status code "400 Bad Request"

Tags:

docker

snyk

I am trying to run

docker scan <REPOSITORY>:<TAG>

but it fails with error

failed to get DockerScanID: bad status code "400 Bad Request"

notes:

  • I'm logged in to hub.docker.com
    enter image description here
  • I created a token in docker which I use in snyk.com

I probably miss something else... any clues? thanks

like image 238
udo Avatar asked Nov 21 '21 14:11

udo


1 Answers

you have to log in to snyk via the cli:

docker scan --login

then you have to enter the credentials in the browser. after that you are able to run

docker scan <REPOSITORY>:<TAG>

note: responding with a 400 error is a bit misleading. responding with a 401 or 403 (and maybe even saying you have to authenticate with "docker scan --login" would have made it more human readable :|

like image 133
udo Avatar answered Oct 04 '22 20:10

udo