Skip to content
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

Dotnet-Portable-Executable-Cataloger uses wrong component version for dotnet runtime libraries #3282

Open
AndreasAndoerfer opened this issue Sep 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@AndreasAndoerfer
Copy link

What happened:

When executing syft to analyse a docker image with a dotnet application it is generating component entries with the file version of the dll and not the assembly version.
This causes a wrong cpe.

In my example it is the .net 8.0 System.Security.Cryptography.Xml.dll
Nuget

Output of syft:
grafik

The library is just one example. This problem exist for all runtime libraries because the file version does not match the assembly- / runtime-version!

What you expected to happen:
I would expect to have the same version displayed in nuget and in the *.deps.json file of the project:

*.deps.json:
grafik

Output of syft with dotnet-deps-cataloger:
grafik

Steps to reproduce the issue:

  • create a docker image with an dotnet web application
  • run syft on the docker image

Anything else we need to know?:

Environment:

  • Output of syft version: 1.12.2
  • OS (e.g: cat /etc/os-release or similar): alpine image
@AndreasAndoerfer AndreasAndoerfer added the bug Something isn't working label Sep 26, 2024
@willmurphyscode
Copy link
Contributor

This is probably related to #2697.

@kzantow
Copy link
Contributor

kzantow commented Sep 30, 2024

Hi, @AndreasAndoerfer -- Syft looks at a few different properties in the PE files to attempt to determine the package and version, but we have found that these fields are not used in a consistent manner across various projects. Perhaps you could shed some light on improvements? We have tests of some set of PE files and the code which attempts to determine the package and version available to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants