clearlydefined / clearlydefined/service

NuGet packages being detected as Private instead of Public (ex: CsWinRT)

Open
#994 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
51
Forks
46
PR merge metrics
No merged PRs in 30d

Description

I'm trying to generate a `NOTICE.txt` file using Component Governance tooling, but I'm running into cases where the tooling appears to detect *public* NuGet packages as *private*, instead of public (for example, the [CsWinRT](https://www.nuget.org/packages/Microsoft.Windows.CsWinRT/) package).

Here's what the Notice file reports when downloading the generated file:
![image](https://github.com/clearlydefined/service/assets/29107334/8cbda1a2-69b8-4c87-b40f-240e8145f8a2)

I'm not sure exactly what might be causing this though. As far as I can tell we're not doing anything out-of-the-ordinary in our repo...

Here's how we refer to the CsWinRT package, from a `csproj` file:

```xml


net6.0-windows10.0.22621.0




```

We have a single private feed setup in our repo (as this is required by policy for security reasons), and it has upstream sources for public NuGet packages. This is what our top-level `nuget.config` file looks like in the repo:

```xml




```

The private feed has the public NuGet Gallery listed as an "Upstream Source":
![image](https://github.com/clearlydefined/service/assets/29107334/2631d28c-27c8-4fbe-b679-ba20006cd728)

Looking at the feed, it shows that the Microsoft.Windows.CsWinRT 2.0.0 package comes from the public NuGet Gallery feed:
![image](https://github.com/clearlydefined/service/assets/29107334/6e0534ef-8764-40d3-a09a-d3eb7642841c)

Looking at our pipeline, I can see that the Component Governance Detection task successfully detects the CsWinRT package:

```
--- Component: ---
Microsoft.Windows.CsWinRT 2.0.0 - NuGet
--- Found at: ---
/csprojection/full/ProjectName.projection.csproj
/csprojection/Core/ProjectName.Core.projection.csproj
```

FWIW, there is an entry here for CsWinRT:
https://clearlydefined.io/definitions/nuget/nuget/-/Microsoft.Windows.CsWinRT/2.0.0

So, I'm not sure where/how it determines what is the package source, and why it gets flagged as "not public".

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.