Projects STRLCPY grype Commits 45c5f8c9
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    grype/db/v3/namespace_test.go
    skipped 185 lines
    186 186   version: "2022yzblah", // Wolfi is a rolling release
    187 187   expected: "wolfi:rolling",
    188 188   },
     189 + {
     190 + dist: distro.Chainguard,
     191 + expected: "chainguard:rolling",
     192 + },
    189 193   }
    190 194   
    191 195   observedDistros := strset.New()
    skipped 328 lines
  • ■ ■ ■ ■ ■ ■
    grype/db/v4/namespace/index_test.go
    skipped 132 lines
    133 133   "ubuntu:distro:ubuntu:18.04",
    134 134   "oracle:distro:oraclelinux:8",
    135 135   "wolfi:distro:wolfi:rolling",
     136 + "chainguard:distro:chainguard:rolling",
    136 137   "archlinux:distro:archlinux:rolling",
    137 138   })
    138 139   
    skipped 126 lines
    265 266   distro: newDistro(t, osDistro.Wolfi, "20221011", []string{}),
    266 267   namespaces: []*distro.Namespace{
    267 268   distro.NewNamespace("wolfi", osDistro.Wolfi, "rolling"),
     269 + },
     270 + },
     271 + {
     272 + distro: newDistro(t, osDistro.Chainguard, "20230214", []string{}),
     273 + namespaces: []*distro.Namespace{
     274 + distro.NewNamespace("chainguard", osDistro.Chainguard, "rolling"),
    268 275   },
    269 276   },
    270 277   }
    skipped 7 lines
  • ■ ■ ■ ■ ■ ■
    grype/db/v5/namespace/index_test.go
    skipped 133 lines
    134 134   "ubuntu:distro:ubuntu:18.04",
    135 135   "oracle:distro:oraclelinux:8",
    136 136   "wolfi:distro:wolfi:rolling",
     137 + "chainguard:distro:chainguard:rolling",
    137 138   "archlinux:distro:archlinux:rolling",
    138 139   })
    139 140   
    skipped 168 lines
    308 309   distro: newDistro(t, osDistro.Wolfi, "20221011", []string{}),
    309 310   namespaces: []*distro.Namespace{
    310 311   distro.NewNamespace("wolfi", osDistro.Wolfi, "rolling"),
     312 + },
     313 + },
     314 + {
     315 + 
     316 + name: "Chainguard matches chainguard rolling namespace",
     317 + distro: newDistro(t, osDistro.Chainguard, "20230214", []string{}),
     318 + namespaces: []*distro.Namespace{
     319 + distro.NewNamespace("chainguard", osDistro.Chainguard, "rolling"),
    311 320   },
    312 321   },
    313 322   {
    skipped 30 lines
  • ■ ■ ■ ■
    grype/distro/distro.go
    skipped 86 lines
    87 87  }
    88 88   
    89 89  func (d Distro) IsRolling() bool {
    90  - return d.Type == Wolfi || d.Type == ArchLinux || d.Type == Gentoo
     90 + return d.Type == Wolfi || d.Type == Chainguard || d.Type == ArchLinux || d.Type == Gentoo
    91 91  }
    92 92   
    93 93  // Unsupported Linux distributions
    skipped 9 lines
  • ■ ■ ■ ■
    grype/distro/distro_test.go
    skipped 207 lines
    208 208   fixture: "test-fixtures/os/wolfi",
    209 209   Type: Wolfi,
    210 210   },
     211 + {
     212 + fixture: "test-fixtures/os/chainguard",
     213 + Type: Chainguard,
     214 + },
    211 215   }
    212 216   
    213 217   observedDistros := internal.NewStringSet()
    skipped 29 lines
    243 247   if test.Version != "" {
    244 248   assert.Equal(t, d.Version.String(), test.Version)
    245 249   }
    246  - 
    247 250   })
    248 251   }
    249 252   
    skipped 87 lines
  • ■ ■ ■ ■ ■ ■
    grype/distro/test-fixtures/os/chainguard/etc/os-release
     1 +ID=chainguard
     2 +NAME="Chainguard"
     3 +PRETTY_NAME="Chainguard"
     4 +VERSION_ID="20230214"
     5 +HOME_URL="https://chainguard.dev/"
     6 + 
  • ■ ■ ■ ■ ■ ■
    grype/distro/type.go
    skipped 28 lines
    29 29   AlmaLinux Type = "almalinux"
    30 30   Gentoo Type = "gentoo"
    31 31   Wolfi Type = "wolfi"
     32 + Chainguard Type = "chainguard"
    32 33  )
    33 34   
    34 35  // All contains all Linux distribution options
    skipped 17 lines
    52 53   AlmaLinux,
    53 54   Gentoo,
    54 55   Wolfi,
     56 + Chainguard,
    55 57  }
    56 58   
    57 59  // IDMapping connects a distro ID like "ubuntu" to a Distro type
    skipped 17 lines
    75 77   "almalinux": AlmaLinux,
    76 78   "gentoo": Gentoo,
    77 79   "wolfi": Wolfi,
     80 + "chainguard": Chainguard,
    78 81  }
    79 82   
    80 83  func TypeFromRelease(release linux.Release) Type {
    skipped 27 lines
Please wait...
Page is in error, reload to recover