diff --git a/main.go b/main.go index 325cdfa..8031469 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,7 @@ import ( ) func main() { - fmt.Printf("Scan Health v%s\nCopyright © Veracode, Inc. 2023. All Rights Reserved.\nThis is an unofficial Veracode product. It does not come with any support or warranty.\n\n", appVersion) + fmt.Printf("Scan Health v%s\nCopyright © Veracode, Inc. 2024. All Rights Reserved.\nThis is an unofficial Veracode product. It does not come with any support or warranty.\n\n", AppVersion) vid := flag.String("vid", "", "Veracode API ID - See https://docs.veracode.com/r/c_api_credentials3") vkey := flag.String("vkey", "", "Veracode API key - See https://docs.veracode.com/r/c_api_credentials3") profile := flag.String("profile", "default", "Veracode credential profile (default is \"default\") - See https://docs.veracode.com/r/c_httpie_tool#using-multiple-profiles") @@ -52,7 +52,7 @@ func main() { notifyOfUpdates() apiId, apiKey := getCredentials(*vid, *vkey, *profile) - api := data.API{Id: apiId, Key: apiKey, Region: regionToUse, AppVersion: appVersion, EnableCaching: *enableCaching} + api := data.API{Id: apiId, Key: apiKey, Region: regionToUse, AppVersion: AppVersion, EnableCaching: *enableCaching} api.AssertCredentialsWork() diff --git a/sast_compare.go b/sast_compare.go index 146f1a6..ee1397e 100644 --- a/sast_compare.go +++ b/sast_compare.go @@ -49,8 +49,8 @@ func performSASTCompare(scanA, scanB *string, api data.API, regionToUse string, wg.Add(2) - scanAReport := report.NewReport(scanABuildId, regionToUse, appVersion, false) - scanBReport := report.NewReport(scanBBuildId, regionToUse, appVersion, false) + scanAReport := report.NewReport(scanABuildId, regionToUse, AppVersion, false) + scanBReport := report.NewReport(scanBBuildId, regionToUse, AppVersion, false) go func() { defer wg.Done() diff --git a/sast_health.go b/sast_health.go index e475a1a..aedae44 100644 --- a/sast_health.go +++ b/sast_health.go @@ -20,7 +20,7 @@ func performSASTHealthCheck(scan *string, api data.API, regionToUse string, incl buildId, regionToUse)) - healthReport := report.NewReport(buildId, regionToUse, appVersion, false) + healthReport := report.NewReport(buildId, regionToUse, AppVersion, false) api.PopulateReportWithDataFromAPI(healthReport, *includePreviousScan) if !healthReport.Scan.IsLatestScan { @@ -37,7 +37,7 @@ func performSASTHealthCheck(scan *string, api data.API, regionToUse string, incl previousBuildId := api.GetPreviousBuildId(healthReport) if previousBuildId > 0 { - previousHealthReport = report.NewReport(previousBuildId, regionToUse, appVersion, true) + previousHealthReport = report.NewReport(previousBuildId, regionToUse, AppVersion, true) api.PopulateReportWithDataFromAPI(previousHealthReport, false) } } diff --git a/version_check.go b/version_check.go index 9029c7d..c3da90a 100644 --- a/version_check.go +++ b/version_check.go @@ -10,7 +10,7 @@ import ( "github.com/fatih/color" ) -var appVersion = "0.0" +var AppVersion = "0.0" func notifyOfUpdates() { client := &http.Client{} @@ -52,7 +52,7 @@ func notifyOfUpdates() { return } - appVersion, err := utils.StringToFloat(appVersion) + appVersion, err := utils.StringToFloat(AppVersion) if err != nil { return