Minimal .NET/C# support for epic #445 (N1-N5; N6 out of scope): - N1: solutions and .csproj/.vbproj/.fsproj at any depth, old vs SDK style, TargetFramework(s)/TargetFrameworkVersion; recorded as target facts (dotnet_runtime, dotnet_solution, dotnet_project). - N2: NuGet components from packages.config, PackageReference (attribute, child element, VersionOverride, Directory.Packages.props), packages.lock.json, obj/project.assets.json and packages/<Id>.<Version>/ with pkg:nuget purls for OSV. PackageReference projects without lockfile or assets are reported as unresolved (sbom_dependencies). Target frameworks past Microsoft's end of support are findings (CWE-1104). - N3-lite: own semgrep rule pack cra_semgrep_csharp.yaml (SQLi, command injection, deserialization, XXE, path traversal, weak crypto/ECB, TLS validation off, hard-coded credentials) with semgrep --test cases; semgrep.rs runs every bundled pack. - N4: web.config/app.config checks (clear-text passwords, debug, customErrors, httpCookies, WCF security) and committed key/publish files. - N5: bin/obj beside projects, NuGet packages/, .vs, .nuget, TestResults are not own code. Control map bindings, fixtures/dotnet/framework48 with a test, and docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
.NET fixtures (#445)
Source trees standing for a .NET codebase, read by the unit test in
compliance-agent/src/pipeline/dotnet/fixture_tests.rs (no build, no network).
framework48
A .NET Framework 4.8 solution in the old project style, the way an industrial
Windows codebase often looks: a WPF client, an ASP.NET/WCF service and an old
tool, NuGet packages in packages.config and committed under packages/.
| What | Expected |
|---|---|
Plant.sln, three legacy .csproj (v4.8, v4.8, v4.0) |
one solution, three projects, runtime dotnet-framework |
Plant.Hmi/packages.config (EntityFramework 6.2.0, log4net 2.0.8, Newtonsoft.Json 12.0.1) |
three NuGet components; Newtonsoft.Json 12.0.1 has GHSA-5crp-9r3c-p9vr |
packages/Newtonsoft.Json.12.0.1/ |
the same component, not repeated; packages/ is not own code |
Plant.Web/Plant.Web.csproj with <PackageReference> BouncyCastle 1.8.5, no lockfile |
the component, and a sbom_dependencies skip: transitive packages unknown |
Plant.Web/Web.config |
clear-text password, debug compilation, WCF basicHttpBinding with security mode="None" |
Plant.Hmi/App.config |
nothing: integrated security, and a masked password |
Plant.Hmi/bin/Debug/Plant.Hmi.exe.config |
nothing: build output |
Plant.Legacy targeting v4.0 |
.NET Framework 4.0 out of support since 2016-01-12 |
Signing/Plant.snk (a 596-byte key pair; dummy bytes) |
signing key committed to the repository |
Plant.Web/OrderService.svc.cs |
C# rules: SQL by concatenation, BinaryFormatter, MD5, certificate validation off |