From 4c756b7678147708daf8b776f6ac8d24b6e941a3 Mon Sep 17 00:00:00 2001 From: Eran Turgeman <81029514+eranturgeman@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:41:56 +0300 Subject: [PATCH] Fix Breaks from security-cli changes (#2732) --- general/summary/cli.go | 10 +++++----- go.mod | 4 ++-- go.sum | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/general/summary/cli.go b/general/summary/cli.go index 495b5a34a..2bda48d35 100644 --- a/general/summary/cli.go +++ b/general/summary/cli.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils/commandsummary" + "github.com/jfrog/jfrog-cli-security/utils/results/output" "github.com/jfrog/jfrog-cli/utils/cliutils" "os" "path/filepath" @@ -13,7 +14,6 @@ import ( commonCliUtils "github.com/jfrog/jfrog-cli-core/v2/common/cliutils" coreConfig "github.com/jfrog/jfrog-cli-core/v2/utils/config" "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" - securityUtils "github.com/jfrog/jfrog-cli-security/utils" "github.com/jfrog/jfrog-client-go/utils/log" "github.com/urfave/cli" ) @@ -89,7 +89,7 @@ func aggregatedCodeScanningSarifs() error { log.Debug("No sarif reports were found") return nil } - finalSarif, err := securityUtils.CombineSarifOutputFiles(files) + finalSarif, err := output.CombineSarifOutputFiles(files) if err != nil { return err } @@ -191,7 +191,7 @@ func invokeSectionMarkdownGeneration(section MarkdownSection) error { } func generateSecurityMarkdown() error { - securitySummary, err := securityUtils.NewSecurityJobSummary() + securitySummary, err := output.NewSecurityJobSummary() if err != nil { return fmt.Errorf("error generating security markdown: %w", err) } @@ -228,7 +228,7 @@ func mapScanResults() (err error) { if err != nil { return err } - securityJobSummary := &securityUtils.SecurityJobSummary{} + securityJobSummary := &output.SecurityJobSummary{} // Init scan result map scanResultsMap := make(map[string]commandsummary.ScanResult) // Set default not scanned component view @@ -248,7 +248,7 @@ func mapScanResults() (err error) { // Each scan result should be processed according to its index. // To generate custom view for each scan type. -func processScan(index commandsummary.Index, filePath string, scannedName string, sec *securityUtils.SecurityJobSummary, scanResultsMap map[string]commandsummary.ScanResult) (map[string]commandsummary.ScanResult, error) { +func processScan(index commandsummary.Index, filePath string, scannedName string, sec *output.SecurityJobSummary, scanResultsMap map[string]commandsummary.ScanResult) (map[string]commandsummary.ScanResult, error) { var res commandsummary.ScanResult var err error switch index { diff --git a/go.mod b/go.mod index 8cc8e43e4..36f0176ec 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/jfrog/jfrog-cli-artifactory v0.1.6 github.com/jfrog/jfrog-cli-core/v2 v2.56.3 github.com/jfrog/jfrog-cli-platform-services v1.3.0 - github.com/jfrog/jfrog-cli-security v1.11.4 + github.com/jfrog/jfrog-cli-security v1.12.0 github.com/jfrog/jfrog-client-go v1.47.2 github.com/jszwec/csvutil v1.10.0 github.com/manifoldco/promptui v0.9.0 @@ -175,4 +175,4 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20240918150101-ad5b10435a12 -// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog dev \ No newline at end of file +// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog dev diff --git a/go.sum b/go.sum index 82426b2ca..f9cf27e7d 100644 --- a/go.sum +++ b/go.sum @@ -177,8 +177,8 @@ github.com/jfrog/jfrog-cli-core/v2 v2.56.3 h1:9ZZ7TGpobk4XShPzrHkRGfpYzs1w0rg7Hq github.com/jfrog/jfrog-cli-core/v2 v2.56.3/go.mod h1:xL9b2DrH5FemiTuk2bfUBfbQYC/RvpBkPxxV6XxssXs= github.com/jfrog/jfrog-cli-platform-services v1.3.0 h1:IblSDZFBjL7WLRi37Ni2DmHrXJJ6ysSMxx7t41AvyDA= github.com/jfrog/jfrog-cli-platform-services v1.3.0/go.mod h1:Ky4SDXuMeaiNP/5zMT1YSzIuXG+cNYYOl8BaEA7Awbc= -github.com/jfrog/jfrog-cli-security v1.11.4 h1:aMNTcz/w75IfHfsNuJqoHu38+35L9JH8DnTEqOhW8Ao= -github.com/jfrog/jfrog-cli-security v1.11.4/go.mod h1:XRev43n6+C48UJGbRGCI5eqtQ4tF5T6hxnIa4+ULiMI= +github.com/jfrog/jfrog-cli-security v1.12.0 h1:TGQ0J4dSYA3Wi18oMnj2iGJzcLexCIvL+RnD7coFwGo= +github.com/jfrog/jfrog-cli-security v1.12.0/go.mod h1:XRev43n6+C48UJGbRGCI5eqtQ4tF5T6hxnIa4+ULiMI= github.com/jfrog/jfrog-client-go v1.47.2 h1:Lu+2n4EU+MzNfotV1VOvF/ZQIWsQJg11Z4YSVhumFy0= github.com/jfrog/jfrog-client-go v1.47.2/go.mod h1:fx2fq5XwZ7e2pzpBB9pXsP8+ZdKLB8g+A6fjGU6F2XI= github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI=