diff --git a/src/main/kotlin/net/leanix/vsm/sbomBooster/VsmSbomBoosterApplication.kt b/src/main/kotlin/net/leanix/vsm/sbomBooster/VsmSbomBoosterApplication.kt index af9af9e..bde5db7 100644 --- a/src/main/kotlin/net/leanix/vsm/sbomBooster/VsmSbomBoosterApplication.kt +++ b/src/main/kotlin/net/leanix/vsm/sbomBooster/VsmSbomBoosterApplication.kt @@ -31,7 +31,7 @@ class VsmSbomBoosterApplication( summaryReportService.appendRecord("Started VSM SBOM Booster at: ${LocalDateTime.now()}\n") summaryReportService.appendRecord( - "VSM SBOM Booster ran with the following parameters " + + "VSM SBOM Booster started with the following parameters " + "(secrets are omitted): \n" ) summaryReportService.appendRecord("MOUNTED_VOLUME: ${propertiesConfiguration.mountedVolume}\n") @@ -60,8 +60,6 @@ class VsmSbomBoosterApplication( propertiesConfiguration.region ) } - - summaryReportService.appendRecord("\nFinished VSM SBOM Booster at ${LocalDateTime.now()} \n") } } diff --git a/src/main/kotlin/net/leanix/vsm/sbomBooster/service/ExitScheduler.kt b/src/main/kotlin/net/leanix/vsm/sbomBooster/service/ExitScheduler.kt index 34af534..c95f48c 100644 --- a/src/main/kotlin/net/leanix/vsm/sbomBooster/service/ExitScheduler.kt +++ b/src/main/kotlin/net/leanix/vsm/sbomBooster/service/ExitScheduler.kt @@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Qualifier import org.springframework.scheduling.annotation.Scheduled import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor import org.springframework.stereotype.Component +import java.time.LocalDateTime import java.util.* import kotlin.system.exitProcess @@ -54,6 +55,8 @@ class ExitScheduler( getPercentage(VsmSbomBoosterApplication.counter.get().toDouble(), tasksSubmitted.toDouble()) )} %." ) + + summaryReportService.appendRecord("\nFinished VSM SBOM Booster at ${LocalDateTime.now()} \n") exitProcess(1) } } diff --git a/src/main/kotlin/net/leanix/vsm/sbomBooster/service/VsmDiscoveryService.kt b/src/main/kotlin/net/leanix/vsm/sbomBooster/service/VsmDiscoveryService.kt index 10bd97a..b69f62d 100644 --- a/src/main/kotlin/net/leanix/vsm/sbomBooster/service/VsmDiscoveryService.kt +++ b/src/main/kotlin/net/leanix/vsm/sbomBooster/service/VsmDiscoveryService.kt @@ -25,6 +25,7 @@ class VsmDiscoveryService( companion object { private val logger: Logger = LoggerFactory.getLogger(VsmDiscoveryService::class.java) + const val SOURCE_CUSTOM_HEADER = "X-Lx-Vsm-Discovery-Source" } fun sendToVsm(projectUrl: String, downloadedFolder: String, leanIxToken: String, region: String) { @@ -32,6 +33,7 @@ class VsmDiscoveryService( val headers = HttpHeaders() headers.contentType = MediaType.MULTIPART_FORM_DATA headers.set("Authorization", "Bearer $leanIxToken") + headers.set(SOURCE_CUSTOM_HEADER, "VSMSbomBooster") val multipartBodyBuilder = MultipartBodyBuilder()