cdxgen icon indicating copy to clipboard operation
cdxgen copied to clipboard

missing components on dotnet based project

Open visagansanthanam-unisys opened this issue 1 year ago • 10 comments

Hi,

When I try to run cdxgen against the dotnet source code, I see there are some components that are part of the solution missing in the sbom file. these components are referred to in the code and also part of the csproj reference list. The highlighted components are not included in the SBOM and all other components are part of the SBOM. cdxgen-dotnet-1 cdxgen-dotnet-2

visagansanthanam-unisys avatar Oct 10 '23 02:10 visagansanthanam-unisys

@visagansanthanam-unisys, was the solution built prior to invoking cdxgen? Could you check for the presence of projects.assets.json?

prabhu avatar Oct 10 '23 10:10 prabhu

@prabhu so the solution is not built prior to invoking cdxgen and it does not have projects.assets.json. How are the other components identified in this case?

visagansanthanam-unisys avatar Oct 10 '23 11:10 visagansanthanam-unisys

@visagansanthanam-unisys, we parse the csproj file if projects.assets.json is not available. This is explained in the footnotes in the readme.

[3] - Perform dotnet or nuget restore to generate project.assets.json. Without this file, cdxgen would not include indirect dependencies.

prabhu avatar Oct 13 '23 17:10 prabhu

@prabhu I understand about including indirect dependencies. but what I reported is missing direct dependencies which are part of the csproj file. cdxgen tool identifies some of the components on the project references and misses others. So this is not an invalid issue.

visagansanthanam-unisys avatar Oct 16 '23 00:10 visagansanthanam-unisys

@visagansanthanam-unisys would you be able to share the csproj file? Suspecting those entries with only .dll is getting missed out

prabhu avatar Oct 16 '23 08:10 prabhu

@prabhu attached zip file has the csproj file Server-dependencies.zip

visagansanthanam-unisys avatar Oct 16 '23 11:10 visagansanthanam-unisys

@prabhu can you help with the instruction for running cdxgen directly using souce code.

visagansanthanam-unisys avatar Oct 24 '23 11:10 visagansanthanam-unisys

@visagansanthanam-unisys The file you would be calling is bin/cdxgen.js. You can use the usual options or --help by calling this file.

cerrussell avatar Oct 24 '23 12:10 cerrussell

@cerrussell is there any action pending from me on this bug?

visagansanthanam-unisys avatar Nov 20 '23 06:11 visagansanthanam-unisys

@visagansanthanam-unisys, no one is currently working on this. Could you find a colleague or friend with some node.js experience who is willing to contribute to this feature?

prabhu avatar Nov 20 '23 11:11 prabhu