feat: detect curl binaries (#3146)

This commit is contained in:
KrysGor 2024-08-23 20:41:08 +02:00 committed by GitHub
parent 9ab3de1819
commit cff9d494df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 0 deletions

View File

@ -529,6 +529,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<version>[0-9]+\.[0-9]+\.[0-9]+)`,
),
Package: "curl",
PURL: mustPURL("pkg:generic/curl@version"),
CPEs: singleCPE("cpe:2.3:a:curl:curl:*:*:*:*:*:*:*:*"),
},
}
}

View File

@ -577,3 +577,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