# .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 `` 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 | ## `legacy-sample` A small .NET Framework 4.8 library in C# and VB.NET with a `Web.config`, planted for DevSkim (#494), which reads it without a build. Also a nightly target (`dotnet-legacy-sample`), as is `framework48` (`dotnet-framework48`). | What | Expected (DevSkim rule) | |---|---| | `TelemetryClient.cs`: `SecurityProtocolType.Ssl3` | outdated / hard-coded TLS version (DS440020, DS144436), CWE-757 | | `TelemetryClient.cs`: `ServerCertificateValidationCallback = … => true` | certificate validation off (DS126187), CWE-295 | | `TelemetryClient.cs`: `DESCryptoServiceProvider` | broken cipher (DS106864), CWE-327 | | `TelemetryClient.cs`: `XmlResolver = new XmlUrlResolver()` | XML external entities (DS132783), CWE-611 | | `LegacyLink.vb`: `SHA1.Create()` | nothing from DevSkim (its word match DS126858 is switched off as too noisy) | | `LegacyLink.vb`: `BinaryFormatter.Deserialize` | unsafe deserialisation (DS425070), CWE-502 | | `Web.config`: ``, `requireSSL="false"` | tracing on (DS450002, CWE-489), cookies without Secure (DS450001, CWE-614) | In `framework48`, DevSkim finds the `BinaryFormatter` (DS425070) in `OrderService.svc.cs` (the MD5 hash there is our own semgrep rule's); `packages/` and `bin/` are not read.