From 49a57a0307107effcd5d2f573ee4fc92fed89735 Mon Sep 17 00:00:00 2001 From: Christopher Phillips <32073428+spiffcs@users.noreply.github.com> Date: Fri, 30 Jan 2026 10:18:59 -0500 Subject: [PATCH] chore: update snippets to be managed by config Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com> --- .../binary/classifier_cataloger_test.go | 12 ++++---- .../cataloger/binary/test-fixtures/Makefile | 2 +- .../qt/4.8.6/linux-amd64/libQtCore.so.4.8.6 | Bin 0 -> 362 bytes .../qt/4.8.7/linux-amd64/libQtCore.so | Bin 150 -> 0 bytes .../qt/5.15.2/linux-amd64/libQt5Core.so | Bin 150 -> 0 bytes .../5.15.2/linux-amd64/libQt5Core.so.5.15.2 | Bin 0 -> 364 bytes .../qt/6.5.0/linux-amd64/libQt6Core.so | Bin 150 -> 0 bytes .../qt/6.5.0/linux-amd64/libQt6Core.so.6.5.0 | Bin 0 -> 363 bytes .../binary/test-fixtures/config.yaml | 27 +++++++++++++++++- 9 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/4.8.6/linux-amd64/libQtCore.so.4.8.6 delete mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/4.8.7/linux-amd64/libQtCore.so delete mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/5.15.2/linux-amd64/libQt5Core.so create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/5.15.2/linux-amd64/libQt5Core.so.5.15.2 delete mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/6.5.0/linux-amd64/libQt6Core.so create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/6.5.0/linux-amd64/libQt6Core.so.6.5.0 diff --git a/syft/pkg/cataloger/binary/classifier_cataloger_test.go b/syft/pkg/cataloger/binary/classifier_cataloger_test.go index c1d0021fa..6afc4cb96 100644 --- a/syft/pkg/cataloger/binary/classifier_cataloger_test.go +++ b/syft/pkg/cataloger/binary/classifier_cataloger_test.go @@ -1217,13 +1217,13 @@ func Test_Cataloger_PositiveCases(t *testing.T) { }, }, { - logicalFixture: "qt/4.8.7/linux-amd64", + logicalFixture: "qt/4.8.6/linux-amd64", expected: pkg.Package{ Name: "qtbase", - Version: "4.8.7", + Version: "4.8.6", Type: "binary", - PURL: "pkg:generic/qtbase@4.8.7", - Locations: locations("libQtCore.so"), + PURL: "pkg:generic/qtbase@4.8.6", + Locations: locations("libQtCore.so.4.8.6"), Metadata: metadata("qt-qtbase-lib"), }, }, @@ -1234,7 +1234,7 @@ func Test_Cataloger_PositiveCases(t *testing.T) { Version: "5.15.2", Type: "binary", PURL: "pkg:generic/qtbase@5.15.2", - Locations: locations("libQt5Core.so"), + Locations: locations("libQt5Core.so.5.15.2"), Metadata: metadata("qt-qtbase-lib"), }, }, @@ -1245,7 +1245,7 @@ func Test_Cataloger_PositiveCases(t *testing.T) { Version: "6.5.0", Type: "binary", PURL: "pkg:generic/qtbase@6.5.0", - Locations: locations("libQt6Core.so"), + Locations: locations("libQt6Core.so.6.5.0"), Metadata: metadata("qt-qtbase-lib"), }, }, diff --git a/syft/pkg/cataloger/binary/test-fixtures/Makefile b/syft/pkg/cataloger/binary/test-fixtures/Makefile index fa37d43c1..3920d2397 100644 --- a/syft/pkg/cataloger/binary/test-fixtures/Makefile +++ b/syft/pkg/cataloger/binary/test-fixtures/Makefile @@ -41,4 +41,4 @@ clean-fingerprint: ## clean up all legacy fingerprint files help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "$(BOLD)$(CYAN)%-25s$(RESET)%s\n", $$1, $$2}' -.PHONY: default list download download-all clean clean-fingerprint add-snippet fingerprint \ No newline at end of file +.PHONY: default list download download-all clean clean-fingerprint add-snippet fingerprint diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/4.8.6/linux-amd64/libQtCore.so.4.8.6 b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/4.8.6/linux-amd64/libQtCore.so.4.8.6 new file mode 100644 index 0000000000000000000000000000000000000000..3282baabbf0f0b96fd07b3be29a211a50bfbd9cf GIT binary patch literal 362 zcmXw#L2kn!6hyP;6kp0FQ56?3V93@zK&$ow{J^)7sEG_|mD|@olU9Yjd&t7VC2G<+YM{=sy!VW?A zc;P|>5(0zO&Z3OgSl?sR4u$K{3Xmm|rMN(PfsDsj% z0gcmyj;q0W&c&c*)C0Fh6AdzGkBsg2d%$~(@OKkh0V+9{Z`dXV)6>&Q0o`&wUCKgf z+U-8(RAEb-BRoX>Dp~z{hp)KSR2Fzx8O!y)rfF_)7>^*i=;0+z$-`^DfM3FMSs}Fw R^@cTtv;hvM6zj2L;}5nyYIy(v literal 0 HcmV?d00001 diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/4.8.7/linux-amd64/libQtCore.so b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/4.8.7/linux-amd64/libQtCore.so deleted file mode 100644 index ca19cc27e663049062919ad7a8f3b38bd771f3cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmW;Du?~VT6h>iYp5h-hgjNkk)6uRjCcFSbX>Y78mW!lsFEKgecVMfkZZIz1*L@5l z*`jD2&DdgR@L(O2fv0EcQpVS$nPNaAuHsVaIORmvF?M>7)8TkV`+uP0d+I{Qod>b8 iz+KM@j(Jj2uInm3EGSA(y$Le~E6eh>kRR|eSph#POE6~u diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/5.15.2/linux-amd64/libQt5Core.so b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/5.15.2/linux-amd64/libQt5Core.so deleted file mode 100644 index 06a4ab18bd4bf83b9b921656bb33bb112bcad451..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmWlSu?mAQ7=(S48{?1|t^O1`I<%{$yF~M20;w$~1%3O*Vu6DZ= zXNH7M)tzb}_A8Cl%HUH9Jo0M2S!MWAi|EY87Q!B@dHcD<#(_;_Og|s&4by>p-{+%? hs?q40bgK#CnVE+<1$mcLmf81mJ|Z_c#*q5Y#(!8#DjEO) diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/5.15.2/linux-amd64/libQt5Core.so.5.15.2 b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/5.15.2/linux-amd64/libQt5Core.so.5.15.2 new file mode 100644 index 0000000000000000000000000000000000000000..6841cbf70bbf60f868b12b3732feb64ab9dfde27 GIT binary patch literal 364 zcmXv}y>7xV5N6I(oWw#0f_?sposJCcO8WrFXP+UGNf2>Wc>4ymz2zIe-y6e)dnf}P zs@YFBZs(~rtu!q*Q_eHj9+Y=p3fB}KPxah`MA6LSaJ_QdY1uUE^&03=8UAKMogh!8Oy96j&1qh>?QXT>8h7_}T0QSj z;rDIW+?_pIy)8qng^xU@A&lE{wHoGgxN(9_dW_*R#22`6;V?7M*HF^y(g|<-{Su^F R2`Ho$T3Fb8ES~pJ;Rl!yW?%pS literal 0 HcmV?d00001 diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/6.5.0/linux-amd64/libQt6Core.so b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/6.5.0/linux-amd64/libQt6Core.so deleted file mode 100644 index cc70364dce94c2b67a4506bc93579993a25c7f78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmXYou?oU45J3AWH?~7U5^E3~Gw51zFW2Uz2Qf-=iv4?w_;}mnq41kH3zZwr)chC( zyxwaA?dRY}->bwTiAKtiF{||SJ=6sYMQG!i@y>Gxg%V*Um|mRX5vCPRA%Hb{r!6?+ dtm&PD_OeZ9lz&jR>zd}eaD`1-2nGp{LSIBwE4=^! diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/6.5.0/linux-amd64/libQt6Core.so.6.5.0 b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/qt/6.5.0/linux-amd64/libQt6Core.so.6.5.0 new file mode 100644 index 0000000000000000000000000000000000000000..7829b7890ded35b4aa1ef10fa4da4679ee728678 GIT binary patch literal 363 zcmXw!Ic~!+5Jgk#6a%<%iU=Hv9Fa=tB59o*z~C~B3DA@wF^g{>!AO4l@%~cXg(oQ4 z9~&L!h5L2xsn@;e=9E@$6DT5Wjp+*4k9M8_rRdh0uUBsGXD2mHAV_$ty(XzrARal8 z)FBN?VH|k09*t##Q3xA?!Xc6!$E2;?AP$MUlneid=_m@H2!gwAx7&fgHHN>L&}K+;Df2gMR_9v&;#?aq8^8~D9UI(V z!~Vz6iPTfctrb3TjoH^axT& O6iQ0izirT~Yw!z<%4!_| literal 0 HcmV?d00001 diff --git a/syft/pkg/cataloger/binary/test-fixtures/config.yaml b/syft/pkg/cataloger/binary/test-fixtures/config.yaml index a4a834f02..38aa1d02b 100644 --- a/syft/pkg/cataloger/binary/test-fixtures/config.yaml +++ b/syft/pkg/cataloger/binary/test-fixtures/config.yaml @@ -11,7 +11,7 @@ from-images: - name: busybox version: 1.36.1 - images: + images: - ref: busybox:1.36.1@sha256:058f0df5310fbbbfea7e81a3a3e2b4bf3452438ec841138d170e170adbbd27a4 platform: linux/amd64 paths: @@ -924,3 +924,28 @@ from-images: platform: linux/amd64 paths: - /usr/share/grafana/bin/grafana-server + + # Qt Framework (https://www.qt.io/) + - name: qt + version: 6.5.0 + images: + - ref: stateoftheartio/qt6:6.5-gcc-aqt@sha256:c0dfd1cd174d855f0157ce0455270b2ee49f5eea4c7a40ffe0e848d41ae4d074 + platform: linux/amd64 + paths: + - /opt/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0 + + - name: qt + version: 5.15.2 + images: + - ref: rabits/qt:5.15-desktop@sha256:8dd10b4fcdece7e329dd2b9db52dafcd6590940954bc36d5018567e850d9599c + platform: linux/amd64 + paths: + - /opt/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5.15.2 + + - name: qt + version: 4.8.6 + images: + - ref: uvatbc/qt:qt4@sha256:9d6f18e000df14077f4c96e487fc84e02f1cef19c27f2a8f66f161b8a1ef6b06 + platform: linux/amd64 + paths: + - /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6