Skip to content

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

maksudur-rahman-maruf
Copy link

@maksudur-rahman-maruf maksudur-rahman-maruf commented Jun 12, 2025

  • Added these two parameters network_ssl_cert_file and network_ssl_trustAll and reconfigured the getHttpURLConnection method to support the self signed certificates.
  • Made a few improvements to the SecurityScan and PrCommentScan interfaces.

@maksudur-rahman-maruf maksudur-rahman-maruf requested a review from a team as a code owner June 12, 2025 15:02
@maksudur-rahman-maruf maksudur-rahman-maruf marked this pull request as draft June 12, 2025 15:02
@maksudur-rahman-maruf maksudur-rahman-maruf marked this pull request as ready for review June 19, 2025 10:06
@zaman-akib zaman-akib requested a review from Copilot June 19, 2025 10:33
Copy link

@Copilot Copilot AI left a 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

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 SSLContext#init
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 SSLContext#init
Potentially unsafe invocation of HttpsURLConnection#setSSLSocketFactory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants