-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Issue scanning Poetry Project with Syft 1.6 and cataloger=python-package-cataloger #2954
Comments
Thanks for the detailed write up @mymichu - let me take a look today and see if we can get a patch released for this bug |
Looks like our and instead
Let me get see what a fix looks like for this and get that pushed. Are there any other fields we're missing that can be two different types that we need to consider? I'm having trouble tracking down an exact specification for the lockfile: syft/syft/pkg/cataloger/python/parse_poetry_lock.go Lines 29 to 38 in ca0cc52
|
The fix for this might take more than a day - I'm currently evaluating a new toml parser for syft. The current one doesn't give us the hooks we're looking for to customize this unmarshal function the way we want. syft/syft/pkg/cataloger/python/parse_poetry_lock.go Lines 96 to 102 in 273e31e
Here is where the error originates from when we call tree.Unmarshal. I tried initially to change the dependency type to
I tried a couple solutions to get a custom Currently I'm trying to get things working again with: This gives us a lot more flexibility where we can define a custom |
@spiffcs Great work. Thank you for your quick response, support, and help. We appreciate this. |
What happened:
We have updated Syft from Version 1.5.0 to 1.6.0 and discovered that it has issues scanning certain poetry.lock files. We try to scan a poetry project with the syft 1.6.0 with executing the following command:
syft --output cyclonedx-json=reports/sbom-scan-licenses.cdx.json --source-name=blub scan .
and then we discovered that the output of the console has the following warning:
and the json looks like followed:
With Syft version 1.5.0, it was possible to scan the lock file without any issues. If we remove the following part (see below) from the lock file then Syft 1.6.0 works. We can not do that because other teams are maintaining the lock files.
What you expected to happen:
I would expect that syft 1.6.0 has the same behaviour as the syft 1.5.0.
Steps to reproduce the issue:
Create poetry lock file and add the following snippet:
and execute the following command within the poetry project:
syft --output cyclonedx-json=reports/sbom-scan-licenses.cdx.json --source-name=blub scan .
Anything else we need to know?:
Currently nothing
Environment:
syft version
: 1.6cat /etc/os-release
or similar): macOS 14.5The text was updated successfully, but these errors were encountered: