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

update(go): update go version to 1.23.1 #7251

Merged
merged 37 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
cd0d3cb
update go version to 1.22.7
ArturRibeiro-CX Sep 9, 2024
d23c95e
update go version on dockerfiles
ArturRibeiro-CX Sep 9, 2024
6fa16bd
pin gosec to latest version instead of master
ArturRibeiro-CX Sep 10, 2024
bcb60fc
update chainguard images
ArturRibeiro-CX Sep 10, 2024
889a14f
change sha codes and go version
ArturRibeiro-CX Sep 10, 2024
e2941e6
test new sha code
ArturRibeiro-CX Sep 10, 2024
4b2b491
update package-lock versions
ArturRibeiro-CX Sep 10, 2024
15eda62
add permission for assets/queries path
ArturRibeiro-CX Sep 10, 2024
0caef56
update version for upload-sarif and integration test naming
ArturRibeiro-CX Sep 10, 2024
4437bc8
update actions
ArturRibeiro-CX Sep 10, 2024
1b0c9cb
change kics docker runner sarif to show results
ArturRibeiro-CX Sep 10, 2024
ef67258
sarif runner changes on go-ci
ArturRibeiro-CX Sep 10, 2024
fdaec97
change go-ci workflow permission and pin sha code for securego/gosec
ArturRibeiro-CX Sep 10, 2024
16497c2
pin to another version for securego/gosec
ArturRibeiro-CX Sep 10, 2024
7bc9b2c
pin gosec to version v2.20
ArturRibeiro-CX Sep 10, 2024
be5e907
install git and pin version of upload-sarif
ArturRibeiro-CX Sep 10, 2024
428b582
add new image to dockerfile and pin sha version
ArturRibeiro-CX Sep 11, 2024
a3e5b66
update send package on package-lock via npm
ArturRibeiro-CX Sep 11, 2024
f8f70e3
change image for latest-glibc
ArturRibeiro-CX Sep 11, 2024
a9ec7e4
remove unnecessary arguments and evironment variables
ArturRibeiro-CX Sep 11, 2024
c63a6c6
change image to git latest
ArturRibeiro-CX Sep 11, 2024
cdc8354
update image latest-root-dev
ArturRibeiro-CX Sep 11, 2024
f1715c8
test new image with sed
ArturRibeiro-CX Sep 11, 2024
e134871
update dockerfile run time image to latest root dev
ArturRibeiro-CX Sep 11, 2024
7d789ea
update go to version 1.23.1
ArturRibeiro-CX Sep 11, 2024
5af59c6
update go version on report and dockerfile sha code
ArturRibeiro-CX Sep 11, 2024
8c0e597
test pin sha for golangci lint and action
ArturRibeiro-CX Sep 11, 2024
48b5cb4
test ubuntu-20.04 instead of ubuntu-latest for first job of go-ci
ArturRibeiro-CX Sep 11, 2024
ae356e8
revert golangci-lint-action version
ArturRibeiro-CX Sep 12, 2024
88fa950
pin sha golangci lint action on go-ci workflow and upload-sarif on ki…
ArturRibeiro-CX Sep 12, 2024
50117f4
Merge branch 'update_go_version' of https://github.com/Checkmarx/kics…
ArturRibeiro-CX Sep 12, 2024
77b537a
update go version to 1.23 and lint version on go-ci
ArturRibeiro-CX Sep 12, 2024
108c6b3
fix lint problems and add new go version to docs
ArturRibeiro-CX Sep 12, 2024
e22dd59
fix linting problems and ignore gosec vuln with uint conversion
ArturRibeiro-CX Sep 12, 2024
168825a
tackle lint issues and ignore gosec lint warning
ArturRibeiro-CX Sep 12, 2024
78644c6
replace magic number with constant for writefile perms
ArturRibeiro-CX Sep 12, 2024
23de6da
dummypr for gh pipeline
ArturRibeiro-CX Sep 12, 2024
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/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
Loading