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 24 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
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.

3 changes: 3 additions & 0 deletions .github/workflows/go-ci-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
COMMIT=${GITHUB_SHA}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Set Permissions
run: |
sudo chmod -R 777 ${PWD}/assets/queries
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Run docker image and generate results.json
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
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
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:1b27d8f2f9bb49434e38fbb7456cb8b72b6652235bb07e2ee002d06f44821c29 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 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.22.7-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.22.7.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.22.7.linux-amd64.tar.gz \
&& rm -f go1.22.7.linux-amd64.tar.gz

ENV GOPRIVATE=github.com/Checkmarx/*
ARG VERSION="development"
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/Checkmarx/kics/v2

go 1.22.5
go 1.22.7

replace (
github.com/containerd/containerd => github.com/containerd/containerd v1.6.26
Expand Down
Loading