From 0129abbd1e294d0f8a5818495d0ac0229168a301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20=C5=BBak?= Date: Wed, 29 Mar 2023 09:47:57 +0200 Subject: [PATCH] chore: Enable G102 rule for gosec (#12976) Co-authored-by: Pawel Zak --- .golangci.yml | 1 + plugins/common/proxy/socks5_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index fc9dd3ca93a98..f4bb04353c68d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -81,6 +81,7 @@ linters-settings: # Available rules: https://github.com/securego/gosec#available-rules # Default: [] - means include all rules includes: + - G102 - G106 - G108 - G109 diff --git a/plugins/common/proxy/socks5_test.go b/plugins/common/proxy/socks5_test.go index 5cd26d4106cc8..3bd7488047aac 100644 --- a/plugins/common/proxy/socks5_test.go +++ b/plugins/common/proxy/socks5_test.go @@ -20,7 +20,7 @@ func TestSocks5ProxyConfigIntegration(t *testing.T) { proxyPassword = "password" ) - l, err := net.Listen("tcp", "0.0.0.0:0") + l, err := net.Listen("tcp", "127.0.0.1:0") require.NoError(t, err) server, err := socks5.New(&socks5.Config{