anchore-cli: Error: cannot use input image string (no discovered imageDigest)
I am having a problem with the anchore-cli running ‘vuln’. It’s entirely possible I just don’t have the right signature, but I’m getting Error: cannot use input image string (no discovered imageDigest)
.
I’ve added the image and it works as expected. ‘image list’ also. But using the server/namespace/tag format comes back with the error string. Using the sha256 has works properly but adds a step where I have to parse the json from the full output to get the hash, then resubmit. Bit of a pain, that.
Am I missing something simple?
$>anchore-cli image add docker.io/library/debian:latest
Image Digest: sha256:316ebb92ca66bb8ddc79249fb29872bece4be384cb61b5344fac4e84ca4ed2b2
Analysis Status: analyzed
Image Type: docker
Image ID: 2b98c9851a37e18356abe407922726dc35c370f7cee76f435f94ee92950b4493
Dockerfile Mode: Guessed
Distro: debian
Distro Version: 9
Size: 45135077
Architecture: amd64
Layer Count: 1
Full Tag: docker.io/library/debian:latest
Trying to pull the vulnerabilities using the full tag:
$>anchore-cli image vuln docker.io/library/debian:latest os
yields
Error: cannot use input image string (no discovered imageDigest)
Using the sha256 hash works as expected:
$>anchore-cli --json image vuln sha256:316ebb92ca66bb8ddc79249fb29872bece4be384cb61b5344fac4e84ca4ed2b2 os
Thanks much.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (11 by maintainers)
@MMartyn good catch. We used to require a trailing ‘/v1’ on the URL, so that was safe, but that has since been relaxed and this code didn’t get updated to reflect it. Will you please file a separate bug for that and I’ll get it fixed. Thanks!