Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/pre_commit_go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
- name: Set up Go environment
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: "1.26"
go-version: "1.27"
- name: Install goimports
run: |
go install golang.org/x/tools/cmd/goimports@v0.42.0
- name: Install golangci-lint
uses: giantswarm/install-binary-action@c37eb401e5092993fc76d545030b1d1769e61237 # v3.0.0
with:
binary: golangci-lint
version: "2.9.0"
version: "2.13.2"
download_url: "https://github.com/golangci/golangci-lint/releases/download/v${version}/${binary}-${version}-linux-amd64.tar.gz"
- name: Execute pre-commit hooks
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/zz_generated.fix_vulnerabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
#
# devctl
#
# https://github.com/giantswarm/devctl/blob/8d8b9dbd820fc286616891556b0ed5299130ee30/pkg/gen/input/workflows/internal/file/fix_vulnerabilities.yaml.template
# https://github.com/giantswarm/devctl/blob/ee062182d7b7130f1153a8c708d493a5aa5fffd3/pkg/gen/input/workflows/internal/file/fix_vulnerabilities.yaml.template
#

name: Fix Go vulnerabilities

on:
schedule:
- cron: '0 9 * * 1-5'
- cron: '0 21 * * 3'
workflow_dispatch:
inputs:
branch:
Expand Down
13 changes: 10 additions & 3 deletions Makefile.gen.go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# devctl
#
# https://github.com/giantswarm/devctl/blob/0ec3e49745962245bdd6d5c282d4272c40faec37/pkg/gen/input/makefile/internal/file/Makefile.gen.go.mk.template
# https://github.com/giantswarm/devctl/blob/abc5bac3d3d80f2297debd3f8b12ed79ba948740/pkg/gen/input/makefile/internal/file/Makefile.gen.go.mk.template
#

APPLICATION := $(shell go list -m | cut -d '/' -f 3)
Expand Down Expand Up @@ -110,10 +110,17 @@ fmt: ## Run go fmt against code.
vet: ## Run go vet against code.
go vet ./...

# `-deps ./...` lists only the packages actually compiled into this module, so nancy
# reports vulnerabilities in code we really ship. `-m all` walks the entire module
# graph instead and flags modules that are never built: on team-stamper it reported 7
# vulnerable modules of which 5 are not in the build at all, including golang.org/x/crypto
# and its 13 CVEs. #680 moved to `-deps ./...` for exactly this reason; #1964 moved back
# to `-m all` only to dodge nancy's 10 MB stdin cap, which nancy made configurable and
# defaulted to 100 MB in v2.1.0 -- so the workaround costs accuracy for nothing.
.PHONY: nancy
nancy: ## Runs nancy (requires v1.0.37 or newer).
nancy: ## Runs nancy (requires v2.1.0 or newer).
@echo "====> $@"
CGO_ENABLED=0 go list -json -m all | nancy sleuth --skip-update-check --quiet --exclude-vulnerability-file ./.nancy-ignore --additional-exclude-vulnerability-files ./.nancy-ignore.generated
CGO_ENABLED=0 go list -json -deps ./... | nancy sleuth --skip-update-check --quiet --exclude-vulnerability-file ./.nancy-ignore --additional-exclude-vulnerability-files ./.nancy-ignore.generated

# Race detector needs a C toolchain. The architect CI image has none and runs
# with CGO_ENABLED=0, so degrade to cgo-free there; everywhere a compiler exists
Expand Down
Loading