diff --git a/.golangci.yml b/.golangci.yml index 85b3cc21..345857a3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -32,6 +32,7 @@ linters: - importas - ineffassign - misspell + - modernize - prealloc - promlinter - sloglint @@ -56,10 +57,6 @@ linters: - legacy - std-error-handling rules: - - linters: - - gosec - path: modules/l4rdp/matcher.go - text: G101 # There are no hardcoded credentials. - linters: - gosec path: modules/l4proxy/loadbalancing.go diff --git a/modules/l4openvpn/matcher.go b/modules/l4openvpn/matcher.go index 06182eca..7c233e27 100644 --- a/modules/l4openvpn/matcher.go +++ b/modules/l4openvpn/matcher.go @@ -144,7 +144,7 @@ type MatchOpenVPN struct { // may be present in OpenVPN client config files inside `` block or generated with `openvpn // --tls-crypt-v2 [server.key] --genkey tls-crypt-v2-client` command. No comments (starting with '#' or '-') // are allowed. - ClientKeys []string `json:"client_keys,omitempty"` + ClientKeys []string `json:"client_keys,omitempty"` // nolint:gosec // disable G117 // ClientKeyFiles is a list of paths to files containing 2048-bit client key which may be present in OpenVPN // config files after `tls-crypt-v2` directive. These are the same keys as those ClientKeys introduce, but // these fields are complementary. If both are set, a joint list of client keys is created. Any comments in diff --git a/modules/l4rdp/matcher.go b/modules/l4rdp/matcher.go index 9ab05a60..7cca51eb 100644 --- a/modules/l4rdp/matcher.go +++ b/modules/l4rdp/matcher.go @@ -782,7 +782,7 @@ const ( 2 + // 2 bytes for CR LF 0 RDPTokenOptionalCookieBytesStart uint16 = 0 - RDPTokenOptionalCookiePrefix = "Cookie: msts=" + RDPTokenOptionalCookiePrefix = "Cookie: msts=" // nolint:gosec // disable G101 RDPTokenOptionalCookieReserved = "0000" RDPTokenOptionalCookieSeparator uint8 = 0x2E