Skip to content

Commit

Permalink
Merge pull request #7251 from Checkmarx/update_go_version
Browse files Browse the repository at this point in the history
update(go): update go version to 1.23.1
  • Loading branch information
cxMiguelSilva authored Sep 13, 2024
2 parents b4e6202 + 23de6da commit a0960c1
Show file tree
Hide file tree
Showing 25 changed files with 138 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/report/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Checkmarx/e2e-report

go 1.21
go 1.23.1

require (
github.com/rs/zerolog v1.31.0
Expand Down
108 changes: 76 additions & 32 deletions .github/scripts/server-mock/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
lint:
name: lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Go
Expand All @@ -16,9 +16,9 @@ jobs:
go-version-file: go.mod
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
version: v1.57.2
version: v1.61.0
args: -c .golangci.yml --timeout 20m
go-generate:
name: go-generate
Expand All @@ -39,7 +39,7 @@ jobs:
name: unit-tests
strategy:
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -99,10 +99,13 @@ jobs:
- name: Checkout Source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run Gosec Security Scanner
uses: securego/gosec@master
uses: securego/gosec@6fbd381238e97e1d1f3358f0d6d65de78dcf9245 # v2.20.0
with:
args: "-no-fail -fmt sarif -out results.sarif ./..."
- name: Show results
run: |
cat results.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@2bbafcdd7fbf96243689e764c2f15d9735164f33
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/go-e2e-debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.22.x]
go-version: [1.23.x]
os: [ubuntu-latest]
kics-docker: ["Dockerfile", "docker/Dockerfile.ubi8"]
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-apispec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 #v5.1.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
with:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cgr.dev/chainguard/go@sha256:4f11a0dfbd73832405bc3f611e53b4dbd61a1d1d23d205f2665cabfbd295a109 as build_env
FROM cgr.dev/chainguard/go@sha256:1e17e06119fc26b78a9a2208aeab6209f9ef90b6a19f3fc69d4cc581e70d09bf as build_env

# Copy the source from the current directory to the Working Directory inside the container
WORKDIR /app
Expand Down Expand Up @@ -31,7 +31,7 @@ USER nonroot
# Runtime image
# Ignore no User Cmd since KICS container is stopped afer scan
# kics-scan ignore-line
FROM cgr.dev/chainguard/git@sha256:51620806588a4738b536e1f328206b17ae2a988b2a424a6a37c419041eb2b9a9
FROM cgr.dev/chainguard/git@sha256:02660563e96b553d6aeb4093e3fcc3e91b2ad3a86e05c65b233f37f035e5044e

ENV TERM xterm-256color

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ KICS is used by various companies and organizations, some are listed below. If y
- [Keptn](https://github.com/keptn) / [Keptn Lifecycle Toolkit](https://keptn.sh)

**Keeping Infrastructure as Code Secure!**

---

© 2024 Checkmarx Ltd. All Rights Reserved.
2 changes: 1 addition & 1 deletion docker/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# it does not define an ENTRYPOINT as this is a requirement described here:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops#linux-based-containers
#
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22.5-bookworm as build_env
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23.1-bookworm as build_env
# Create a group and user
RUN groupadd checkmarx && useradd -g checkmarx -M -s /bin/bash checkmarx
USER checkmarx
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ WORKDIR /build

ENV PATH=$PATH:/usr/local/go/bin

ADD https://golang.org/dl/go1.22.4.linux-amd64.tar.gz .
ADD https://golang.org/dl/go1.23.1.linux-amd64.tar.gz .
RUN yum install git gcc -y \
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz \
&& rm -f go1.22.4.linux-amd64.tar.gz
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.1.linux-amd64.tar.gz \
&& rm -f go1.23.1.linux-amd64.tar.gz

ENV GOPRIVATE=github.com/Checkmarx/*
ARG VERSION="development"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go 1.22.x
- name: Set up Go 1.23.x
uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x
- name: Run test metrics script
id: testcov
run: |
Expand Down
2 changes: 1 addition & 1 deletion examples/github/kics-docker-runner-sarif.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ jobs:
cat results-dir/results.sarif
cat results-dir/results.json
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@2bbafcdd7fbf96243689e764c2f15d9735164f33
with:
sarif_file: results-dir/results.sarif
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/Checkmarx/kics/v2

go 1.22.5
go 1.23.1

replace (
github.com/containerd/containerd => github.com/containerd/containerd v1.6.26
Expand Down
2 changes: 1 addition & 1 deletion internal/console/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func executeAnalyze(analyzeParams *analyzer.Parameters) error {
log.Debug().Msg("console.scan()")

for _, warn := range warnings {
log.Warn().Msgf(warn)
log.Warn().Msgf("%s", warn)
}

console := newConsole()
Expand Down
Loading

0 comments on commit a0960c1

Please sign in to comment.