diff --git a/.gitignore b/.gitignore index 3c3ed147..a52b4539 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ *debug* *vender* *.pyc* -.idea \ No newline at end of file +.idea +ca.srl \ No newline at end of file diff --git a/cautils/versioncheck.go b/cautils/versioncheck.go index 22f88c83..55f6417e 100644 --- a/cautils/versioncheck.go +++ b/cautils/versioncheck.go @@ -96,7 +96,7 @@ func (v *VersionCheckHandler) CheckLatestVersion(versionData *VersionCheckReques if latestVersion.ClientUpdate != "" { if BuildNumber != "" && BuildNumber < latestVersion.ClientUpdate { - WarningDisplay(os.Stderr, warningMessage(latestVersion.Client, latestVersion.ClientUpdate), "\n") + WarningDisplay(os.Stderr, warningMessage(latestVersion.Client, latestVersion.ClientUpdate)+"\n") } } @@ -106,7 +106,7 @@ func (v *VersionCheckHandler) CheckLatestVersion(versionData *VersionCheckReques // } if latestVersion.Message != "" { - InfoDisplay(os.Stderr, latestVersion.Message, "\n") + InfoDisplay(os.Stderr, latestVersion.Message+"\n") } return nil diff --git a/resultshandling/printer/v2/controlmapping/prettyprinter.go b/resultshandling/printer/v2/controlmapping/prettyprinter.go index bbb3a7e2..dec73734 100644 --- a/resultshandling/printer/v2/controlmapping/prettyprinter.go +++ b/resultshandling/printer/v2/controlmapping/prettyprinter.go @@ -49,10 +49,7 @@ func (prettyPrinter *PrettyPrinter) printResults(controls *reportsummary.Control controlSummary := controls.GetControl(reportsummary.EControlCriteriaName, prettyPrinter.sortedControlNames[i]) // summaryDetails.Controls ListControls().All() Controls.GetControl(ca) prettyPrinter.printTitle(controlSummary) prettyPrinter.printResources(controlSummary, allResources) - - if controlSummary.GetStatus().IsSkipped() { - prettyPrinter.printSummary(prettyPrinter.sortedControlNames[i], controlSummary) - } + prettyPrinter.printSummary(prettyPrinter.sortedControlNames[i], controlSummary) } } diff --git a/resultshandling/results.go b/resultshandling/results.go index 1c4ff560..b20d9bb2 100644 --- a/resultshandling/results.go +++ b/resultshandling/results.go @@ -33,7 +33,10 @@ func (resultsHandler *ResultsHandler) HandleResults(scanInfo *cautils.ScanInfo) fmt.Println(err) } - return opaSessionObj.Report.SummaryDetails.Score + score := opaSessionObj.Report.SummaryDetails.Score + resultsHandler.printerObj.Score(score) + + return score } // CalculatePostureScore calculate final score