Skip to content

Commit

Permalink
fix: add #nosec G402 directive
Browse files Browse the repository at this point in the history
  • Loading branch information
safeer committed Jun 13, 2024
1 parent 5ff4157 commit 36c8da2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ func InitialiseClients(authenticators map[string]string, allowInsecure bool) {
h2cClient = &http.Client{
Transport: authn.Transport(&http2.Transport{
AllowHTTP: true,
// #nosec G402
TLSClientConfig: &tls.Config{
InsecureSkipVerify: allowInsecure,
InsecureSkipVerify: allowInsecure, // #nosec G402
},
DialTLSContext: func(ctx context.Context, network, addr string, _ *tls.Config) (net.Conn, error) {
conn, err := dialer.Dial(network, addr)
Expand All @@ -43,9 +42,8 @@ func InitialiseClients(authenticators map[string]string, allowInsecure bool) {
}
tlsClient = &http.Client{
Transport: authn.Transport(&http2.Transport{
// #nosec G402
TLSClientConfig: &tls.Config{
InsecureSkipVerify: allowInsecure,
InsecureSkipVerify: allowInsecure, // #nosec G402
},
DialTLSContext: func(ctx context.Context, network, addr string, config *tls.Config) (net.Conn, error) {
tlsDialer := tls.Dialer{Config: config, NetDialer: dialer}
Expand Down

0 comments on commit 36c8da2

Please sign in to comment.