Projects STRLCPY syft Commits bc1edb9c
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    syft/pkg/cataloger/binary/cataloger_test.go
    skipped 22 lines
    23 23   expected: pkg.Package{
    24 24   Name: "python",
    25 25   Version: "3.7.4a-vZ9",
     26 + PURL: "pkg:generic/[email protected]",
    26 27   Locations: singleLocation("libpython3.7.so"),
    27 28   Metadata: pkg.BinaryMetadata{
    28 29   Classifier: "python-binary-lib",
    skipped 6 lines
    35 36   expected: pkg.Package{
    36 37   Name: "python",
    37 38   Version: "3.6.3a-vZ9",
     39 + PURL: "pkg:generic/[email protected]",
    38 40   Locations: singleLocation("python3.6"),
    39 41   Metadata: pkg.BinaryMetadata{
    40 42   Classifier: "python-binary",
    skipped 6 lines
    47 49   expected: pkg.Package{
    48 50   Name: "python",
    49 51   Version: "3.9-aZ5",
     52 + PURL: "pkg:generic/[email protected]",
    50 53   Locations: singleLocation("patchlevel.h"),
    51 54   Metadata: pkg.BinaryMetadata{
    52 55   Classifier: "cpython-source",
    skipped 6 lines
    59 62   expected: pkg.Package{
    60 63   Name: "go",
    61 64   Version: "1.14",
     65 + PURL: "pkg:generic/[email protected]",
    62 66   Locations: singleLocation("go"),
    63 67   Metadata: pkg.BinaryMetadata{
    64 68   Classifier: "go-binary",
    skipped 6 lines
    71 75   expected: pkg.Package{
    72 76   Name: "node",
    73 77   Version: "19.2.1",
     78 + PURL: "pkg:generic/[email protected]",
    74 79   Locations: singleLocation("node"),
    75 80   Metadata: pkg.BinaryMetadata{
    76 81   Classifier: "nodejs-binary",
    skipped 6 lines
    83 88   expected: pkg.Package{
    84 89   Name: "go",
    85 90   Version: "1.15",
     91 + PURL: "pkg:generic/[email protected]",
    86 92   Locations: singleLocation("VERSION"),
    87 93   Metadata: pkg.BinaryMetadata{
    88 94   Classifier: "go-binary-hint",
    skipped 20 lines
    109 115   Name: "java",
    110 116   Version: "1.8.0_352-b08",
    111 117   Type: "binary",
     118 + PURL: "pkg:generic/[email protected]_352-b08",
    112 119   Locations: singleLocation("java"),
    113 120   Metadata: pkg.BinaryMetadata{
    114 121   Classifier: "java-binary-openjdk",
    skipped 8 lines
    123 130   Name: "java",
    124 131   Version: "11.0.17+8-LTS",
    125 132   Type: "binary",
     133 + PURL: "pkg:generic/[email protected]+8-LTS",
    126 134   Locations: singleLocation("java"),
    127 135   Metadata: pkg.BinaryMetadata{
    128 136   Classifier: "java-binary-openjdk",
    skipped 8 lines
    137 145   Name: "java",
    138 146   Version: "19.0.1+10-21",
    139 147   Type: "binary",
     148 + PURL: "pkg:generic/[email protected]+10-21",
    140 149   Locations: singleLocation("java"),
    141 150   Metadata: pkg.BinaryMetadata{
    142 151   Classifier: "java-binary-oracle",
    skipped 8 lines
    151 160   Name: "java",
    152 161   Version: "19.0.1+10-21",
    153 162   Type: "binary",
     163 + PURL: "pkg:generic/[email protected]+10-21",
    154 164   Locations: singleLocation("java"),
    155 165   Metadata: pkg.BinaryMetadata{
    156 166   Classifier: "java-binary-oracle",
    skipped 8 lines
    165 175   Name: "java",
    166 176   Version: "1.8.0-foreman_2022_09_22_15_30-b00",
    167 177   Type: "binary",
     178 + PURL: "pkg:generic/[email protected]_2022_09_22_15_30-b00",
    168 179   Locations: singleLocation("java"),
    169 180   Metadata: pkg.BinaryMetadata{
    170 181   Classifier: "java-binary-ibm",
    skipped 106 lines
    277 288   meta2 := p.Metadata.(pkg.BinaryMetadata)
    278 289   if expected.Name != p.Name ||
    279 290   expected.Version != p.Version ||
     291 + expected.PURL != p.PURL ||
    280 292   meta1.Classifier != meta2.Classifier {
    281 293   assert.Failf(t, "packages not equal", "%v != %v", expected, p)
    282 294   }
    skipped 2 lines
  • ■ ■ ■ ■ ■ ■
    syft/pkg/cataloger/binary/default_classifiers.go
    skipped 9 lines
    10 10   `(.*/|^)python(?P<version>[0-9]+\.[0-9]+)$`,
    11 11   `(?m)(?P<version>{{ .version }}\.[0-9]+[-_a-zA-Z0-9]*)`),
    12 12   Package: "python",
     13 + PURL: mustPURL("pkg:generic/python@version"),
    13 14   },
    14 15   {
    15 16   Class: "python-binary-lib",
    skipped 2 lines
    18 19   `(.*/|^)libpython(?P<version>[0-9]+\.[0-9]+).so.*$`,
    19 20   `(?m)(?P<version>{{ .version }}\.[0-9]+[-_a-zA-Z0-9]*)`),
    20 21   Package: "python",
     22 + PURL: mustPURL("pkg:generic/python@version"),
    21 23   },
    22 24   {
    23 25   Class: "cpython-source",
    skipped 1 lines
    25 27   EvidenceMatcher: fileContentsVersionMatcher(
    26 28   `(?m)#define\s+PY_VERSION\s+"?(?P<version>[0-9\.\-_a-zA-Z]+)"?`),
    27 29   Package: "python",
     30 + PURL: mustPURL("pkg:generic/python@version"),
    28 31   },
    29 32   {
    30 33   Class: "go-binary",
    skipped 1 lines
    32 35   EvidenceMatcher: fileContentsVersionMatcher(
    33 36   `(?m)go(?P<version>[0-9]+\.[0-9]+(\.[0-9]+|beta[0-9]+|alpha[0-9]+|rc[0-9]+)?)\x00`),
    34 37   Package: "go",
     38 + PURL: mustPURL("pkg:generic/go@version"),
    35 39   CPEs: singleCPE("cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*"),
    36 40   },
    37 41   {
    skipped 4 lines
    42 46   // [NUL]openjdk[NUL]java[NUL]1.8[NUL]1.8.0_352-b08[NUL]
    43 47   `(?m)\x00openjdk\x00java\x00(?P<release>[0-9]+[.0-9]*)\x00(?P<version>[0-9]+[^\x00]+)\x00`),
    44 48   Package: "java",
     49 + PURL: mustPURL("pkg:generic/java@version"),
    45 50   // TODO the updates might need to be part of the CPE, like: 1.8.0:update152
    46 51   CPEs: singleCPE("cpe:2.3:a:oracle:openjdk:*:*:*:*:*:*:*:*"),
    47 52   },
    skipped 4 lines
    52 57   // [NUL]java[NUL]1.8[NUL][NUL][NUL][NUL]1.8.0-foreman_2022_09_22_15_30-b00[NUL]
    53 58   `(?m)\x00java\x00(?P<release>[0-9]+[.0-9]+)\x00{4}(?P<version>[0-9]+[-._a-zA-Z0-9]+)\x00`),
    54 59   Package: "java",
     60 + PURL: mustPURL("pkg:generic/java@version"),
    55 61   CPEs: singleCPE("cpe:2.3:a:ibm:java:*:*:*:*:*:*:*:*"),
    56 62   },
    57 63   {
    skipped 3 lines
    61 67   // [NUL]19.0.1+10-21[NUL]
    62 68   `(?m)\x00(?P<version>[0-9]+[.0-9]+[+][-0-9]+)\x00`),
    63 69   Package: "java",
     70 + PURL: mustPURL("pkg:generic/java@version"),
    64 71   CPEs: singleCPE("cpe:2.3:a:oracle:jre:*:*:*:*:*:*:*:*"),
    65 72   },
    66 73   {
    skipped 12 lines
    79 86   EvidenceMatcher: fileContentsVersionMatcher(
    80 87   `(?m)go(?P<version>[0-9]+\.[0-9]+(\.[0-9]+|beta[0-9]+|alpha[0-9]+|rc[0-9]+)?)`),
    81 88   Package: "go",
     89 + PURL: mustPURL("pkg:generic/go@version"),
    82 90   },
    83 91   {
    84 92   Class: "busybox-binary",
    skipped 7 lines
Please wait...
Page is in error, reload to recover