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 version and chainguard version to fix CVEs #861

Merged
merged 5 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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 Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cgr.dev/chainguard/bash@sha256:6f0c9e28cbbe206781cb6b0ace299d1d4edbb2450bfadffb8b2e125596d0f6b0
FROM cgr.dev/chainguard/bash@sha256:2faccc3e8ab049d82dec0e4d2dd8b45718c71ce640608584d95a39092b5006b5

USER nonroot

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/ast-cli

go 1.22.5
go 1.22.7

require (
github.com/Checkmarx/gen-ai-prompts v0.0.0-20240807143411-708ceec12b63
Expand Down
10 changes: 9 additions & 1 deletion internal/wrappers/export-http.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,16 @@ func (e *ExportHTTPWrapper) GetScaPackageCollectionExport(fileURL string) (*ScaP
}
defer resp.Body.Close()

body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}

// Remove BOM if present
body = bytes.TrimPrefix(body, []byte("\xef\xbb\xbf"))

var scaPackageCollection ScaPackageCollectionExport
if err := json.NewDecoder(resp.Body).Decode(&scaPackageCollection); err != nil {
if err := json.Unmarshal(body, &scaPackageCollection); err != nil {
return nil, err
}

Expand Down
Loading