feat(sbom): NuGet licenses from .nuspec files, then nuget.org (#468)
NuGet SBOM entries carried no license: none of the files they come from names one. Fill it in after the NuGet components are merged (#467): - local first: the .nuspec of a restored package; <license type="expression"> as SPDX, type="file" as LicenseRef-file, an old <licenseUrl> mapped to SPDX for well-known license pages, else kept - then nuget.org: registration leaf (gzip) -> catalogEntry (inline or linked on api.nuget.org) -> licenseExpression / licenseFile / licenseUrl - only real ids at exact versions (no ranges, no DLL-metadata names); versions normalised as nuget.org files them (6.2.0.0 -> 6.2.0, 2.0 -> 2.0.0) - ids a nuget.config maps to another feed are never sent; a tree whose nuget.config lists another feed without a mapping is not looked up - through guarded_net, 8 at once, 10 s per request, 60 s and 300 uncached packages per scan; failures stay empty, one warning per scan - cached across tenants in the admin database (nuget_licenses, TTL: a year for a license, a week for none) - NUGET_LICENSE_LOOKUP=false turns the nuget.org step off Closes #467 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
This commit was merged in pull request #468.
This commit is contained in:
1 parent
04b4f32807
commit
34688fa322
9 files changed
+1582
-5
No files matched your search
@@ -109,6 +109,10 @@ Prüfwerk matches every SBOM component directly against two public vulnerability
|
||||
|
||||
Matches are stored as CVE alerts with CVSS scores and re-checked hourly, so newly published CVEs against an unchanged dependency still raise a notification.
|
||||
|
||||
## nuget.org -- NuGet Licenses
|
||||
|
||||
Licenses of NuGet packages that no `.nuspec` in the tree gives are read from the [nuget.org registration API](https://learn.microsoft.com/nuget/api/registration-base-url-resource) (`api.nuget.org`). Only the package id and version are sent, never for an id a `nuget.config` routes to another feed (see [.NET projects](/guide/dotnet-en)). The lookup is bounded per scan (8 requests at once, 10 s per request, 60 s and 300 uncached packages in total); answers are cached for all tenants. Set `NUGET_LICENSE_LOOKUP=false` to keep the agent from contacting nuget.org.
|
||||
|
||||
## Custom OAuth Scanner
|
||||
|
||||
A purpose-built scanner that detects OAuth and OIDC misconfigurations in your code, including:
|
||||
|
||||
Reference in new issue
Block a user