Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enable govulncheck #2969

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- cron: '24 20 * * 4'

env:
GO_VERSION: '1.21.1'
GO_VERSION: '1.21.5'

jobs:
analyze:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: govulncheck
# Runs https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck to proactively
# check for vulnerabilities.
#
# Run `make vulncheck` from the root of the repo to run this workflow locally.
on:
pull_request:

env:
GO_VERSION: '1.21.5'

jobs:
govulncheck:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v4
- name: make govulncheck
run: make govulncheck
rootulp marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_call:

env:
GO_VERSION: '1.21.1'
GO_VERSION: '1.21.5'

jobs:
golangci-lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
GO_VERSION: '1.21.1'
GO_VERSION: '1.21.5'

jobs:
test-e2e:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_call:

env:
GO_VERSION: '1.21.1'
GO_VERSION: '1.21.5'

jobs:
test-short:
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DOCKER_PROTO_BUILDER := docker run -v $(shell pwd):/workspace --workdir /workspa
PROJECTNAME=$(shell basename "$(PWD)")
HTTPS_GIT := https://github.com/celestiaorg/celestia-app.git
PACKAGE_NAME := github.com/celestiaorg/celestia-app
GOLANG_CROSS_VERSION ?= v1.21.4
GOLANG_CROSS_VERSION ?= v1.21.5

# process linker flags
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=celestia-app \
Expand Down Expand Up @@ -190,3 +190,8 @@ prebuilt-binary:
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
release --clean
.PHONY: prebuilt-binary

## govulncheck: Check for vulnerabilities in dependencies.
govulncheck:
@go run golang.org/x/vuln/cmd/govulncheck@latest ./...
.PHONY: govulncheck
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ node | | | |

### Source

1. [Install Go](https://go.dev/doc/install) 1.21.1
1. [Install Go](https://go.dev/doc/install) 1.21.5
1. Clone this repo
1. Install the celestia-app CLI

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/celestiaorg/celestia-app

go 1.21.1
go 1.21.5

require (
cosmossdk.io/errors v1.0.0-beta.7
Expand Down
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.21.1
go 1.21.5

use (
.
Expand Down
152 changes: 152 additions & 0 deletions go.work.sum

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions test/testground/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILD_BASE_IMAGE is the base image to use for the build. It contains a rolling
# accumulation of Go build/package caches.
ARG BUILD_BASE_IMAGE=docker.io/golang:1.21.0-alpine3.18
ARG BUILD_BASE_IMAGE=docker.io/golang:1.21.5-alpine3.18
# This Dockerfile performs a multi-stage build and RUNTIME_IMAGE is the image
# onto which to copy the resulting binary.
#
Expand Down Expand Up @@ -37,7 +37,7 @@ ARG GO_PROXY=https://proxy.golang.org
# BUILD_TAGS is either nothing, or when expanded, it expands to "-tags <comma-separated build tags>"
ARG BUILD_TAGS

# TESTPLAN_EXEC_PKG is the executable package within this test plan we want to build.
# TESTPLAN_EXEC_PKG is the executable package within this test plan we want to build.
ENV TESTPLAN_EXEC_PKG ${TESTPLAN_EXEC_PKG}

# We explicitly set GOCACHE under the /go directory for more tidiness.
Expand All @@ -51,18 +51,18 @@ RUN apk add gcompat

# Download deps.
RUN echo "Using go proxy: ${GO_PROXY}" \
&& cd ${PLAN_DIR} \
&& go env -w GOPROXY="${GO_PROXY}" \
&& go mod download
&& cd ${PLAN_DIR} \
&& go env -w GOPROXY="${GO_PROXY}" \
&& go mod download


# Now copy the rest of the source and run the build.
COPY . /


RUN cd ${PLAN_DIR} \
&& go env -w GOPROXY="${GO_PROXY}" \
&& CGO_ENABLED=${CgoEnabled} GOOS=linux GOARCH=amd64 go build -o ${PLAN_DIR}/testplan.bin ${BUILD_TAGS} ${TESTPLAN_EXEC_PKG}
&& go env -w GOPROXY="${GO_PROXY}" \
&& CGO_ENABLED=${CgoEnabled} GOOS=linux GOARCH=amd64 go build -o ${PLAN_DIR}/testplan.bin ${BUILD_TAGS} ${TESTPLAN_EXEC_PKG}

# Store module dependencies
RUN cd ${PLAN_DIR} \
Expand Down
2 changes: 1 addition & 1 deletion test/testground/compositions/standard/plan.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cpu = "6"
count = 40
percentage = 0.0
[groups.build_config]
build_base_image = "golang:1.21.3"
build_base_image = "golang:1.21.5"
enable_go_build_cache = true
enabled = true
go_version = "1.21"
Expand Down
2 changes: 1 addition & 1 deletion test/testground/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/celestiaorg/celestia-app/test/testground

go 1.21.1
go 1.21.5

require (
github.com/celestiaorg/celestia-app v1.0.0-rc0.0.20231219172024-f57f5c104ea0
Expand Down
Loading