diff --git a/Dockerfile b/Dockerfile index 56168a180f..63106487c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -223,8 +223,7 @@ FROM binary-dummy AS containerd-windows FROM containerd-${TARGETOS} AS containerd FROM base AS golangci_lint -# FIXME: when updating golangci-lint, remove the temporary "nolint" in https://github.com/moby/moby/blob/7860686a8df15eea9def9e6189c6f9eca031bb6f/libnetwork/networkdb/cluster.go#L246 -ARG GOLANGCI_LINT_VERSION=v1.49.0 +ARG GOLANGCI_LINT_VERSION=v1.51.2 RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ GOBIN=/build/ GO111MODULE=on go install "github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}" \ diff --git a/libnetwork/networkdb/cluster.go b/libnetwork/networkdb/cluster.go index 3cebbaba42..2ef5c22157 100644 --- a/libnetwork/networkdb/cluster.go +++ b/libnetwork/networkdb/cluster.go @@ -717,7 +717,7 @@ func randomOffset(n int) int { return 0 } - val, err := rand.Int(rand.Reader, big.NewInt(int64(n))) // #nosec G404 -- False positive; see https://github.com/securego/gosec/issues/862 + val, err := rand.Int(rand.Reader, big.NewInt(int64(n))) if err != nil { logrus.Errorf("Failed to get a random offset: %v", err) return 0