From e2f901e47abc20619e7161a65bbcee350a53d31b Mon Sep 17 00:00:00 2001 From: Mihai Todor Date: Tue, 18 Oct 2022 13:12:02 +0100 Subject: [PATCH] Add govulncheck linter (#1513) * Add govulncheck linter This is temporary while https://github.com/golangci/golangci-lint/issues/3094 is being worked on here: https://github.com/golangci/golangci-lint/pull/3199 * Upgrade actions/setup-go Also ensure that it installs the latest available matching Go release. --- .github/workflows/docker_edge.yml | 3 ++- .github/workflows/integration_test.yml | 3 ++- .github/workflows/release.yml | 6 ++++-- .github/workflows/test.yml | 19 +++++++++++++++++-- go.mod | 2 +- go.sum | 3 ++- 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker_edge.yml b/.github/workflows/docker_edge.yml index 7cb9b44fef..cdc86657e0 100644 --- a/.github/workflows/docker_edge.yml +++ b/.github/workflows/docker_edge.yml @@ -12,9 +12,10 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.19.x + check-latest: true - name: Check Out Repo uses: actions/checkout@v2 diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 99f3ffa3dc..400d43df37 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -13,9 +13,10 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.19.x + check-latest: true - name: Checkout code uses: actions/checkout@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e2f4e6d80..f154368ed9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,9 +11,10 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.19.x + check-latest: true - name: Check Out Repo uses: actions/checkout@v2 @@ -45,9 +46,10 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.19.x + check-latest: true - name: Check Out Repo uses: actions/checkout@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 84e56a35cf..96913e44cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,9 +20,10 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go-version }} + check-latest: true - name: Checkout code uses: actions/checkout@v2 @@ -52,9 +53,10 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.19.x + check-latest: true - name: Checkout code uses: actions/checkout@v2 @@ -86,6 +88,12 @@ jobs: CGO_ENABLED: 0 steps: + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: 1.19.x + check-latest: true + - name: Checkout code uses: actions/checkout@v2 @@ -94,3 +102,10 @@ jobs: with: version: latest args: --timeout 30m cmd/... internal/... public/... + + # TODO: Remove this after https://github.com/golangci/golangci-lint/issues/3094 is addressed + - name: Get govulncheck + run: go install golang.org/x/vuln/cmd/govulncheck@latest + + - name: Run govulncheck + run: govulncheck ./... diff --git a/go.mod b/go.mod index 222fe106f1..fd098fdd14 100644 --- a/go.mod +++ b/go.mod @@ -110,7 +110,7 @@ require ( golang.org/x/net v0.0.0-20220927171203-f486391704dc golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7 - golang.org/x/text v0.3.7 + golang.org/x/text v0.3.8 google.golang.org/api v0.97.0 google.golang.org/grpc v1.49.0 gopkg.in/natefinch/lumberjack.v2 v2.0.0 diff --git a/go.sum b/go.sum index 09314df04c..434f6b951c 100644 --- a/go.sum +++ b/go.sum @@ -1469,8 +1469,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=