Skip to content

Auto updated assets for go models and clients eng#3028

Closed
gurunath-avi wants to merge 2 commits intoengfrom
jenkins_sync_eng_go
Closed

Auto updated assets for go models and clients eng#3028
gurunath-avi wants to merge 2 commits intoengfrom
jenkins_sync_eng_go

Conversation

@gurunath-avi
Copy link
Collaborator

No description provided.

Signed-off-by: gurunath-avi <gurunath-reddy.kambala@broadcom.com>
return nil, err
}
avisess.transport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},

Check failure

Code scanning / CodeQL

Disabled TLS certificate check High

InsecureSkipVerify should not be used in production code.

Copilot Autofix

AI 10 months ago

To fix the problem, we need to ensure that TLS certificate verification is enabled. This involves setting InsecureSkipVerify to false and properly configuring the certificates. If the certificates are not available or cannot be verified, the connection should fail rather than proceeding insecurely.

The best way to fix the problem without changing existing functionality is to remove the InsecureSkipVerify: true setting and ensure that the application uses valid certificates. This might involve loading the system's root CA certificates or specifying a custom CA certificate.

Suggested changeset 1
go/session/avisession.go

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/go/session/avisession.go b/go/session/avisession.go
--- a/go/session/avisession.go
+++ b/go/session/avisession.go
@@ -376,3 +376,3 @@
 				avisess.transport = &http.Transport{
-					TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
+					TLSClientConfig: &tls.Config{},
 					Proxy:           http.ProxyURL(proxyURL),
@@ -381,3 +381,3 @@
 				avisess.transport = &http.Transport{
-					TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
+					TLSClientConfig: &tls.Config{},
 				}
EOF
@@ -376,3 +376,3 @@
avisess.transport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
TLSClientConfig: &tls.Config{},
Proxy: http.ProxyURL(proxyURL),
@@ -381,3 +381,3 @@
avisess.transport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
TLSClientConfig: &tls.Config{},
}
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
}
} else {
avisess.transport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},

Check failure

Code scanning / CodeQL

Disabled TLS certificate check High

InsecureSkipVerify should not be used in production code.

Copilot Autofix

AI 10 months ago

To fix the problem, we need to ensure that TLS certificate verification is enabled. This can be done by setting InsecureSkipVerify to false or by removing the TLSClientConfig entirely if it is not needed. Additionally, we should ensure that the application is configured with the correct certificates to allow for proper verification.

The best way to fix the problem without changing existing functionality is to set InsecureSkipVerify to false and ensure that the application is using valid certificates. This change should be made in the go/session/avisession.go file, specifically on lines 377 and 382.

Suggested changeset 1
go/session/avisession.go

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/go/session/avisession.go b/go/session/avisession.go
--- a/go/session/avisession.go
+++ b/go/session/avisession.go
@@ -376,3 +376,3 @@
 				avisess.transport = &http.Transport{
-					TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
+					TLSClientConfig: &tls.Config{InsecureSkipVerify: false},
 					Proxy:           http.ProxyURL(proxyURL),
@@ -381,3 +381,3 @@
 				avisess.transport = &http.Transport{
-					TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
+					TLSClientConfig: &tls.Config{InsecureSkipVerify: false},
 				}
EOF
@@ -376,3 +376,3 @@
avisess.transport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
TLSClientConfig: &tls.Config{InsecureSkipVerify: false},
Proxy: http.ProxyURL(proxyURL),
@@ -381,3 +381,3 @@
avisess.transport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
TLSClientConfig: &tls.Config{InsecureSkipVerify: false},
}
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Signed-off-by: gurunath-avi <gurunath-reddy.kambala@broadcom.com>
@Rohan-sss1 Rohan-sss1 closed this May 19, 2025
@Rohan-sss1 Rohan-sss1 deleted the jenkins_sync_eng_go branch May 19, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants