Skip to content

Commit

Permalink
fix for policies managements (Checkmarx#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorlombacx authored Aug 9, 2023
1 parent 120e6c6 commit ee1b6df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/commands/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const (
scaLastScanTimeFlagDescription = "SCA last scan time. Available options: integer above 1"
projectPrivatePackageFlagDescription = "Enable or disable project private package. Available options: true,false"
scaPrivatePackageVersionFlagDescription = "SCA project private package version. Example: 0.1.1"
policeManagementNoneStatus = "none"
)

var filterResultsListFlagUsage = fmt.Sprintf(
Expand Down Expand Up @@ -492,7 +493,7 @@ func writeConsoleSummary(summary *wrappers.ResultSummary) error {
" API Security - Total Detected APIs: %d \n",
summary.APISecurity.APICount)
}
if summary.Policies != nil {
if summary.Policies != nil && !strings.EqualFold(summary.Policies.Status, policeManagementNoneStatus) {
fmt.Printf(" ----------------------------------- \n\n")
if summary.Policies.BreakBuild {
fmt.Printf(" Policy Management Violation - Break Build Enabled: \n")
Expand Down Expand Up @@ -540,7 +541,7 @@ func writeConsoleSummary(summary *wrappers.ResultSummary) error {
} else {
fmt.Printf(" | SCA: %*d| \n", defaultPaddingSize, summary.ScaIssues)
}
fmt.Printf("\n")
fmt.Printf(" ----------------------------------- \n\n")
fmt.Printf(" Checkmarx One - Scan Summary & Details: %s\n", summary.BaseURI)
} else {
fmt.Printf("Scan executed in asynchronous mode or still running. Hence, no results generated.\n")
Expand Down

0 comments on commit ee1b6df

Please sign in to comment.