Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions syft/pkg/cataloger/binary/cataloger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,16 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
},
},
},
{
logicalFixture: "pypy-shared-lib/7.3.14/linux-amd64",
expected: pkg.Package{
Name: "pypy",
Version: "7.3.14",
PURL: "pkg:generic/pypy@7.3.14",
Locations: locations("libpypy3.9-c.so"),
Metadata: metadata("pypy-binary-lib"),
},
},
{
logicalFixture: "go/1.21.3/linux-amd64",
expected: pkg.Package{
Expand Down
8 changes: 8 additions & 0 deletions syft/pkg/cataloger/binary/default_classifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ func DefaultClassifiers() []Classifier {
cpe.Must("cpe:2.3:a:python:python:*:*:*:*:*:*:*:*"),
},
},
{
Class: "pypy-binary-lib",
FileGlob: "**/libpypy*.so*",
EvidenceMatcher: FileContentsVersionMatcher(
`(?m)\[PyPy (?P<version>[0-9]+\.[0-9]+\.[0-9]+)`),
Package: "pypy",
PURL: mustPURL("pkg:generic/pypy@version"),
},
{
Class: "go-binary",
FileGlob: "**/go",
Expand Down
Binary file not shown.
8 changes: 8 additions & 0 deletions syft/pkg/cataloger/binary/test-fixtures/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ from-images:
paths:
- /usr/local/lib/libpython3.7m.so.1.0

- name: pypy-shared-lib
version: 7.3.14
images:
- ref: pypy:3.9-7.3.14-slim-bullseye@sha256:058f1a0c073534e535aed3d45c1982648378167901a05a0f35056006bf2e13bc
platform: linux/amd64
paths:
- /opt/pypy/bin/libpypy3.9-c.so

- version: 2.8.23
images:
- ref: redis:2.8.23@sha256:e507029ca6a11b85f8628ff16d7ff73ae54582f16fd757e64431f5ca6d27a13c
Expand Down