-
Notifications
You must be signed in to change notification settings - Fork 597
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
.NET NuGet - dotnet-deps cataloger not working with syft v0.94.0 #2264
Comments
Thanks @jeremytbrun! Similar issue to #2255 - we'll get a bug fix contributed and released as soon as we can here. |
Thanks @spiffcs . FWIW I just downloaded release 0.96.0 and I still have the issue.
|
Hey @jeremytbrun, thank you for the details. I think we were wrong about the connection to #2255, this might be a separate problem. Are you able to share your deps.json file with us? That will be helpful for us to reproduce and fix. Thanks! |
|
Hi @jeremytbrun, thanks for attaching the deps.json! I've been able to confirm that this is a Windows-specific bug: Works on mac/Linux: mkdir syft2264
cd syft 2264
wget https://github.com/anchore/syft/files/13369564/My.Rest.Api.deps.json
syft --select-catalogers dotnet -o cyclonedx-json=cdx.json .
jq '.components | length' cdx.json
# 203 is printed Seems to have found 203 packages and never printed But on windows: mkdir syft2264
cd .\syft2264
Invoke-WebRequest -Uri "https://github.com/anchore/syft/files/13369564/My.Rest.Api.deps.json" -OutFile "My.Rest.Api.deps.json"
syft.exe . Results in:
Given that it's windows specific, we have 2 more places we can start looking:
I think the path is probably more likely, since I don't know why |
What happened:
Using v0.92.0 I can generate an SBOM using the dotnet-deps cataloger. After updating to v0.94.0 I can no longer generate an SBOM using the dotnet-deps cataloger pointed at the exact same directory.
syft.exe .\My.Rest.Api\My.Rest.Api\bin\Debug\net6.0\ -o cyclonedx-json=.\my.rest.api.json --catalogers dotnet-deps -vv
WARN cataloger failed cataloger=dotnet-deps-cataloger error=unable to determine root package from deps.json file: \My.Rest.Api.deps.json location=\My.Rest.Api.deps.json
Here is a sample section of the My.Rest.Api.deps.json file I am using. This works with v0.92.0, but does not work with v0.94.0.
What you expected to happen:
I expected a cyclonedx SBOM to be generated.
Steps to reproduce the issue:
Install v0.92.0 and generate cyclonedx SBOM successfully. Install v0.94.0 and it longer works.
Anything else we need to know?:
Environment:
syft version
:Working
Application: syft
Version: 0.92.0
BuildDate: 2023-09-27T15:40:42Z
GitCommit: 8f57d22
GitDescription: v0.92.0
Platform: windows/amd64
GoVersion: go1.21.1
Compiler: gc
Not Working
Application: syft
Version: 0.94.0
BuildDate: 2023-10-20T17:21:07Z
GitCommit: 8f6bdde
GitDescription: v0.94.0
Platform: windows/amd64
GoVersion: go1.21.3
Compiler: gc
cat /etc/os-release
or similar):Windows 11 Enterprise 21H2
The text was updated successfully, but these errors were encountered: