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

CycloneDX - Dependency Graph displays transitive dependencies with inaccurate version #453

Closed
VijayB2606 opened this issue Nov 10, 2021 · 1 comment

Comments

@VijayB2606
Copy link

VijayB2606 commented Nov 10, 2021

Hello,

I have a .NET Core solution which has two projects with below frameworks.

  1. netcoreapp3.1
  2. netstandard2.0

A] netcoreapp3.1 project -
In this project, I installed nuget package Automapper@10.1.1. It has two dependencies as below -
AutoMapper@10.1.1 =>Microsoft.CSharp@4.7.0
=> System.Reflection.Emit@4.7.0

B] netstandard2.0 project -
In this project, I installed nuget package Microsoft.CSharp@4.0.0.

After running CycloneDX v2.2.0 tool against this .NET Core solution, the resultant SBOM shows inaccurate dependency graph.

Refer below images.

NETCore_Solution

DependencyGraph_Issue

In the dependency graph, dependency of Automapper@10.1.1 is displayed as below.
AutoMapper@10.1.1 =>Microsoft.CSharp@4.0.0
=> System.Reflection.Emit@4.7.0
Microsoft.CSharp@4.7.0 should be displayed as a dependency and not Microsoft.CSharp@4.0.0.

Also, Microsoft.CSharp@4.0.0 is displayed twice in the dependency graph and Microsoft.CSharp@4.7.0 is not displayed.

Thanks and Regards,
Vijay

@VijayB2606 VijayB2606 changed the title CycloneDX v2.2.0 - Dependency Graph displays dependencies with inaccurate version CycloneDX v2.2.0 - Dependency Graph displays transitive dependencies with inaccurate version Nov 10, 2021
@VijayB2606 VijayB2606 changed the title CycloneDX v2.2.0 - Dependency Graph displays transitive dependencies with inaccurate version CycloneDX - Dependency Graph displays transitive dependencies with inaccurate version Nov 10, 2021
@patspaeth
Copy link
Contributor

I see the same issue that package dependency versions will be overwritten and causes duplications.
I think this line will cause the error:
https://github.com/CycloneDX/cyclonedx-dotnet/blob/master/CycloneDX/Program.cs#L268

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

No branches or pull requests

2 participants