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

Why are NuGet project references not included? #1029

Open
Whathecode opened this issue Mar 13, 2024 · 4 comments
Open

Why are NuGet project references not included? #1029

Whathecode opened this issue Mar 13, 2024 · 4 comments

Comments

@Whathecode
Copy link

Whathecode commented Mar 13, 2024

I'm trying to generate an SBOM using sbom-tool, which uses this package to find dependencies through NuGet configurations. I noticed that project references are missing.

When running component-detection in isolation, I noticed that project references are also omitted in the output. Running a debugger, I can see that there is specific code to parse them, but, they get filtered out in final NavigateAndRegister().

What is the reason for this? This means that I won't see components used by these projects, which is a requirement for my SBOM output. This code was introduced in the "initial commit", so not much more information I can gather from git history.

When removing the early out for || library.Type == ProjectDependencyType, output seems to work fine. Except, the project references show up as "NuGet" references in the ScanManifest, instead of "project" references. I.e., they have " - NuGet" appended to their name and version.

@Whathecode
Copy link
Author

Whathecode commented Aug 22, 2024

Any input on this? As we are approaching another round of needed SBOM output, I'd like to assess whether we should at all rely on this tool. Maybe @melotic ?

@grvillic
Copy link
Contributor

grvillic commented Sep 20, 2024

Hi @Whathecode, for historical reasons these dependencies (framework / project) were being considered noisy by customers since they were related to the SDK itself not your app, this was indirectly triggering a ton of security alerts. That being said, after revisiting the problem and the importance of SBOM in the last few years, we concluded that we need to reintroduce all of these. This change should have happened downstream at report level based on customer needs, not at the detection level.

We need to tweak other processes downstream before shipping this but expect it to be released by end of October 2024.

@grvillic
Copy link
Contributor

grvillic commented Nov 5, 2024

Update: We are first validating the framework dependency rollout (see #1285). Once enabled by default, we will proceed with the project reference declaration. Framework dependencies should be included and rolled out by the end of November.

Due to the upcoming holiday season, we lack the resources to validate and ship the "project" references before December. Expect delivery early next year (January 2025).

@ericstj
Copy link
Member

ericstj commented Nov 6, 2024

Exposing project references as PackageReferences might be the right thing to do if those projects are packable and are not PrivateAssets. In those cases the project reference would become a package reference when packed, so the identity is correct and should map to a "real" package.

I wonder what should be done for project-references to non-packable projects (IsPackable=false), or to projects with PrivateAssets="All"

In the case of a non-packable project, the name of the project is not a true component name and could coincidently collide with actual package names but be completely different. In the case of private assets the project might have a reference to the project and it's dependencies at build - but those wouldn't be persisted if the project was packed. Including those might not be the right thing if you were trying to produce an SBOM for the shipping package.

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

3 participants