From 4e2ca64319f17867ac63a8d1283a67e2f1c4daba Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Tue, 7 Jan 2025 19:02:14 +0200 Subject: Fixed all high and medium security issues from gosec --- internal/client/gateway/gateway.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/client/gateway') diff --git a/internal/client/gateway/gateway.go b/internal/client/gateway/gateway.go index 9709968..df1503f 100644 --- a/internal/client/gateway/gateway.go +++ b/internal/client/gateway/gateway.go @@ -46,6 +46,7 @@ func init() { tlsConfig = &tls.Config{ RootCAs: certPool, ServerName: "localhost", + MinVersion: tls.VersionTLS12, } } @@ -145,7 +146,7 @@ func handleAuth(ctx context.Context, conn net.Conn, privKey ed25519.PrivateKey) } bytesRead += n } - id := snowflake.ID(binary.BigEndian.Uint64(idBytes[:])) + id := snowflake.ID(binary.BigEndian.Uint64(idBytes[:])) // #nosec G115 return id, nil } -- cgit v1.3.1