mirror of
https://github.com/anchore/syft.git
synced 2026-10-13 14:47:22 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
873f6e4037 |
@@ -870,6 +870,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
|||||||
Metadata: metadata("gcc-binary"),
|
Metadata: metadata("gcc-binary"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
logicalFixture: "wp-cli/2.9.0/linux-amd64",
|
||||||
|
expected: pkg.Package{
|
||||||
|
Name: "wp-cli",
|
||||||
|
Version: "2.9.0",
|
||||||
|
Type: "binary",
|
||||||
|
PURL: "pkg:generic/wp-cli@2.9.0",
|
||||||
|
Locations: locations("wp"),
|
||||||
|
Metadata: metadata("wordpress-cli-binary"),
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
|
|||||||
@@ -403,6 +403,17 @@ func DefaultClassifiers() []Classifier {
|
|||||||
PURL: mustPURL("pkg:generic/gcc@version"),
|
PURL: mustPURL("pkg:generic/gcc@version"),
|
||||||
CPEs: singleCPE("cpe:2.3:a:gnu:gcc:*:*:*:*:*:*:*:*"),
|
CPEs: singleCPE("cpe:2.3:a:gnu:gcc:*:*:*:*:*:*:*:*"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Class: "wordpress-cli-binary",
|
||||||
|
FileGlob: "**/wp",
|
||||||
|
EvidenceMatcher: FileContentsVersionMatcher(
|
||||||
|
// wp-cli/wp-cli 2.9.0'
|
||||||
|
`(?m)wp-cli/wp-cli (?P<version>[0-9]+\.[0-9]+\.[0-9]+)`,
|
||||||
|
),
|
||||||
|
Package: "wp-cli",
|
||||||
|
PURL: mustPURL("pkg:generic/wp-cli@version"),
|
||||||
|
CPEs: singleCPE("cpe:2.3:a:wp-cli:wp-cli:*:*:*:*:*:*:*:*"),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user