-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: properly parse conan ref and include user and channel #2034
Conversation
163e3d7
to
9f32dff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a great start! Would you be able to add a test with some realistic samples of conanfile and lockfile entries?
9f32dff
to
5a4f877
Compare
Done, added some tests @kzantow |
5a4f877
to
9d21265
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Pro, I think the changes to the tests look sufficient; just one minor issue that wasn't resolved
@Pro -- you should be able to fix the static analysis failure by running |
9d21265
to
97072c5
Compare
@Pro it looks like the last commit was not signed-off; could you rebase against main and force push these changes with sign-off? |
Signed-off-by: Stefan Profanter <stefan.profanter@agile-robots.com>
97072c5
to
0b7ad64
Compare
Thanks for this PR @Pro -- there is one very small request to not export the Do you happen to know much about Conan lockfiles version 0.5? I've been trying to find information about the schema, but I've been unsuccessful. There is a report that the format may have changed significantly in an incompatible manner, and we'd like to make sure to support both older and newer versions. |
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the small tweak that @kzantow was referring to, otherwise it looks great! Thanks for the improvement here!
) * fix: properly parse conan ref and include user and channel Signed-off-by: Stefan Profanter <stefan.profanter@agile-robots.com> * unexport the conanRef type Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Stefan Profanter <stefan.profanter@agile-robots.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
The current implementation in syft is not parsing the user and channel from a conan ref.
Both are highly relevant for the resulting package version.
https://github.com/CycloneDX/cyclonedx-conan is parsing the user and channel and putting it in the resulting file.
With this MR the same functionality is also added to syft.