From bdc49e7be6051fd819618bfbd9d63ab83013f8d7 Mon Sep 17 00:00:00 2001 From: Pavel Busko Date: Mon, 19 Feb 2024 14:01:41 +0100 Subject: [PATCH] fix(detectExecuteScan): do not read imageNameTags from CPE directly (#4833) Co-authored-by: Philipp Stehle --- cmd/detectExecuteScan.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cmd/detectExecuteScan.go b/cmd/detectExecuteScan.go index 8cc5f45550..2f70820f03 100644 --- a/cmd/detectExecuteScan.go +++ b/cmd/detectExecuteScan.go @@ -20,7 +20,6 @@ import ( "github.com/SAP/jenkins-library/pkg/log" "github.com/SAP/jenkins-library/pkg/maven" "github.com/SAP/jenkins-library/pkg/orchestrator" - "github.com/SAP/jenkins-library/pkg/piperenv" "github.com/SAP/jenkins-library/pkg/piperutils" "github.com/SAP/jenkins-library/pkg/reporting" "github.com/SAP/jenkins-library/pkg/telemetry" @@ -267,13 +266,6 @@ func mapDetectError(err error, config detectExecuteScanOptions, utils detectUtil } func runDetectImages(ctx context.Context, config detectExecuteScanOptions, utils detectUtils, sys *blackduckSystem, influx *detectExecuteScanInflux, blackduckSystem *blackduckSystem) error { - cpePath := filepath.Join(GeneralConfig.EnvRootPath, "commonPipelineEnvironment") - imagesRaw := piperenv.GetResourceParameter(cpePath, "container", "imageNameTags.json") - if imagesRaw == "" { - log.Entry().Debugf("No images found to be scanned") - return nil - } - var err error log.Entry().Infof("Scanning %d images", len(config.ImageNameTags)) for _, image := range config.ImageNameTags {