Skip to content

Pulls from private DockerHub repo fails with 0.43.0 when working with 0.42.4 #936

@nblack-er

Description

@nblack-er

What happened:

syft 0.43.0 now throws an error when attempting to fetch a Docker image from a private DockerHub repo even when logged in (i.e., auths entry in ~/.docker/config.json).

syft 0.42.4 has no such issue and is able to retrieve the image without errors after docker login

What you expected to happen:

Able to pull private images after docker login

How to reproduce it (as minimally and precisely as possible):

  1. docker login
  2. attempt a scan an image from a private DockerHub repo
 ⠇ Pulling image           
1 error occurred:
        * failed to construct source from user input "xxxxx": could not fetch image "xxxxx": unable to use DockerDaemon source: pull failed: Error response from daemon: pull access denied for xxxxx, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Anything else we need to know?:

Simply download and install syft 0.42.4 and run a scan without issue:
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sudo sh -s -- -b /usr/local/bin v0.42.4

Then download and install syft 0.43.0 and run into the error:
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sudo sh -s -- -b /usr/local/bin v0.43.0

Environment:

  • Output of syft version: syft 0.43.0
  • OS (e.g: cat /etc/os-release or similar):
    NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.4 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions