fix(sbom): .NET assemblies from DLL metadata mapped to NuGet ids (#460)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 10m42s
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 10m42s
Syft names a DLL without a .deps.json by its version resource: product name and file version. As a purl that is no NuGet package, so OSV matched nothing: pkg:nuget/DotNetZip%20Library@1.9.1.5 has no advisory, pkg:nuget/DotNetZip@1.9.1.5 has GHSA-7378-6268-4278. Syft's dotnet-portable-executable-entry components are now mapped, in this order: - a DLL inside packages/<Id>.<Version>/ is that package - a curated alias table, by assembly name (file name) and then product name (DotNetZip Library -> DotNetZip, Json.NET -> Newtonsoft.Json, Apache log4net -> log4net, Xceed Toolkit for WPF -> Extended.Wpf.Toolkit, empira MigraDoc -> PDFsharp-MigraDoc), with how the package's file versions relate to its versions (Newtonsoft.Json: first three parts; EntityFramework: unrelated, so the DLL only confirms a manifest entry) - the assembly name, when it is a valid NuGet id and not one of the tree's own projects (project name or <AssemblyName>), whose names are not sent to OSV or nuget.org - otherwise no purl, and the scan records the assembly as not matched against OSV Alias before file name: DotNetZip ships Ionic.Zip.dll, and Ionic.Zip is a different package. Versions go through nuget_license's normalise_version (4.1.0.0 -> 4.1.0, +build dropped); a non-zero fourth part stays (1.9.1.5 is a real NuGet version). One package found in several DLLs, or in a DLL and a manifest, is one entry: SbomEntry gains `evidence` (the manifests and DLLs it was read from), and merge_nuget compares normalised versions and merges the evidence instead of dropping it. Native pe-binary components are left as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
This commit is contained in:
1 parent
34688fa322
commit
8571b660a2
9 files changed
+801
-46
No files matched your search
@@ -33,6 +33,20 @@ wird gegen OSV (Ökosystem NuGet) abgeglichen. Ein Versionsbereich (`7.*`,
|
||||
`[1.0,2.0)`) steht ohne purl in der Stückliste, mit dem Bereich als
|
||||
Anforderung.
|
||||
|
||||
**Pakete aus DLLs.** Syft liest auch DLLs (in `bin/`, `lib/`, irgendwo
|
||||
eingecheckt) und benennt sie nach ihrer Versionsressource: Produktname und
|
||||
Dateiversion (`DotNetZip Library 1.9.1.5`, `Json.NET 13.0.1.25517`). Diese
|
||||
werden dem NuGet-Paket zugeordnet: eine DLL in `packages/<Id>.<Version>/` ist
|
||||
dieses Paket; bekannte Produkt- und Assembly-Namen über eine gepflegte Tabelle
|
||||
(`DotNetZip Library` → `DotNetZip`, `Json.NET` → `Newtonsoft.Json`, …); sonst
|
||||
ist der Assembly-Name (Dateiname) die Id. Versionen werden normalisiert, wie
|
||||
NuGet sie führt (`4.1.0.0` → `4.1.0`, `+build`-Metadaten entfallen). DLLs der
|
||||
eigenen Projekte (Projektname oder `<AssemblyName>`) erhalten keine purl. Eine
|
||||
DLL ohne Zuordnung bleibt ohne purl in der Stückliste und wird im Scan als
|
||||
nicht gegen OSV abgeglichen ausgewiesen. Ein Paket, das an mehreren Stellen
|
||||
vorkommt (Manifest und DLL, mehrere DLLs), ist ein Eintrag mit allen
|
||||
Fundstellen als Nachweis.
|
||||
|
||||
**Lizenzen der NuGet-Pakete.** Zuerst aus der `.nuspec` eines
|
||||
wiederhergestellten Pakets (`packages/<Id>.<Version>/`): `<license
|
||||
type="expression">` als SPDX-Ausdruck, `<license type="file">` als
|
||||
|
||||
Reference in new issue
Block a user