@@ -77,7 +77,7 @@ func (c *CveReport) Report(newBuildPlan *buildplan.BuildPlan, oldBuildPlan *buil
7777 }
7878 }
7979
80- names := addedRequirements (oldBuildPlan , newBuildPlan )
80+ names := changedRequirements (oldBuildPlan , newBuildPlan )
8181 pg := output .StartSpinner (c .prime .Output (), locale .Tr ("progress_cve_search" , strings .Join (names , ", " )), constants .TerminalAnimationInterval )
8282
8383 ingredientVulnerabilities , err := model .FetchVulnerabilitiesForIngredients (c .prime .Auth (), ingredients )
@@ -235,21 +235,24 @@ func (c *CveReport) promptForSecurity() (bool, error) {
235235 return confirm , nil
236236}
237237
238- func addedRequirements (oldBuildPlan * buildplan.BuildPlan , newBuildPlan * buildplan.BuildPlan ) []string {
238+ func changedRequirements (oldBuildPlan * buildplan.BuildPlan , newBuildPlan * buildplan.BuildPlan ) []string {
239239 var names []string
240240 var oldRequirements buildplan.Requirements
241241 if oldBuildPlan != nil {
242242 oldRequirements = oldBuildPlan .Requirements ()
243243 }
244244 newRequirements := newBuildPlan .Requirements ()
245245
246- oldReqs := make (map [string ]bool )
246+ oldReqs := make (map [string ]string )
247247 for _ , req := range oldRequirements {
248- oldReqs [qualifiedName (req )] = true
248+ oldReqs [qualifiedName (req )] = req . Ingredient . Version
249249 }
250250
251251 for _ , req := range newRequirements {
252- if oldReqs [qualifiedName (req )] || req .Namespace == buildplan .NamespaceInternal {
252+ if req .Namespace == buildplan .NamespaceInternal {
253+ continue
254+ }
255+ if version , exists := oldReqs [qualifiedName (req )]; exists && version == req .Ingredient .Version {
253256 continue
254257 }
255258 names = append (names , req .Name )
0 commit comments