■ ■ ■ ■ ■ ■ ■
syft/pkg/cataloger/binary/default_classifiers.go
1 | 1 | | package binary |
2 | 2 | | |
3 | | - | import "github.com/anchore/syft/syft/pkg" |
| 3 | + | import ( |
| 4 | + | "github.com/anchore/syft/syft/cpe" |
| 5 | + | "github.com/anchore/syft/syft/pkg" |
| 6 | + | ) |
4 | 7 | | |
5 | 8 | | var defaultClassifiers = []classifier{ |
6 | 9 | | { |
| skipped 4 lines |
11 | 14 | | `(?m)(?P<version>{{ .version }}\.[0-9]+[-_a-zA-Z0-9]*)`), |
12 | 15 | | Package: "python", |
13 | 16 | | PURL: mustPURL("pkg:generic/python@version"), |
| 17 | + | CPEs: []cpe.CPE{ |
| 18 | + | cpe.Must("cpe:2.3:a:python_software_foundation:python:*:*:*:*:*:*:*:*"), |
| 19 | + | cpe.Must("cpe:2.3:a:python:python:*:*:*:*:*:*:*:*"), |
| 20 | + | }, |
14 | 21 | | }, |
15 | 22 | | { |
16 | 23 | | Class: "python-binary-lib", |
| skipped 3 lines |
20 | 27 | | `(?m)(?P<version>{{ .version }}\.[0-9]+[-_a-zA-Z0-9]*)`), |
21 | 28 | | Package: "python", |
22 | 29 | | PURL: mustPURL("pkg:generic/python@version"), |
| 30 | + | CPEs: []cpe.CPE{ |
| 31 | + | cpe.Must("cpe:2.3:a:python_software_foundation:python:*:*:*:*:*:*:*:*"), |
| 32 | + | cpe.Must("cpe:2.3:a:python:python:*:*:*:*:*:*:*:*"), |
| 33 | + | }, |
23 | 34 | | }, |
24 | 35 | | { |
25 | 36 | | Class: "cpython-source", |
| skipped 2 lines |
28 | 39 | | `(?m)#define\s+PY_VERSION\s+"?(?P<version>[0-9\.\-_a-zA-Z]+)"?`), |
29 | 40 | | Package: "python", |
30 | 41 | | PURL: mustPURL("pkg:generic/python@version"), |
| 42 | + | CPEs: []cpe.CPE{ |
| 43 | + | cpe.Must("cpe:2.3:a:python_software_foundation:python:*:*:*:*:*:*:*:*"), |
| 44 | + | cpe.Must("cpe:2.3:a:python:python:*:*:*:*:*:*:*:*"), |
| 45 | + | }, |
31 | 46 | | }, |
32 | 47 | | { |
33 | 48 | | Class: "go-binary", |
| skipped 69 lines |
103 | 118 | | EvidenceMatcher: fileContentsVersionMatcher( |
104 | 119 | | `(?m)BusyBox\s+v(?P<version>[0-9]+\.[0-9]+\.[0-9]+)`), |
105 | 120 | | Package: "busybox", |
| 121 | + | CPEs: singleCPE("cpe:2.3:a:busybox:busybox:*:*:*:*:*:*:*:*"), |
106 | 122 | | }, |
107 | 123 | | { |
108 | 124 | | Class: "php-cli-binary", |
| skipped 45 lines |