-
Notifications
You must be signed in to change notification settings - Fork 18
feat: implement SSL and proxy handling for downloads [IDE-1299] #391
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
Open
bastiandoetsch
wants to merge
5
commits into
main
Choose a base branch
from
fix/IDE-1299_ca_handling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add SSL certificate validation bypass when IgnoreUnknownCA setting is enabled - Add automatic system proxy configuration for CLI downloads - Enhance SnykWebClient to respect SSL and proxy settings from extension options - Enhance SnykCliDownloader to use properly configured HttpClient with SSL and proxy support - Add comprehensive test coverage for SSL and proxy handling functionality - Fix SSL certificate validation not respecting the IgnoreUnknownCA setting during CLI downloads - Fix missing proxy configuration for CLI downloads This ensures that both the --insecure flag and proxy configurations are properly respected throughout the download process, improving compatibility with corporate environments that use custom certificates or proxy servers.
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
Move the SSL and proxy handling improvements from [Unreleased] section to version 2.3.0 as requested.
…-1299] Remove redundant proxy configuration since HttpClient and WebClient use system proxy by default. Keep only the essential SSL certificate validation bypass for the --insecure flag (IgnoreUnknownCA setting). Changes: - Remove manual proxy configuration from SnykWebClient and SnykCliDownloader - Keep only SSL certificate validation bypass when IgnoreUnknownCA is enabled - Update tests to focus on essential SSL functionality - Update changelog to reflect simplified approach This results in cleaner, simpler code that relies on .NET's default proxy behavior while still providing the necessary --insecure flag support.
Remove accidentally committed JetBrains IDE configuration files from git tracking and add .idea/ to .gitignore to prevent future commits of IDE-specific files.
…IDE-1299] Revert incorrect changes to GetLatestReleaseInfo method that attempted to parse JSON response when the endpoint actually returns a simple version string. The method now correctly: - Downloads version string from the endpoint - Cleans up the response (removes newlines) - Creates LatestReleaseInfo object with the version string Only minimal change kept: passing SnykOptions to SnykWebClient for SSL handling.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR implements comprehensive SSL certificate and proxy handling for CLI downloads in the Snyk Visual Studio plugin. The changes ensure that both the --insecure flag and proxy configurations are properly respected throughout the download process, improving compatibility with corporate environments that use custom certificates or proxy servers.
Key Changes:
SnykWebClientto respect SSL and proxy settings from extension optionsSnykCliDownloaderto use properly configuredHttpClientwith SSL and proxy supportIgnoreUnknownCAsetting is enabledFixes:
IgnoreUnknownCAsetting during CLI downloadsThis addresses the requirements to:
✅ Respect the --insecure flag via
IgnoreUnknownCAsetting✅ Handle custom certificates properly through SSL configuration
✅ Use proxy configuration everywhere for downloads
Checklist