[ 
https://issues.apache.org/jira/browse/CAMEL-27342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned CAMEL-27342:
-----------------------------------

    Assignee: Claus Ibsen

> camel-jbang - CVE audit connects to OSV.dev through the proxy of the Maven 
> settings or HTTPS_PROXY, with proxy authentication
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27342
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27342
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> The CVE audit (the CVE Audit screen of the TUI and {{camel dependency 
> audit}}, CAMEL-27328 / CAMEL-27340) queries OSV.dev over HTTPS. Companies 
> often have no direct internet access, so it must work through their HTTP 
> proxy.
> h4. Today
> * {{camel dependency audit}}: {{new OsvClient()}} uses 
> {{ProxySelector.getDefault()}}, so the only way to set a proxy is 
> {{-Dhttps.proxyHost}} in {{JAVA_OPTS}}. The {{HTTPS_PROXY}} / {{NO_PROXY}} 
> environment variables and the proxy of {{~/.m2/settings.xml}} are ignored.
> * TUI: has {{camel.tui.proxyHost}} and {{camel.tui.proxyPort}}, but no proxy 
> username/password and no non-proxy hosts.
> * MCP: {{camel_dependency_security_audit}} checks only the Camel advisories 
> of the catalog, without network, so it is not affected.
> h4. Proposal
> One shared helper that builds the {{ProxySelector}} and {{Authenticator}} for 
> the OSV.dev client, used by the CLI and the TUI, taken from (first wins):
> # the options of the command / the TUI settings
> # the active proxy of {{~/.m2/settings.xml}} (host, port, username, password, 
> nonProxyHosts), which companies already configure for Maven
> # the {{HTTPS_PROXY}} / {{HTTP_PROXY}} / {{NO_PROXY}} environment variables 
> that CI runners set
> # the JVM proxy system properties
> Gotcha: {{java.net.http.HttpClient}} needs an {{Authenticator}} for proxy 
> authentication, and the JDK disables Basic authentication for HTTPS 
> tunnelling by default ({{jdk.http.auth.tunneling.disabledSchemes=Basic}}), 
> which is the usual case for a corporate proxy. It must be handled, and 
> documented.
> The TUI settings popup gets proxy username, password (secret) and non-proxy 
> hosts. Docs: the {{camel dependency audit}} page and the TUI page.
> This helper is reused by the Maven goal (separate JIRA), which takes the 
> proxy from the Maven settings.
> _Claude Code on behalf of Claus Ibsen (davsclaus)_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to