feat(dotnet): .NET detection, NuGet SBOM, C# rules and config checks #447

Merged
sharang merged 3 commits from feat/dotnet-minimal into main 2026-10-05 14:38:14 +00:00
3 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 64ddaf37c1 fix(sast): stage every rule pack under a per-call unique tmp name
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 9m24s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 16:27:00 +02:00
Sharang ParnerkarandClaude Opus 5.5 4f27ddaef2 fix(dotnet): tighter packages/ detection; var forms in C# rules
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 16:27:00 +02:00
Sharang ParnerkarandClaude Opus 5.5 2bafe12b2a feat(dotnet): .NET detection, NuGet SBOM, C# rules and config checks
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
2026-10-05 16:27:00 +02:00