Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syft does not use HTTP proxy when downloading the Docker image itself #2203

Closed
gbonnefille opened this issue Oct 6, 2023 · 4 comments · Fixed by #2336
Closed

Syft does not use HTTP proxy when downloading the Docker image itself #2203

gbonnefille opened this issue Oct 6, 2023 · 4 comments · Fixed by #2336
Assignees
Labels
bug Something isn't working regression

Comments

@gbonnefille
Copy link

What happened:

In a corporate network, with a corporate proxy,
When I run syft on a Docker image hosted outside
Then it fails with a message:

failed to construct source from user input "123vlk6z.graX.container-registry.ovh.net/project/component/snapshot": unable to load image: unable to use OciRegistry source: failed to get image descriptor from registry: Get "https://123vlk6z.graX.container-registry.ovh.net/v2/": read tcp 10.42.3.252:40532->123.19.108.56:443: read: connection reset by peer

It is clearly trying to access directly to the external registry, without passing through the proxy (set via https_proxy and HTTPS_PROXY).

What you expected to happen:

Syft should respect the HTTP proxy.

Steps to reproduce the issue:

Hard way if outside a corporate network.

Anything else we need to know?:

Environment:

  • Output of syft version: 0.92.0
  • OS (e.g: cat /etc/os-release or similar): Linux Ubuntu 22.04
@gbonnefille gbonnefille added the bug Something isn't working label Oct 6, 2023
@cschelcher
Copy link

Hello,
As far as I know, this started with v0.91.0.
v0.90.0 respects proxy settings

@gbonnefille
Copy link
Author

Hello, As far as I know, this started with v0.91.0. v0.90.0 respects proxy settings

I'm not sure to understand: do you mean this is a regression? Working on v0.90.0 but not working on v0.91.0?

@cschelcher
Copy link

I'm not sure to understand: do you mean this is a regression? Working on v0.90.0 but not working on v0.91.0?

Yes, this is working with v0.90.0.
With v0.91.0+ it times out trying to get the image directly.

@wagoodman wagoodman self-assigned this Nov 2, 2023
@daHaimi
Copy link

daHaimi commented Nov 17, 2023

Just popped into this issue yesterday. Are there any advisories/quick fixes available?

Background: We are trying to run syft behind a corporate proxy inside a container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants