@@ -824,14 +824,32 @@ func (impl *CiServiceImpl) buildWfRequestForCiPipeline(pipeline *pipelineConfig.
824824 ImageScanRetryDelay : impl .config .ImageScanRetryDelay ,
825825 UseDockerApiToGetDigest : impl .config .UseDockerApiToGetDigest ,
826826 }
827- if pipeline .App .AppType == helper .Job {
828- workflowRequest .AppName = pipeline .App .DisplayName
829- }
827+ workflowRequest .SetAwsInspectorConfig ("" )
830828 //in oss, there is no pipeline level workflow cache config, so we pass inherit to get the app level config
831829 workflowCacheConfig := impl .ciCdPipelineOrchestrator .GetWorkflowCacheConfig (pipeline .App .AppType , trigger .PipelineType , common .WorkflowCacheConfigInherit )
832830 workflowRequest .IgnoreDockerCachePush = ! workflowCacheConfig .Value
833831 workflowRequest .IgnoreDockerCachePull = ! workflowCacheConfig .Value
834832 impl .Logger .Debugw ("Ignore Cache values" , "IgnoreDockerCachePush" , workflowRequest .IgnoreDockerCachePush , "IgnoreDockerCachePull" , workflowRequest .IgnoreDockerCachePull )
833+ if pipeline .App .AppType == helper .Job {
834+ workflowRequest .AppName = pipeline .App .DisplayName
835+ }
836+ if pipeline .ScanEnabled {
837+ scanToolMetadata , scanVia , err := impl .fetchImageScanExecutionMedium ()
838+ if err != nil {
839+ impl .Logger .Errorw ("error occurred getting scanned via" , "err" , err )
840+ return nil , err
841+ }
842+ workflowRequest .SetExecuteImageScanningVia (scanVia )
843+ if scanVia .IsScanMediumExternal () {
844+ imageScanExecutionSteps , refPlugins , err := impl .fetchImageScanExecutionStepsForWfRequest (scanToolMetadata )
845+ if err != nil {
846+ impl .Logger .Errorw ("error occurred, fetchImageScanExecutionStepsForWfRequest" , "scanToolMetadata" , scanToolMetadata , "err" , err )
847+ return nil , err
848+ }
849+ workflowRequest .SetImageScanningSteps (imageScanExecutionSteps )
850+ workflowRequest .RefPlugins = append (workflowRequest .RefPlugins , refPlugins ... )
851+ }
852+ }
835853
836854 if dockerRegistry != nil {
837855 workflowRequest .DockerRegistryId = dockerRegistry .Id
0 commit comments