Projects STRLCPY grype Commits dfa540f7
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    grype/pkg/purl_provider.go
    skipped 53 lines
    54 54   }
    55 55   
    56 56   cpes := []wfn.Attributes{}
     57 + epoch := "0"
    57 58   for _, qualifier := range purl.Qualifiers {
    58 59   if qualifier.Key == cpesQualifierKey {
    59 60   rawCpes := strings.Split(qualifier.Value, ",")
    skipped 5 lines
    65 66   cpes = append(cpes, c)
    66 67   }
    67 68   }
     69 + 
     70 + if qualifier.Key == "epoch" {
     71 + epoch = qualifier.Value
     72 + }
     73 + }
     74 + 
     75 + if purl.Type == packageurl.TypeRPM && !strings.HasPrefix(purl.Version, fmt.Sprintf("%s:", epoch)) {
     76 + purl.Version = fmt.Sprintf("%s:%s", epoch, purl.Version)
    68 77   }
    69 78   
    70 79   packages = append(packages, Package{
    skipped 48 lines
Please wait...
Page is in error, reload to recover