diff --git a/syft/pkg/cataloger/binary/classifiers.go b/syft/pkg/cataloger/binary/classifiers.go index 0d491f25feb1..8f6b2459d865 100644 --- a/syft/pkg/cataloger/binary/classifiers.go +++ b/syft/pkg/cataloger/binary/classifiers.go @@ -525,6 +525,16 @@ func DefaultClassifiers() []Classifier { PURL: mustPURL("pkg:generic/wp-cli@version"), CPEs: singleCPE("cpe:2.3:a:wp-cli:wp-cli:*:*:*:*:*:*:*:*"), }, + { + Class: "curl-binary", + FileGlob: "**/curl", + EvidenceMatcher: FileContentsVersionMatcher( + `curl/(?P[0-9]+\.[0-9]+\.[0-9]+)`, + ), + Package: "curl", + PURL: mustPURL("pkg:generic/curl@version"), + CPEs: singleCPE("cpe:2.3:a:curl:curl:*:*:*:*:*:*:*:*"), + }, } } diff --git a/syft/pkg/cataloger/binary/test-fixtures/config.yaml b/syft/pkg/cataloger/binary/test-fixtures/config.yaml index 50dd6bcc8ed8..6a32860657b3 100644 --- a/syft/pkg/cataloger/binary/test-fixtures/config.yaml +++ b/syft/pkg/cataloger/binary/test-fixtures/config.yaml @@ -570,3 +570,12 @@ from-images: platform: linux/arm64 paths: - /usr/local/openresty/openssl/bin/openssl + + - name: curl + version: 8.9.1 + images: + - ref: curlimages/curl:8.9.1@sha256:8addc281f0ea517409209f76832b6ddc2cabc3264feb1ebbec2a2521ffad24e4 + platform: linux/amd64 + paths: + - /usr/bin/curl +