@@ -805,7 +805,7 @@ func scanCreateSubCommand(
805805 createScanCmd .PersistentFlags ().Bool (commonParams .ContainersExcludeNonFinalStagesFlag , false , "Scan only the final deployable image" )
806806 createScanCmd .PersistentFlags ().String (commonParams .ContainersImageTagFilterFlag , "" , "Exclude images by image name and/or tag, ex: \" *dev\" " )
807807
808- //reading sbom-only flag
808+ // reading sbom-only flag
809809 createScanCmd .PersistentFlags ().Bool (commonParams .SbomFlag , false , "Execute SBOM scan exclusively on the provided XML/JSON file." )
810810
811811 return createScanCmd
@@ -1342,7 +1342,7 @@ func validateScanTypes(cmd *cobra.Command, jwtWrapper wrappers.JWTWrapper, featu
13421342
13431343 scanTypes = strings .Split (userScanTypes , "," )
13441344
1345- //sbom check
1345+ // sbom check
13461346 if isSbomScan {
13471347 if len (scanTypes ) > 1 {
13481348 err = errors .Errorf ("while using sbom-only flag only the sca scan type is allowed." )
@@ -1353,7 +1353,6 @@ func validateScanTypes(cmd *cobra.Command, jwtWrapper wrappers.JWTWrapper, featu
13531353 err = errors .Errorf ("while using sbom-only flag only the sca scan type is allowed." )
13541354 return err
13551355 }
1356-
13571356 }
13581357
13591358 for _ , scanType := range scanTypes {
@@ -1373,10 +1372,9 @@ func validateScanTypes(cmd *cobra.Command, jwtWrapper wrappers.JWTWrapper, featu
13731372 } else {
13741373 if isSbomScan {
13751374 if allowedEngines ["sca" ] {
1376- //set
1375+ // for sbom-flag, setting scan-type as only "sca"
13771376 fmt .Println ("setting sca as scan-type" )
13781377 scanTypes = append (scanTypes , "sca" )
1379-
13801378 } else {
13811379 return errors .Errorf ("sbom needs sca engine to be allowed" )
13821380 }
@@ -1387,7 +1385,6 @@ func validateScanTypes(cmd *cobra.Command, jwtWrapper wrappers.JWTWrapper, featu
13871385 }
13881386
13891387 }
1390-
13911388 actualScanTypes = strings .Join (scanTypes , "," )
13921389 actualScanTypes = strings .Replace (strings .ToLower (actualScanTypes ), commonParams .IacType , commonParams .KicsType , 1 )
13931390
0 commit comments