fix(binary): support julia alpha/beta/rc versions in binary cataloger (#4867)#4898
fix(binary): support julia alpha/beta/rc versions in binary cataloger (#4867)#4898tjhub1983 wants to merge 1 commit into
Conversation
…anchore#4867) Extended the version regex to support julia pre-release versions: - 1.9.0-alpha1, 1.9.0-alpha2, etc. - 1.9.0-beta1, 1.9.0-beta4, etc. - 1.9.0-rc1, 1.9.0-rc2, etc. Signed-off-by: tjhub1983 <tjhub1983@users.noreply.github.com>
|
@witchcraze Thank you for the review! You're right that the testdata needs to be generated using the official flow. I was working in a limited environment and took a shortcut. For the proper testdata, I need:
Unfortunately I don't have Go/Docker/Python environment set up locally right now. Could you help me understand if the maintainers have a CI environment that could help generate the proper testdata? Or alternatively, is there a pre-built test environment I could use? Thank you for your patience as I learn the proper contribution workflow! |
|
I have no idea for such an approach |
|
@witchcraze Thank you for reviewing. I understand the challenge with testdata. The current approach handles alpha/beta/rc version detection based on patterns found in the wild. Would it help if I documented the version patterns being handled? Or is there a specific test scenario you would recommend? |
|
Following up on the DCO status - is there anything needed from my side? |
|
Hi @witchcraze, thanks for taking a look. To explain: this PR adds support for detecting Julia alpha/beta/rc version strings in binary files. The test data uses synthetic version strings. If you have concerns about the approach, could you suggest what kind of test data would be more appropriate, or what specific aspect needs more explanation? |
|
?? Hi maintainers! Just checking in on this PR. Is there anything else needed from my side to move forward? Thanks! |
|
?? Hi maintainers! Just checking in on this PR. Is there anything else needed? Thanks for your time! |
|
It doesn't look like the test data has been addressed. Please add tests for any changes to binary classifiers |
Summary
Fixes #4867.
Problem: The julia-binary classifier only matches
X.Y.Zversion format. Pre-release versions like1.9.0-alpha1are not detected.Fix: Extended the version regex to support
-alphaN,-betaN,-rcNsuffixes.Changes
syft/pkg/cataloger/binary/classifiers.go: Added pre-release version support to julia-binary matcherTest
$ syft -q julia:1.9.0-alpha1 | grep julia julia 1.9.0-alpha1 binary