-
Notifications
You must be signed in to change notification settings - Fork 3
SIGINT-3174: Jenkins [dev] : Support self signed certs #50
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for self-signed certificates by introducing two new parameters (network_ssl_cert_file and network_ssl_trustAll) and updates several classes and tests to pass an additional scanParameters map.
- Integrates self-signed cert support into HTTP connections via Utility.getHttpURLConnection
- Updates test cases and configuration UIs to handle the new network SSL parameters
- Refactors interfaces and parameter mapping for improved network configuration support
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
BridgeDownloadParameterServiceTest.java | Updated constructor calls with scanParameters |
ToolsParameterServiceTest.java | Renamed and enhanced test for network input JSON with new SSL parameters |
ParameterMappingServiceTest.java | Adjusted assertions to reflect the additional network SSL parameters |
Utility.java | Updated getHttpURLConnection to support self-signed certs via SSL context setup |
config.jelly & CSS files | Updated UI elements and styling for network configuration support |
Various Java source files (BridgeInstall, BridgeDownload, etc.) | Updated constructors and method calls to propagate scanParameters |
src/main/java/io/jenkins/plugins/security/scan/global/Utility.java
Outdated
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/security/scan/service/ToolsParameterService.java
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/security/scan/global/Utility.java
Outdated
Show resolved
Hide resolved
return null; | ||
} | ||
|
||
public static HttpURLConnection createTrustAllConnection(URL url, EnvVars envVars, LoggerWrapper logger) |
Check warning
Code scanning / Jenkins Security Scan
Jenkins: Generally unsafe method calls Warning
Potentially unsafe invocation of HttpsURLConnection#setDefaultSSLSocketFactory
|
||
public static HttpURLConnection createCertFileConnection( |
Check warning
Code scanning / Jenkins Security Scan
Jenkins: Generally unsafe method calls Warning
Potentially unsafe invocation of HttpsURLConnection#setSSLSocketFactory
network_ssl_cert_file
andnetwork_ssl_trustAll
and reconfigured thegetHttpURLConnection
method to support the self signed certificates.SecurityScan
andPrCommentScan
interfaces.