Skip to content

9.0.3 ignoring maven proxy settings #6254

@puni2k

Description

@puni2k

Describe the bug
When executing dependency-check-maven:check the plugin the check for updates at https://services.nvd.nist.gov:443 fails due to the plugin ignoring the proxy configuration in the maven settings file.

Providing the proxy settings via -Dhttp(s).proxyHost/Port works though.

Version of dependency-check used
9.0.3

Log file
without -Dhttp...

...

[DEBUG] Setting: proxy.server='10.233.63.239'
[DEBUG] Setting: proxy.port='3128'
...
[INFO] Checking for updates
[WARNING] An NVD API Key was not provided - it is highly recommended to use an NVD API key as the update can take a VERY long time without an API Key
[DEBUG] rate limited call delay: 8000
[DEBUG] requesting URI: [https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=2000&startIndex=0](https://deref-web.de/mail/client/w7C1TZjpOc8/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%2Frest%2Fjson%2Fcves%2F2.0%3FresultsPerPage%3D2000%26startIndex%3D0)
[DEBUG] Ticket taken At: 11:33:38; count: 1; by 43
[DEBUG] Requested At: 11:33:38; URI: /rest/json/cves/2.0?resultsPerPage=2000&startIndex=0
[DEBUG] ex-0000000001 preparing request execution
[DEBUG] ex-0000000001 target auth state: UNCHALLENGED
[DEBUG] ex-0000000001 proxy auth state: UNCHALLENGED
[DEBUG] ex-0000000001 acquiring connection with route {s}->[https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443)
[DEBUG] ex-0000000001 acquiring endpoint (3 MINUTES)
[DEBUG] ex-0000000001 endpoint lease request (3 MINUTES) [route: {s}->[https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443)][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25]
[DEBUG] ex-0000000001 endpoint leased [route: {s}->[https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443)][total available: 0; route allocated: 1 of 5; total allocated: 1 of 25]
[DEBUG] ex-0000000001 acquired ep-0000000001
[DEBUG] ex-0000000001 acquired endpoint ep-0000000001
[DEBUG] ep-0000000001 connecting endpoint (null)
[DEBUG] ep-0000000001 connecting endpoint to [https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443) (3 MINUTES)
[DEBUG] services.nvd.nist.gov resolving remote address
[DEBUG] services.nvd.nist.gov resolved to [services.nvd.nist.gov/18.235.227.114]
[DEBUG] services.nvd.nist.gov:443 connecting null->services.nvd.nist.gov/18.235.227.114:443 (3 MINUTES)
[DEBUG] services.nvd.nist.gov:443 connection to services.nvd.nist.gov/18.235.227.114:443 failed (class java.net.ConnectException); terminating operation
[DEBUG] ex-0000000001 Connect to [https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443) [services.nvd.nist.gov/18.235.227.114] failed: Connection refused: no further information
org.apache.hc.client5.http.HttpHostConnectException: Connect to [https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443) [services.nvd.nist.gov/18.235.227.114] failed: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect (Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect (SocketChannelImpl.java:777)
    at org.apache.hc.core5.reactor.InternalConnectChannel.onIOEvent (InternalConnectChannel.java:64)
    at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent (InternalChannel.java:51)
    at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents (SingleCoreIOReactor.java:178)
    at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute (SingleCoreIOReactor.java:127)
    at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute (AbstractSingleCoreIOReactor.java:86)
    at org.apache.hc.core5.reactor.IOReactorWorker.run (IOReactorWorker.java:44)
    at java.lang.Thread.run (Thread.java:829)
[INFO] Recoverable I/O exception (org.apache.hc.client5.http.HttpHostConnectException) caught when processing request to {s}->[https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443)
...

with -Dhttp...

...
[DEBUG] Setting: proxy.server='10.233.63.239'
[DEBUG] Setting: proxy.port='3128'
...
[INFO] Checking for updates
[WARNING] An NVD API Key was not provided - it is highly recommended to use an NVD API key as the update can take a VERY long time without an API Key
[DEBUG] rate limited call delay: 8000
[DEBUG] requesting URI: [https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=2000&startIndex=0](https://deref-web.de/mail/client/w7C1TZjpOc8/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%2Frest%2Fjson%2Fcves%2F2.0%3FresultsPerPage%3D2000%26startIndex%3D0)
[DEBUG] Ticket taken At: 11:39:13; count: 1; by 43
[DEBUG] Requested At: 11:39:13; URI: /rest/json/cves/2.0?resultsPerPage=2000&startIndex=0
[DEBUG] ex-0000000001 preparing request execution
[DEBUG] ex-0000000001 target auth state: UNCHALLENGED
[DEBUG] ex-0000000001 acquiring connection with route {tls}->[http://10.233.63.239:3128](https://deref-web.de/mail/client/bYUcld_C3EU/dereferrer/?redirectUrl=http%3A%2F%2F10.233.63.239%3A3128)->[https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443)
[DEBUG] ex-0000000001 acquiring endpoint (3 MINUTES)
[DEBUG] ex-0000000001 endpoint lease request (3 MINUTES) [route: {tls}->[http://10.233.63.239:3128](https://deref-web.de/mail/client/bYUcld_C3EU/dereferrer/?redirectUrl=http%3A%2F%2F10.233.63.239%3A3128)->[https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443)][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25]
[DEBUG] ex-0000000001 endpoint leased [route: {tls}->[http://10.233.63.239:3128](https://deref-web.de/mail/client/bYUcld_C3EU/dereferrer/?redirectUrl=http%3A%2F%2F10.233.63.239%3A3128)->[https://services.nvd.nist.gov:443](https://deref-web.de/mail/client/xUR8LEObUDQ/dereferrer/?redirectUrl=https%3A%2F%2Fservices.nvd.nist.gov%3A443)][total available: 0; route allocated: 1 of 5; total allocated: 1 of 25]
[DEBUG] ex-0000000001 acquired ep-0000000001
[DEBUG] ex-0000000001 acquired endpoint ep-0000000001
[DEBUG] ep-0000000001 connecting endpoint (null)
[DEBUG] ep-0000000001 connecting endpoint to [http://10.233.63.239:3128](https://deref-web.de/mail/client/bYUcld_C3EU/dereferrer/?redirectUrl=http%3A%2F%2F10.233.63.239%3A3128) (3 MINUTES)
[DEBUG] 10.233.63.239 resolving remote address
[DEBUG] 10.233.63.239 resolved to [/10.233.63.239]
[DEBUG] 10.233.63.239:3128 connecting null->/10.233.63.239:3128 (3 MINUTES)
[DEBUG] c-0000000000[ACTIVE][rc:c] protocol upgrade class org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler
[DEBUG] 10.233.63.239:3128 connected null->/10.233.63.239:3128 as c-0000000000
...

To Reproduce
run
mvn org.owasp:dependency-check-maven:9.0.3:check
with proxy configuration in maven settings file.

Expected behavior
Plugin should be able to establish connection with server without additionally specifying proxy servers

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions