Skip to content

Fix #192 fallout: per-TFM DI.Abstractions alignment + S2077 pragma#197

Merged
Chris-Wolfgang merged 3 commits into
mainfrom
fix/per-tfm-dep-alignment
Jul 5, 2026
Merged

Fix #192 fallout: per-TFM DI.Abstractions alignment + S2077 pragma#197
Chris-Wolfgang merged 3 commits into
mainfrom
fix/per-tfm-dep-alignment

Conversation

@Chris-Wolfgang

@Chris-Wolfgang Chris-Wolfgang commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Cleans up two pieces of collateral damage from the Dependabot group bump #192, both in the shipped EntityFrameworkCore project, needed before tagging v0.1.1.

1. Per-TFM DI.Abstractions alignment

#192 flattened Microsoft.Extensions.DependencyInjection.Abstractions on net6/net8 to 10.0.9, forcing those consumers onto the 10.x transitive floor and breaking per-TFM pinning.

TFM #192 This PR
net6.0 10.0.9 ❌ 6.0.0
net8.0 10.0.9 ❌ 8.0.2
net10.0 10.0.0 ✅ 10.0.0

2. S2077 pragma on schema-installer DROPs

#192 also bumped SonarAnalyzer.CSharp 10.27 → 10.28, which strengthened S2077 and now flags the two interpolated DROP TABLE statements in AuditSchemaInstaller — a pre-existing main breakage #192's stale Stage 2 run missed (fires on net10 too). Identifiers are already validated + provider-quoted and come from AuditOptions, not user input; DDL identifiers can't be parameterized. Extended the existing EF1002 pragma to cover S2077.

Both build clean across all TFMs (incl. --no-incremental to exercise Sonar's symbolic-execution rules).

Dependabot's group bump (#192) flattened Microsoft.Extensions.DependencyInjection
.Abstractions on the net6.0 and net8.0 targets of the shipped EntityFrameworkCore
package to 10.0.9, forcing net6/net8 consumers onto the 10.x transitive floor and
breaking the repo's per-TFM pinning convention (EF Core Relational stays 6/8/10).

Restore net6.0 -> 6.0.0 and net8.0 -> 8.0.2 (their pre-#192 values); net10.0 keeps
10.0.0. Builds clean across all TFMs with no downgrade.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 5, 2026 00:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores the intended per-target-framework (per-TFM) lower-bound dependency alignment for Microsoft.Extensions.DependencyInjection.Abstractions in the shipped Wolfgang.AuditTrail.EntityFrameworkCore package, undoing the net6/net8 flattening introduced by the Dependabot group bump in #192.

Changes:

  • Set Microsoft.Extensions.DependencyInjection.Abstractions lower bound back to 6.0.0 for net6.0.
  • Set Microsoft.Extensions.DependencyInjection.Abstractions lower bound back to 8.0.2 for net8.0.
  • Leave net10.0 unchanged at 10.0.0, maintaining the existing per-TFM mapping.

#192 bumped SonarAnalyzer.CSharp 10.27 -> 10.28, which strengthened S2077 (SQL
injection via string formatting) and now flags the two interpolated DROP TABLE
statements in AuditSchemaInstaller.DropTablesAsync — a pre-existing failure that
#192's stale Stage 2 run missed (it fires on net10 too, untouched by this branch).

The identifiers are already validated (EnsureSafeIdentifier) and provider-quoted
(QuoteIdentifier), and come from AuditOptions, not user input; DDL identifiers
cannot be parameterized. Extend the existing EF1002 pragma to cover S2077 with
that justification. AuditSchemaMigrator passes EF-generated CommandText (a plain
variable, not interpolated) so S2077 doesn't fire there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Chris-Wolfgang Chris-Wolfgang changed the title Restore per-TFM DI.Abstractions alignment broken by #192 Fix #192 fallout: per-TFM DI.Abstractions alignment + S2077 pragma Jul 5, 2026
The SonarAnalyzer 10.28 bump (via #192) also flags the interpolated DELETE FROM
{table} reset statements in ProviderSaveChangesBenchmarks. Table names are
hardcoded provider-switch literals (no user input); extend the existing EF1002
pragma to cover S2077. Verified the full solution builds clean with
--no-incremental (which exercises Sonar's symbolic-execution rules).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Chris-Wolfgang
Chris-Wolfgang merged commit 9a3292d into main Jul 5, 2026
15 checks passed
@Chris-Wolfgang
Chris-Wolfgang deleted the fix/per-tfm-dep-alignment branch July 5, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants