mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 07:26:34 +01:00
fix:allow golang tip image detection regex pattern (#3757)
* Modify the Regex version matcher for golang in the binary classifiers to make it compatible with golang tip images Signed-off-by: Victor Hu <victorhu493@gmail.com> Signed-off-by: Yuntao Hu <victorhu493@gmail.com> * Preliminary fix the regex matching for golang tip image and add the corresponding unit tests Signed-off-by: Yuntao Hu <victorhu493@gmail.com> * consider VERSION.cache when it comes to golang tip images Signed-off-by: Yuntao Hu <victorhu493@gmail.com> * consider VERSION.cache when it comes to golang tip images Signed-off-by: Yuntao Hu <victorhu493@gmail.com> --------- Signed-off-by: Victor Hu <victorhu493@gmail.com> Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
This commit is contained in:
@@ -699,6 +699,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
||||
Metadata: metadata("go-binary-hint"),
|
||||
},
|
||||
},
|
||||
{
|
||||
// note: this is for compatability with dev version of golang tip image, which resolves the issue #3681
|
||||
logicalFixture: "go-version-hint/1.25/any",
|
||||
expected: pkg.Package{
|
||||
Name: "go",
|
||||
Version: "1.25-d524e1e",
|
||||
PURL: "pkg:generic/go@1.25-d524e1e",
|
||||
Locations: locations("VERSION.cache"),
|
||||
Metadata: metadata("go-binary-hint"),
|
||||
},
|
||||
},
|
||||
{
|
||||
// note: this is testing BUSYBOX which is typically through a link to "[" (in this case a symlink but in
|
||||
// practice this is often a hard link).
|
||||
|
||||
Reference in New Issue
Block a user