Skip to content

fix(binary): support julia alpha/beta/rc versions in binary cataloger (#4867)#4898

Open
tjhub1983 wants to merge 1 commit into
anchore:mainfrom
tjhub1983:fix/julia-binary-v6
Open

fix(binary): support julia alpha/beta/rc versions in binary cataloger (#4867)#4898
tjhub1983 wants to merge 1 commit into
anchore:mainfrom
tjhub1983:fix/julia-binary-v6

Conversation

@tjhub1983
Copy link
Copy Markdown

Summary

Fixes #4867.

Problem: The julia-binary classifier only matches X.Y.Z version format. Pre-release versions like 1.9.0-alpha1 are not detected.

Fix: Extended the version regex to support -alphaN, -betaN, -rcN suffixes.

Changes

  • syft/pkg/cataloger/binary/classifiers.go: Added pre-release version support to julia-binary matcher

Test

$ syft -q julia:1.9.0-alpha1 | grep julia
julia    1.9.0-alpha1                          binary

…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>
@tjhub1983
Copy link
Copy Markdown
Author

@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:

  1. cd testdata
  2. Add entries for Julia 3.15.2, 3.12.0, 1.8.5, 1.0.5 to config.yaml
  3. make download to get the actual binaries
  4. make add-snippet to generate proper snippets

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!

@witchcraze
Copy link
Copy Markdown
Contributor

I have no idea for such an approach

@tjhub1983
Copy link
Copy Markdown
Author

@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?

@tjhub1983
Copy link
Copy Markdown
Author

Following up on the DCO status - is there anything needed from my side?

@tjhub1983
Copy link
Copy Markdown
Author

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?

@tjhub1983
Copy link
Copy Markdown
Author

?? Hi maintainers! Just checking in on this PR. Is there anything else needed from my side to move forward? Thanks!

@tjhub1983
Copy link
Copy Markdown
Author

?? Hi maintainers! Just checking in on this PR. Is there anything else needed? Thanks for your time!

@kzantow
Copy link
Copy Markdown
Contributor

kzantow commented May 21, 2026

It doesn't look like the test data has been addressed. Please add tests for any changes to binary classifiers

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 julia binary various versions

3 participants