1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-07 14:55:27 +02:00

fix(linter): add linter rules to reduce the chance for invalid FIPS settings BE-11979 (#975)

This commit is contained in:
andres-portainer 2025-08-05 09:23:07 -03:00 committed by GitHub
parent dc273b2d63
commit d00d71ecbf
13 changed files with 140 additions and 46 deletions

View file

@ -1,7 +1,6 @@
package networking
import (
"crypto/fips140"
"fmt"
"net"
"net/http"
@ -73,14 +72,11 @@ func ProbeTelnetConnection(url string) string {
func DetectProxy(url string) string {
client := &http.Client{
Transport: &http.Transport{
TLSClientConfig: crypto.CreateTLSConfiguration(),
TLSClientConfig: crypto.CreateTLSConfiguration(true),
},
Timeout: 10 * time.Second,
}
// TODO: use fips.CanTLSSkipVerify() instead
client.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify = !fips140.Enabled()
result := map[string]string{
"operation": "proxy detection",
"local_address": "unknown",