8b58d14ca9b259bc968d5bdc6bc0e00cf53ea044
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8b58d14ca9 |
feat(sbom): transitive NuGet packages resolved from nuget.org metadata (#461)
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 8m6s
Closes #461. SDK-style projects without packages.lock.json or obj/project.assets.json named only their direct packages, and each was its own "Nicht ausgeführt" entry. - sbom/nuget_resolve.rs resolves the transitive graph from nuget.org's catalog entries (dependencyGroups per target framework) with NuGet's rules: a direct reference fixes its version, a dependency takes its range's lower bound, the highest of several; the dependency group nearest the project's framework applies (.NET Framework, .NET/.NET Core, .NET Standard incl. the Framework→Standard map, framework-free). Frameworks from TargetFramework(s) or TargetFrameworkVersion. - No dotnet restore: it evaluates the repository's MSBuild files, which can run code. Requests go through the guarded nuget.org registry of #467 (shared catalog() fetch), honour nuget.config/packageSourceMapping (an id routed to another feed is never asked about, direct ones included), and are capped (400 lookups, 90 s per scan). - A project counts as resolved only when every package of its graph was answered; the rest stay a gap, now ONE sbom_dependencies entry naming all such projects ("A.csproj, B.csproj and N more"). What was found is in the SBOM either way, with evidence "<project> (transitive, nuget.org)"; licences are filled by the existing lookup. - packages.config projects need nothing: the file lists every installed package, transitive ones included. - Switch NUGET_TRANSITIVE_RESOLVE: on by default, off with APP_ENV=production until tested on stage. - Tests: fake nuget.org (framework group choice, lowest applicable, direct pin, missing package, private feed), framework/range parsing, the aggregated gap; an ignored test against the real nuget.org (Serilog.Sinks.File 5.0.0 on net48 → Serilog 2.10.0) passes. - Docs (dotnet DE/EN); staging test plan: check 16. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p |
||
|
|
d8c52192d9 |
fix(sbom): .NET assemblies from DLL metadata mapped to NuGet ids (#460) (#474)
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 |
||
|
|
34688fa322 |
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 |
||
|
|
8926255d6f |
feat(dotnet): .NET detection, NuGet SBOM, C# rules and config checks (#447)
Minimal .NET/C# support for epic #445 (N1-N5): detection of solutions/projects and target frameworks, NuGet SBOM without build or restore (pkg:nuget purls for OSV, unresolved-dependency warning, end-of-support frameworks), own C# semgrep rule pack, .NET configuration and key-file checks, .NET build output and restored packages not counted as own code. Fixture fixtures/dotnet/framework48, docs .NET-Projekte (DE/EN). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB |