snyk / snyk-nuget-plugin

Basic Snyk CLI plugin for .NET support.
Other
7 stars 14 forks source link

feat: [OSM-571] replacing exec with a subprocess with support for Snyk CLI V2 #165

Closed dotkas closed 1 year ago

dotkas commented 1 year ago

Same as https://github.com/snyk/snyk-go-plugin/pull/103 and https://github.com/snyk/snyk-swiftpm-plugin/pull/29

There is a bigger architectural change in the Extensible CLI.

The Extensible CLI spawns a network proxy (which intercepts the SSL connections) and channels all the traffic from the legacy CLI through that internal proxy. The Intention is to add support for different features like Kerberos Proxy Authentication, OS CA stores, OAuth … through the Golang based Extensible CLI to the legacy CLI. This happens by setting the proxy settings when calling the legacy CLI from within the Extensible CLI. When the legacy CLI now calls an external tool, this tool would also try to communicate through the internal proxy. Since the internal proxy intercepts SSL connections, it uses a self-signed CA cert, which is known to the legacy CLI but not the external tools it calls. There are actually different solutions.

Using the solution we applied in the snyk-go-plugin and others, which restores the proxy settings to whatever the user specified.

Telling the external tool to accept the temporary certificate file used by the internal proxy.

snyksec commented 1 year ago

:tada: This PR is included in version 1.30.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: