From fdf611b8267df3a202fa3b1783353cdded193521 Mon Sep 17 00:00:00 2001 From: kesavan thiruvenkadasamy Date: Fri, 3 Nov 2023 13:00:13 +0530 Subject: [PATCH] [Security] - upgrade golang to 1.21.2 for mitigating security risks Signed-off-by: kesavan thiruvenkadasamy --- .travis.yml | 2 +- Makefile | 4 +++- go.mod | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 71c27d46b..4b0abb49d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ env: global: - GO111MODULE=on go: - - 1.20 + - 1.21.2 script: - | if [ -n "${TRAVIS_TAG}" ]; then diff --git a/Makefile b/Makefile index 2589e8a0a..763a38ba1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ BASE_DIR := $(shell git rev-parse --show-toplevel) GIT_SHA := $(shell git rev-parse --short HEAD) BIN := $(BASE_DIR)/bin -DOCK_BUILD_CNT := golang:1.20.5 +DOCK_BUILD_CNT := golang:1.21.2 DOCKER_IMAGE_REPO?=portworx DOCKER_IMAGE_NAME?=kdmp @@ -82,6 +82,7 @@ staticcheck: docker run --rm -v $(shell pwd):/go/src/github.com/portworx/kdmp $(DOCK_BUILD_CNT) \ /bin/bash -c "cd /go/src/github.com/portworx/kdmp; \ go install honnef.co/go/tools/cmd/staticcheck@v0.4.5; \ + git config --global --add safe.directory /go/src/github.com/portworx/kdmp; \ staticcheck $(PKGS); \ staticcheck -tags unittest $(PKGS)" @@ -90,6 +91,7 @@ errcheck: docker run --rm -v $(shell pwd):/go/src/github.com/portworx/kdmp $(DOCK_BUILD_CNT) \ /bin/bash -c "cd /go/src/github.com/portworx/kdmp; \ GO111MODULE=off go get -u github.com/kisielk/errcheck; \ + git config --global --add safe.directory /go/src/github.com/portworx/kdmp; \ errcheck -ignoregenerated -ignorepkg fmt -verbose -blank $(PKGS); \ errcheck -ignoregenerated -ignorepkg fmt -verbose -blank -tags unittest $(PKGS)" diff --git a/go.mod b/go.mod index 72350276e..8c129ba56 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/portworx/kdmp -go 1.20 +go 1.21 require ( github.com/aquilax/truncate v1.0.0