-
Notifications
You must be signed in to change notification settings - Fork 8
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
osvVulnerabilityAlerts - Connect Timeout Error behind HTTP proxy #252
Labels
bug
Something isn't working
Comments
Thanks for the detailed bug report. The bug fix is going to be either adding an |
If someone have the same problem, you can use this temporary fix: |
JamieMagee
added a commit
that referenced
this issue
Mar 27, 2023
In v6.1.0 Octokit started using Node.js's built-in `fetch`[^1] (provided by [undici][1]. Unfortunately, it is not 100% compatible with `node-fetch`, and notably it doesn't support `HTTP_PROXY` environment variables[^2]. This change switches `osv-offline` to explicitly use `node-fetch`. Closes #252 [1]: https://github.com/nodejs/undici [^1]: octokit/request.js@d000a0a [^2]: nodejs/undici#1650
JamieMagee
added a commit
that referenced
this issue
Mar 27, 2023
In v6.1.0 Octokit started using Node.js's built-in `fetch`[^1] (provided by [undici][1]. Unfortunately, it is not 100% compatible with `node-fetch`, and notably it doesn't support `HTTP_PROXY` environment variables[^2]. This change switches `osv-offline` to explicitly use `node-fetch`. Closes #252 [1]: https://github.com/nodejs/undici [^1]: octokit/request.js@d000a0a [^2]: nodejs/undici#1650
JamieMagee
added a commit
that referenced
this issue
Mar 28, 2023
In v6.1.0 Octokit started using Node.js's built-in `fetch`[^1] (provided by [undici][1]. Unfortunately, it is not 100% compatible with `node-fetch`, and notably it doesn't support `HTTP_PROXY` environment variables[^2]. This change switches `osv-offline` to explicitly use `node-fetch`. Closes #252 [1]: https://github.com/nodejs/undici [^1]: octokit/request.js@d000a0a [^2]: nodejs/undici#1650
JamieMagee
added a commit
that referenced
this issue
Apr 1, 2023
In v6.1.0 Octokit started using Node.js's built-in `fetch`[^1] (provided by [undici][1]. Unfortunately, it is not 100% compatible with `node-fetch`, and notably it doesn't support `HTTP_PROXY` environment variables[^2]. This change switches `osv-offline` to explicitly use `node-fetch`. Closes #252 [1]: https://github.com/nodejs/undici [^1]: octokit/request.js@d000a0a [^2]: nodejs/undici#1650
JamieMagee
added a commit
that referenced
this issue
Apr 1, 2023
In v6.1.0 Octokit started using Node.js's built-in `fetch`[^1] (provided by [undici][1]. Unfortunately, it is not 100% compatible with `node-fetch`, and notably it doesn't support `HTTP_PROXY` environment variables[^2]. This change switches `osv-offline` to explicitly use `node-fetch`. Closes #252 [1]: https://github.com/nodejs/undici [^1]: octokit/request.js@d000a0a [^2]: nodejs/undici#1650
JamieMagee
added a commit
that referenced
this issue
Apr 1, 2023
In v6.1.0 Octokit started using Node.js's built-in `fetch`[^1] (provided by [undici][1]. Unfortunately, it is not 100% compatible with `node-fetch`, and notably it doesn't support `HTTP_PROXY` environment variables[^2]. This change switches `osv-offline` to explicitly use `node-fetch`. Closes #252 [1]: https://github.com/nodejs/undici [^1]: octokit/request.js@d000a0a [^2]: nodejs/undici#1650
JamieMagee
added a commit
that referenced
this issue
Apr 1, 2023
In v6.1.0 Octokit started using Node.js's built-in `fetch`[^1] (provided by [undici][1]. Unfortunately, it is not 100% compatible with `node-fetch`, and notably it doesn't support `HTTP_PROXY` environment variables[^2]. This change switches `osv-offline` to explicitly use `node-fetch`. Closes #252 [1]: https://github.com/nodejs/undici [^1]: octokit/request.js@d000a0a [^2]: nodejs/undici#1650
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue created following the discussion renovatebot/renovate#20876
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us what version of Renovate you run.
35.1.1
If you're self-hosting Renovate, select which platform you are using.
GitLab self-hosted
If you're self-hosting Renovate, tell us what version of the platform you run.
15.8.2
Was this something which used to work for you, and then stopped?
It used to work, and then stopped
Wanted end result.
After upgrading to renovate >= v35.x , osvVulnerabilityAlerts feature doesn't work anymore and there is only a warn log (even with trace log level): Unable to read vulnerability information.
It work correctly on version <= 34.160.0.
I'm behinh an HTTP proxy.
What you tried so far.
With adding debug logs, I see there is an error when calling
fetch
nodejs api:throw ConnectTimeoutError: Connect Timeout Error
.I'm behind an HTTP proxy with these env vars:
All works with my HTTP proxy with renovate < v35.x.
I see that renovatebot/osv-offline use Octokit api to download osv database.
There is a new
fetch
api in Node18 and Octokit use this native api when available:octokit/request.js@d000a0a
And Node have been upgrade from v16 to Node v18 in Renovate Docker image since v35:
renovatebot/docker-renovate@f367ca3
I think my problem is because
fetch
native api is now used in Renovate Docker image >= v35 and don't work by default with HTTP proxy env vars (nodejs/undici#1650).It seems to be possible to configure Octokit used by renovatebot/osv-offline (https://github.com/renovatebot/osv-offline/blob/main/packages/osv-offline/src/lib/download.ts#L44) with an HttpProxyAgent :
https://github.com/octokit/core.js/blob/main/test/agent-proxy/agent-proxy-test.test.ts#L62
Relevant debug logs
Logs
The text was updated successfully, but these errors were encountered: