Every NuGet SBOM entry of a pilot scan has an empty license (126/126). Licenses are only filled for Cargo today (enrich_cargo_licenses).
Why NuGet entries have none:
packages.config / <PackageReference> / lockfiles / project.assets.json carry no license
the packages/ folder (with <id>.nuspec) is often not committed (and stripped by our import)
DLL-metadata entries never carry one
Tasks
enrich_nuget_licenses after the NuGet components are collected:
local first: packages/<Id>.<Version>/<Id>.nuspec (and any *.nuspec beside a restored package) → <license type="expression"> → SPDX; <license type="file"> → LicenseRef-file; old <licenseUrl> → mapped to SPDX for well-known URLs, else kept as URL
then nuget.org: registration API https://api.nuget.org/v3/registration5-gz-semver2/<id-lower>/<version-lower>.json → catalogEntry.licenseExpression / licenseUrl
only for entries with a real NuGet id and exact version (purl pkg:nuget/…); skip ranges and DLL-metadata names (#460)
Bounded: concurrency limit, per-request timeout, total time budget; failures leave the license empty and are logged once per run (no stage failure)
Cache per (id, version) in Mongo (global, not per tenant: public data), TTL long (licenses of a published version do not change)
Later, same pattern: npm (license in registry), Maven/Gradle (POM <licenses>)
Follow-up value: commercial components (e.g. UI toolkits under proprietary EULAs) become visible in the SBOM, relevant for CRA and licence compliance.
Source: first pilot scans on prod (2026-10-05). Target: in the next prod promotion.
Every NuGet SBOM entry of a pilot scan has an empty license (126/126). Licenses are only filled for Cargo today (`enrich_cargo_licenses`).
Why NuGet entries have none:
- `packages.config` / `<PackageReference>` / lockfiles / `project.assets.json` carry no license
- the `packages/` folder (with `<id>.nuspec`) is often not committed (and stripped by our import)
- DLL-metadata entries never carry one
## Tasks
1. `enrich_nuget_licenses` after the NuGet components are collected:
- local first: `packages/<Id>.<Version>/<Id>.nuspec` (and any `*.nuspec` beside a restored package) → `<license type="expression">` → SPDX; `<license type="file">` → `LicenseRef-file`; old `<licenseUrl>` → mapped to SPDX for well-known URLs, else kept as URL
- then nuget.org: registration API `https://api.nuget.org/v3/registration5-gz-semver2/<id-lower>/<version-lower>.json` → `catalogEntry.licenseExpression` / `licenseUrl`
- only for entries with a real NuGet id and exact version (purl `pkg:nuget/…`); skip ranges and DLL-metadata names (#460)
2. Bounded: concurrency limit, per-request timeout, total time budget; failures leave the license empty and are logged once per run (no stage failure)
3. Cache per (id, version) in Mongo (global, not per tenant: public data), TTL long (licenses of a published version do not change)
4. `net_guard`: allow api.nuget.org like api.osv.dev
5. Tests: nuspec expression / file / licenseUrl, registration JSON fixture, network failure → empty, cache hit
6. Later, same pattern: npm (`license` in registry), Maven/Gradle (POM `<licenses>`)
Follow-up value: commercial components (e.g. UI toolkits under proprietary EULAs) become visible in the SBOM, relevant for CRA and licence compliance.
_Source: first pilot scans on prod (2026-10-05). Target: in the next prod promotion._
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Every NuGet SBOM entry of a pilot scan has an empty license (126/126). Licenses are only filled for Cargo today (
enrich_cargo_licenses).Why NuGet entries have none:
packages.config/<PackageReference>/ lockfiles /project.assets.jsoncarry no licensepackages/folder (with<id>.nuspec) is often not committed (and stripped by our import)Tasks
enrich_nuget_licensesafter the NuGet components are collected:packages/<Id>.<Version>/<Id>.nuspec(and any*.nuspecbeside a restored package) →<license type="expression">→ SPDX;<license type="file">→LicenseRef-file; old<licenseUrl>→ mapped to SPDX for well-known URLs, else kept as URLhttps://api.nuget.org/v3/registration5-gz-semver2/<id-lower>/<version-lower>.json→catalogEntry.licenseExpression/licenseUrlpkg:nuget/…); skip ranges and DLL-metadata names (#460)net_guard: allow api.nuget.org like api.osv.devlicensein registry), Maven/Gradle (POM<licenses>)Follow-up value: commercial components (e.g. UI toolkits under proprietary EULAs) become visible in the SBOM, relevant for CRA and licence compliance.
Source: first pilot scans on prod (2026-10-05). Target: in the next prod promotion.