From 8006e9d8a0fef72469778f3b01a3d678d58735c1 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 22 Dec 2023 13:02:26 -0500 Subject: [PATCH] adjust gitignore to be more permissive to snippets Signed-off-by: Alex Goodman --- Taskfile.yaml | 2 +- .../test-fixtures/classifiers/snippets/.gitignore | 5 +++++ .../snippets/go-version-hint/1.15/any/VERSION | 1 + .../php-apache/8.2.1/linux-amd64/libphp.so | 12 ++++++++++++ .../3.8.16/linux-amd64/libpython3.8.so | Bin 0 -> 122 bytes .../1.67.1/linux-amd64/libstd-86aefecbddda356d.so | Bin 0 -> 350 bytes .../1.50.0/linux-amd64/libstd-6f77337c1826707d.so | Bin 0 -> 350 bytes .../1.67.1/linux-amd64/libstd-c6192dd4c4d410ac.so | Bin 0 -> 350 bytes 8 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/.gitignore create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/go-version-hint/1.15/any/VERSION create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/php-apache/8.2.1/linux-amd64/libphp.so create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/python-duplicates/3.8.16/linux-amd64/libpython3.8.so create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/rust-libstd-musl/1.67.1/linux-amd64/libstd-86aefecbddda356d.so create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/rust-libstd/1.50.0/linux-amd64/libstd-6f77337c1826707d.so create mode 100644 syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/rust-libstd/1.67.1/linux-amd64/libstd-c6192dd4c4d410ac.so diff --git a/Taskfile.yaml b/Taskfile.yaml index a7bbfc664..e6f9115c7 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -173,7 +173,7 @@ tasks: check-binary-fixture-size: desc: Ensure that the binary test fixtures are not too large cmds: - - .github/scripts/check_binary_fixture_size.sh syft/pkg/cataloger/binary/test-fixtures/classifiers/positive + - .github/scripts/check_binary_fixture_size.sh syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets ## Testing tasks ################################# diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/.gitignore b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/.gitignore new file mode 100644 index 000000000..0a755729c --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/.gitignore @@ -0,0 +1,5 @@ +# allow for lb patterns (rust, pytho, php and more) +!lib*.so + +# allow for go-hint file +!VERSION* \ No newline at end of file diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/go-version-hint/1.15/any/VERSION b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/go-version-hint/1.15/any/VERSION new file mode 100644 index 000000000..5bedbed9f --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/go-version-hint/1.15/any/VERSION @@ -0,0 +1 @@ +go1.15-beta2 \ No newline at end of file diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/php-apache/8.2.1/linux-amd64/libphp.so b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/php-apache/8.2.1/linux-amd64/libphp.so new file mode 100644 index 000000000..61906e9f6 --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/php-apache/8.2.1/linux-amd64/libphp.so @@ -0,0 +1,12 @@ +name: libphp.so +offset: unknown +length: unknown +snippetSha256: d39ac8dadf5ba868455c487f1d0bb4c8bec64006fd7e5d76e3e27a26e47e637f +fileSha256: unknown + +### byte snippet to follow ### +%s' +%s,%s +X-Powered-By: PHP/8.2.1 +index pointer +PHP_VERSION diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/python-duplicates/3.8.16/linux-amd64/libpython3.8.so b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/python-duplicates/3.8.16/linux-amd64/libpython3.8.so new file mode 100644 index 0000000000000000000000000000000000000000..a1b0d2429480c7504bf546011a15435fd900d33c GIT binary patch literal 122 zcmY$$P0Y+w$jmEAEh;EV1(FQOiFxWJ3b~2dsS0VCMa3lwB^gDji75;|&hd^uJ`Bcs z7J7ze48 RRE2=Z5D$O9aK|7&E&$|XC_exI literal 0 HcmV?d00001 diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/rust-libstd-musl/1.67.1/linux-amd64/libstd-86aefecbddda356d.so b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/rust-libstd-musl/1.67.1/linux-amd64/libstd-86aefecbddda356d.so new file mode 100644 index 0000000000000000000000000000000000000000..045a097a548e7cf491f63067ea96666d57420665 GIT binary patch literal 350 zcmXw#y>7!W5Q8)ODGtbz46$|kIZK(^J)Ht{mvpDZfNKYq+ahmY7idS4z(;~p{E#z@ zL#ivEJVhyz6EjESh}$|hb17BUGkE3DDr!cVZtMLFs8my@;qj35dXL)C8I(sPAIOTM zm?gLpa$&0s_1QAzjJ;7VIBSZtUbqBRylC%C45FNG$}q}5Op<8APuGG>EFO zO96c->?8I?ZxB{Uh1ghBTXFK(Cl{M$zu!Z8t^$8EVV$AO<2ZlA7B#O|(5*2o?(!I? z8(c2$Z*W*X>zd(9mO9K6U`u_Aa9|g`PKh;WrOip{lj@Jh-FDj&muI(q*VQF=n{Jod Kz5E(2dqY3Mhh*UZ literal 0 HcmV?d00001 diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/rust-libstd/1.50.0/linux-amd64/libstd-6f77337c1826707d.so b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/rust-libstd/1.50.0/linux-amd64/libstd-6f77337c1826707d.so new file mode 100644 index 0000000000000000000000000000000000000000..fe4990e713bbc78b858bd825abee92879f93017f GIT binary patch literal 350 zcmXw#&1%Ci5QN>UpF)sJa)`ZJdG+IGNKb{{wfad+T{~DxOWwYwv~wF~7=~~0pJ^2H z#HGfw&c-NZg0!d&nAnxIU2`s}jzTMCH4W{YmTSF@LISj9neO*g-)`~h^_NDn%nEi4U zm&^OBIBt(pgZN5Ynbt+fj-Uf^3~b0piYyRNo&nDiPN!zaw)ySZ@9g@rg?{(lR+>KC KQutUOwf_N-(qk+D literal 0 HcmV?d00001 diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/rust-libstd/1.67.1/linux-amd64/libstd-c6192dd4c4d410ac.so b/syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets/rust-libstd/1.67.1/linux-amd64/libstd-c6192dd4c4d410ac.so new file mode 100644 index 0000000000000000000000000000000000000000..300b9f5dee78e83bc358342de9225a3bb3ee49e7 GIT binary patch literal 350 zcmXw#J8r`;5JX+`6brbq3rYNcROJ9p6(IeROWFct$q?xTzI_xRDQDhbFqj4Jd4ze2 zwNaO>2$D!AO