Skip to content

update helm classifier#4922

Open
witchcraze wants to merge 1 commit into
anchore:mainfrom
witchcraze:4820_update-helm-binary-classifier
Open

update helm classifier#4922
witchcraze wants to merge 1 commit into
anchore:mainfrom
witchcraze:4820_update-helm-binary-classifier

Conversation

@witchcraze
Copy link
Copy Markdown
Contributor

Description

This PR updates helm binary classifer to support various versions

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have added unit tests that cover changed behavior
  • I have tested my code in common scenarios and confirmed there are no regressions
  • I have added comments to my code, particularly in hard-to-understand sections

Issue references

Fixes #4820


Details
$ go test -v ./syft/pkg/cataloger/binary -run Test_Cataloger_PositiveCases/helm
=== RUN   Test_Cataloger_PositiveCases
=== RUN   Test_Cataloger_PositiveCases/helm/4.1.4/linux-s390x
=== RUN   Test_Cataloger_PositiveCases/helm/3.15.2/linux-amd64
    snippet_or_binary.go:50: using snippet for "helm/3.15.2/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/3.12.0/linux-s390x
=== RUN   Test_Cataloger_PositiveCases/helm/3.11.1/linux-amd64
    snippet_or_binary.go:50: using snippet for "helm/3.11.1/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/3.0.0-alpha.1/linux-amd64
    snippet_or_binary.go:50: using snippet for "helm/3.0.0-alpha.1/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/2.17.0-rc.1/linux-amd64
    snippet_or_binary.go:50: using snippet for "helm/2.17.0-rc.1/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/2.0.0-beta.2/linux-amd64
    snippet_or_binary.go:50: using snippet for "helm/2.0.0-beta.2/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/3.10.3/linux-amd64
    snippet_or_binary.go:50: using snippet for "helm/3.10.3/linux-amd64"
--- PASS: Test_Cataloger_PositiveCases (0.47s)
    --- PASS: Test_Cataloger_PositiveCases/helm/4.1.4/linux-s390x (0.05s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.15.2/linux-amd64 (0.06s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.12.0/linux-s390x (0.07s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.11.1/linux-amd64 (0.06s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.0.0-alpha.1/linux-amd64 (0.05s)
    --- PASS: Test_Cataloger_PositiveCases/helm/2.17.0-rc.1/linux-amd64 (0.05s)
    --- PASS: Test_Cataloger_PositiveCases/helm/2.0.0-beta.2/linux-amd64 (0.07s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.10.3/linux-amd64 (0.06s)
PASS
ok      github.com/anchore/syft/syft/pkg/cataloger/binary       0.495s

$ go test -v ./syft/pkg/cataloger/binary -run Test_Cataloger_PositiveCases/helm -must-use-original-binaries
=== RUN   Test_Cataloger_PositiveCases
=== RUN   Test_Cataloger_PositiveCases/helm/4.1.4/linux-s390x
    snippet_or_binary.go:62: forcing the use of the original binary for "helm/4.1.4/linux-s390x"
=== RUN   Test_Cataloger_PositiveCases/helm/3.15.2/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "helm/3.15.2/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/3.12.0/linux-s390x
    snippet_or_binary.go:62: forcing the use of the original binary for "helm/3.12.0/linux-s390x"
=== RUN   Test_Cataloger_PositiveCases/helm/3.11.1/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "helm/3.11.1/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/3.0.0-alpha.1/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "helm/3.0.0-alpha.1/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/2.17.0-rc.1/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "helm/2.17.0-rc.1/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/2.0.0-beta.2/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "helm/2.0.0-beta.2/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/helm/3.10.3/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "helm/3.10.3/linux-amd64"
--- PASS: Test_Cataloger_PositiveCases (0.44s)
    --- PASS: Test_Cataloger_PositiveCases/helm/4.1.4/linux-s390x (0.05s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.15.2/linux-amd64 (0.08s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.12.0/linux-s390x (0.06s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.11.1/linux-amd64 (0.07s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.0.0-alpha.1/linux-amd64 (0.04s)
    --- PASS: Test_Cataloger_PositiveCases/helm/2.17.0-rc.1/linux-amd64 (0.04s)
    --- PASS: Test_Cataloger_PositiveCases/helm/2.0.0-beta.2/linux-amd64 (0.04s)
    --- PASS: Test_Cataloger_PositiveCases/helm/3.10.3/linux-amd64 (0.07s)
PASS
ok      github.com/anchore/syft/syft/pkg/cataloger/binary       0.461s
$ for i in 2.0.0-beta.2 2.17.0-rc.1 3.0.0-alpha.1 3.0.0-beta.5 3.10.0-rc.1 3.15.2 3.16.4 3.17.3 3.18.6 3.19.5 ; do echo $i; go run ./cmd/syft -q alpine/helm:$i | grep helm; done
2.0.0-beta.2
helm                    2.0.0-beta.2  go-module
2.17.0-rc.1
helm                    2.17.0-rc.1    go-module
3.0.0-alpha.1
helm                    3.0.0-alpha.1  go-module
3.0.0-beta.5
helm                                                          3.0.0-beta.5                                 go-module
helm.sh/helm/v3                                               UNKNOWN                                      go-module
3.10.0-rc.1
helm                                              3.10.0-rc.1                           go-module
helm.sh/helm/v3                                   v0.0.0-20220912192747-ce66412a723e    go-module
3.15.2
helm                                                           3.15.2                                 go-module
helm.sh/helm/v3                                                v0.0.0-20240612132704-1a500d562541     go-module
3.16.4
helm                                                           3.16.4                                go-module
helm.sh/helm/v3                                                v0.0.0-20241216182912-7877b45b63f9    go-module
3.17.3
helm                                                           3.17.3                                go-module
helm.sh/helm/v3                                                v0.0.0-20250409171524-e4da49785aa6    go-module
3.18.6
helm                                       3.18.6                                go-module
helm.sh/helm/v3                            v0.0.0-20250819195950-b76a950f6835    go-module
3.19.5
helm                                       3.19.5                                go-module
helm.sh/helm/v3                            v0.0.0-20260114235050-4a19a5b6fb91    go-module
$ for i in 3.5.4 3.6.3 3.7.2 3.8.2 3.9.4 3.10.2 3.11.3 3.12.3 3.13.3 3.14.4 3.15.1 3.20.2 3.21.0 4.0.5 4.1.4 4.2.0  ; do echo $i; go run ./cmd/syft -q --platform linux/s390x alpine/helm:$i | grep helm; done
3.5.4
helm                                              3.5.4                                                       go-module
helm.sh/helm/v3                                   UNKNOWN                                                     go-module
3.6.3
helm                                              3.6.3                                                       go-module
helm.sh/helm/v3                                   UNKNOWN                                                     go-module
3.7.2
helm                                              3.7.2                                                       go-module
helm.sh/helm/v3                                   UNKNOWN                                                     go-module
3.8.2
helm                                              3.8.2                                 go-module
helm.sh/helm/v3                                   UNKNOWN                               go-module
3.9.4
helm                                              3.9.4                                 go-module
helm.sh/helm/v3                                   UNKNOWN                               go-module
3.10.2
helm                                              3.10.2                                go-module
helm.sh/helm/v3                                   v0.0.0-20221110143448-50f003e5ee87    go-module
3.11.3
helm                                              3.11.3                                    go-module
helm.sh/helm/v3                                   v0.0.0-20230412170203-323249351482        go-module
3.12.3
helm                                              3.12.3                                    go-module
helm.sh/helm/v3                                   v0.0.0-20230810195904-3a31588ad33f        go-module
3.13.3
helm                                              3.13.3                                 go-module
helm.sh/helm/v3                                   v0.0.0-20231213205856-c8b948945e52     go-module
3.14.4
helm                                                           3.14.4                                 go-module
helm.sh/helm/v3                                                v0.0.0-20240410185915-81c902a12346     go-module
3.15.1
helm                                                           3.15.1                                 go-module
helm.sh/helm/v3                                                v0.0.0-20240523142620-e211f2aa6299     go-module
3.20.2
helm                                       3.20.2                                go-module
helm.sh/helm/v3                            v3.20.2                               go-module
3.21.0
helm                                       3.21.0                                go-module
helm.sh/helm/v3                            v3.21.0                               go-module
4.0.5
helm                                      4.0.5                                 go-module
helm.sh/helm/v4                           v4.0.5                                go-module
4.1.4
helm                                      4.1.4                                 go-module
helm.sh/helm/v4                           v4.1.4                                go-module
4.2.0
helm                                      4.2.0                                   go-module
helm.sh/helm/v4                           v4.2.0                                  go-module

Signed-off-by: witchcraze <witchcraze@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support helm binary various versions

1 participant