feat(manifest): socket manifest dotnet + centralized config-name globs (REA-627, REA-628)#1404
Conversation
…s (REA-627, REA-628) Bring .NET/NuGet to the Socket facts pipeline, at parity with the JVM tools. socket manifest dotnet (REA-627): - New command + auto-manifest detection (top-level .sln/.slnx/.csproj/.fsproj/ .vbproj) and setup-wizard entry; socket.json defaults.manifest.dotnet.*. - Bundled C# tool (socket-facts-dotnet): one MSBuild session — evaluate, in-process restore, read project.assets.json via NuGet.ProjectModel — emitting the shared records TSV. Ships no NuGet/MSBuild runtime assemblies (compile-low/run-high against the locator-selected SDK; net6 floor, RollForward LatestMajor), so it works across installed SDK versions. Restore forces TreatWarningsAsErrors=false so NU19xx security advisories don't abort the run. packages.config supported (flat closure + HintPath DLLs, with pinned-artifact download via the project's configured feeds). Fail-closed: emits failure records that raise the CLI exit code; every emitted artifact path is guaranteed to exist. - --target-frameworks / --exclude-target-frameworks (TFM globs; RID targets match under their base TFM); --dotnet-opts (MSBuild -p: props applied to the whole session). Reachability sidecar emits nuget-tagged ResolvedComponents. - Resolution summary reports scanned target frameworks across N projects, with per-project attribution under --verbose. Centralized config-name glob compilation (REA-628): - Compile --include-configs/--exclude-configs globs to anchored regex sources once in config-glob.mts; the gradle/sbt/maven scripts and the dotnet tool consume the compiled patterns. Removes the per-language globToRegex (Groovy/Scala/Java) and adds a cross-language vector test suite. Gated on coana REA-626 (nuget sidecar consumer): the coana version pin is bumped and this is un-drafted once coana releases.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Caution Review the following alerts detected in dependencies. According to your organization's Security Policy, you must resolve all "Block" alerts before proceeding. It is recommended to resolve "Warn" alerts too. Learn more about Socket for GitHub.
|
Closes REA-627. Closes REA-628.
Warning
Draft — do not merge until coana PR (REA-626) is released and the pinned coana version is bumped in this PR. The reachability sidecar emits nuget-tagged entries that the currently-released coana rejects (strict schema); a polyglot .NET+JVM
--reachscan would break until coana ships REA-626. The SBOM-only path (no--reach) is coana-independent.What
Brings .NET/NuGet to the Socket facts pipeline, at parity with the JVM tools (the .NET analog of REA-613). Previously
nugetwas only a package-scoring ecosystem — no manifest generation, no auto-detection, no reachability; the only path was a manualsocket manifest cdxgen -t dotnet.socket manifest dotnet(REA-627).sln/.slnx/.csproj/.fsproj/.vbproj) + setup-wizard entry;socket.jsondefaults.manifest.dotnet.*.scripts/dotnet-tool/): one MSBuild session — evaluate → in-process restore → readproject.assets.jsonviaNuGet.ProjectModel— emitting the shared records TSV.RollForward LatestMajor), so it works across installed SDKs and avoids the ref/def assembly clash that breaks multi-SDK hosts.TreatWarningsAsErrors=falsesoNU19xxsecurity-advisory warnings don't abort the run.developmentDependency→dev + HintPath DLLs; downloads missing pinned artifacts via the project's configured feeds/credential providers).failure/unscannablerecords that raise the CLI exit code; every emitted artifact path is guaranteed to exist.--target-frameworks/--exclude-target-frameworks(TFM globs; RID targets match under their base TFM);--dotnet-opts(MSBuild-p:props applied to the whole session).ResolvedComponents (consumed by coana REA-626).--verbose).Centralized config-name glob compilation (REA-628)
--include-configs/--exclude-configsglobs → anchored regex sources once inconfig-glob.mts; the gradle/sbt/maven scripts and the dotnet tool all consume the compiled patterns. Removes the per-languageglobToRegex(Groovy/Scala/Java) and adds a cross-language vector test suite. Rides in this PR because the .NET tool is a fourth consumer of the shared patterns.Testing
Unit tests (config-glob vectors, dotnet records→assemble, detection, auto-manifest branch, command snapshots); accuracy sweep vs. native-restore ground truth across 17 real .NET repos (~99.6% avg recall, exact real-package versions, packages.config 100%).
pnpm checkclean.Follow-ups before un-drafting