Syft names a DLL without a .deps.json by its version resource (product name, file version). pkg:nuget/DotNetZip%20Library@1.9.1.5 matches nothing in OSV; pkg:nuget/DotNetZip@1.9.1.5 matches GHSA-7378-6268-4278.
Change
syft.rs reads the CycloneDX properties; components with syft:package:metadataType = dotnet-portable-executable-entry carry their DLL paths.
New sbom/nuget_assembly.rs maps each such assembly, in this order:
DLL inside packages/<Id>.<Version>/ → that package
curated alias table, by assembly name and then by product name, with a version rule per package (Package, ThreeParts for Newtonsoft.Json's build counter, Unrelated for EntityFramework's 6.400.420.x file versions: the DLL only confirms a manifest entry)
assembly name (file name), if it is a valid NuGet id and not a project of the tree (project name / <AssemblyName>)
otherwise no purl; recorded as a CveLookupIncomplete gap ("NuGet: …") and cve_complete = false, like the other gaps OSV can't check
Versions use nuget_license::normalise_version (#467): 4.1.0.0 → 4.1.0, +build stripped. A non-zero 4th part is kept, because 1.9.1.5 is a real NuGet version.
Dedupe per (id, normalised version). SbomEntry gets evidence: Vec<String> (serde default, skipped when empty), and merge_nuget merges evidence instead of dropping the duplicate.
SbomScanner::generate now returns GeneratedSbom { entries, syft_failure, unmapped_assemblies }.
Decisions to review
Alias before file name. The brief said to prefer the AssemblyName over the product name. But DotNetZip 1.9.1.x ships lib/net20/Ionic.Zip.dll (checked on nuget.org), and Ionic.Zip is a different package. With the file name first, the fixture would become pkg:nuget/Ionic.Zip@…. The file name still wins over the raw product name.
Own assemblies excluded (added beyond the issue): if the file name fallback ran on them, the tree's own build output would go to OSV and, since #467, to nuget.org as package ids. They keep their entry, get no purl, and are not reported as unmapped.
Native pe-binary components (the unknown ecosystem ones) are left alone. Mapping native DLLs to NuGet would be guesswork.
Tests
nuget_assembly::tests: the DotNetZip fixture (DotNetZip Library 1.9.1.5 from Ionic.Zip.dll becomes pkg:nuget/DotNetZip@1.9.1.5), the Json.NET / log4net / Helix +build / Xceed / MigraDoc examples, DLL+manifest dedupe with evidence (EF unrelated version), the restored folder, own and unmapped assemblies, and non-.NET components passing through unchanged. Ran cargo fmt, cargo clippy -p compliance-agent --all-targets -D warnings, cargo test -p compliance-agent --lib (625 pass) and -p compliance-core --lib.
Docs: docs/guide/dotnet.md / dotnet-en.md have a new "Packages from DLLs" section.
Closes #460.
## Problem
Syft names a DLL without a `.deps.json` by its version resource (product name, file version). `pkg:nuget/DotNetZip%20Library@1.9.1.5` matches nothing in OSV; `pkg:nuget/DotNetZip@1.9.1.5` matches GHSA-7378-6268-4278.
## Change
- `syft.rs` reads the CycloneDX `properties`; components with `syft:package:metadataType = dotnet-portable-executable-entry` carry their DLL paths.
- New `sbom/nuget_assembly.rs` maps each such assembly, in this order:
1. DLL inside `packages/<Id>.<Version>/` → that package
2. curated alias table, by assembly name and then by product name, with a version rule per package (`Package`, `ThreeParts` for Newtonsoft.Json's build counter, `Unrelated` for EntityFramework's `6.400.420.x` file versions: the DLL only confirms a manifest entry)
3. assembly name (file name), if it is a valid NuGet id and **not** a project of the tree (project name / `<AssemblyName>`)
4. otherwise no purl; recorded as a `CveLookupIncomplete` gap ("NuGet: …") and `cve_complete = false`, like the other gaps OSV can't check
- Versions use `nuget_license::normalise_version` (#467): `4.1.0.0` → `4.1.0`, `+build` stripped. A non-zero 4th part is kept, because `1.9.1.5` is a real NuGet version.
- Dedupe per (id, normalised version). `SbomEntry` gets `evidence: Vec<String>` (serde default, skipped when empty), and `merge_nuget` merges evidence instead of dropping the duplicate.
- `SbomScanner::generate` now returns `GeneratedSbom { entries, syft_failure, unmapped_assemblies }`.
## Decisions to review
- **Alias before file name.** The brief said to prefer the AssemblyName over the product name. But DotNetZip 1.9.1.x ships `lib/net20/Ionic.Zip.dll` (checked on nuget.org), and `Ionic.Zip` is a different package. With the file name first, the fixture would become `pkg:nuget/Ionic.Zip@…`. The file name still wins over the raw product name.
- **Own assemblies excluded** (added beyond the issue): if the file name fallback ran on them, the tree's own build output would go to OSV and, since #467, to nuget.org as package ids. They keep their entry, get no purl, and are not reported as unmapped.
- Native `pe-binary` components (the `unknown` ecosystem ones) are left alone. Mapping native DLLs to NuGet would be guesswork.
## Tests
`nuget_assembly::tests`: the DotNetZip fixture (`DotNetZip Library 1.9.1.5` from `Ionic.Zip.dll` becomes `pkg:nuget/DotNetZip@1.9.1.5`), the Json.NET / log4net / Helix `+build` / Xceed / MigraDoc examples, DLL+manifest dedupe with evidence (EF unrelated version), the restored folder, own and unmapped assemblies, and non-.NET components passing through unchanged. Ran `cargo fmt`, `cargo clippy -p compliance-agent --all-targets -D warnings`, `cargo test -p compliance-agent --lib` (625 pass) and `-p compliance-core --lib`.
Docs: `docs/guide/dotnet.md` / `dotnet-en.md` have a new "Packages from DLLs" section.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
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
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.
Closes #460.
Problem
Syft names a DLL without a
.deps.jsonby its version resource (product name, file version).pkg:nuget/DotNetZip%20Library@1.9.1.5matches nothing in OSV;pkg:nuget/DotNetZip@1.9.1.5matches GHSA-7378-6268-4278.Change
syft.rsreads the CycloneDXproperties; components withsyft:package:metadataType = dotnet-portable-executable-entrycarry their DLL paths.sbom/nuget_assembly.rsmaps each such assembly, in this order:packages/<Id>.<Version>/→ that packagePackage,ThreePartsfor Newtonsoft.Json's build counter,Unrelatedfor EntityFramework's6.400.420.xfile versions: the DLL only confirms a manifest entry)<AssemblyName>)CveLookupIncompletegap ("NuGet: …") andcve_complete = false, like the other gaps OSV can't checknuget_license::normalise_version(#467):4.1.0.0→4.1.0,+buildstripped. A non-zero 4th part is kept, because1.9.1.5is a real NuGet version.SbomEntrygetsevidence: Vec<String>(serde default, skipped when empty), andmerge_nugetmerges evidence instead of dropping the duplicate.SbomScanner::generatenow returnsGeneratedSbom { entries, syft_failure, unmapped_assemblies }.Decisions to review
lib/net20/Ionic.Zip.dll(checked on nuget.org), andIonic.Zipis a different package. With the file name first, the fixture would becomepkg:nuget/Ionic.Zip@…. The file name still wins over the raw product name.pe-binarycomponents (theunknownecosystem ones) are left alone. Mapping native DLLs to NuGet would be guesswork.Tests
nuget_assembly::tests: the DotNetZip fixture (DotNetZip Library 1.9.1.5fromIonic.Zip.dllbecomespkg:nuget/DotNetZip@1.9.1.5), the Json.NET / log4net / Helix+build/ Xceed / MigraDoc examples, DLL+manifest dedupe with evidence (EF unrelated version), the restored folder, own and unmapped assemblies, and non-.NET components passing through unchanged. Rancargo fmt,cargo clippy -p compliance-agent --all-targets -D warnings,cargo test -p compliance-agent --lib(625 pass) and-p compliance-core --lib.Docs:
docs/guide/dotnet.md/dotnet-en.mdhave a new "Packages from DLLs" section.🤖 Generated with Claude Code
https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
8571b660a2to306b46b500