Skip to content

chore: keep Dependabot security pins of build-only packages out of src/ - #53

Merged
CaffeinatedCoder merged 1 commit into
mainfrom
chore/dependabot-build-only-pins-52
Oct 18, 2026
Merged

CaffeinatedCoder merged 1 commit into
mainfrom
chore/dependabot-build-only-pins-52

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #52

Problem

Dependabot security updates opened #49, #50 and #51, which add direct System.Security.Cryptography.Pkcs / .Xml references to src/EFCore.ComplexIndexes. Both packages reach the core package only through Microsoft.EntityFrameworkCore.Design (PrivateAssets=all). Merging any of these PRs would make the core nuspec declare a dependency consumers never had. Every check passed on all three.

Why Xml got past its ignore: the src/ job (run 39130476774) loaded the ignore and logged Skipping ignored dependency System.Security.Cryptography.Xml each time, and it opened only #50 (Pkcs, which no ignore list named). #49 and #51 came from the test-project job (run 39130476958). That job's ignore list holds only the EF Core and Npgsql entries. It followed the ProjectReference and wrote Pinned … in /src/EFCore.ComplexIndexes/EFCore.ComplexIndexes.csproj. An ignore under src/ covers only one of the two jobs that can edit src/.

Change

  • .github/dependabot.yml: ignore System.Security.Cryptography.Xml and .Pkcs under both nuget entries, with a comment on why the test entry needs them.
  • PackagingConventionTests.No_public_reference_pins_a_build_only_dependency: reads each shipping project's obj/project.assets.json and fails a public PackageReference that a PrivateAssets=all reference reaches and no other public reference does. That is the shape of a Dependabot pin, and the test catches it whichever job writes it. A pin of a package some other public dependency already ships (e.g. Pkcs via EF's SQL Server provider) is not flagged. Core's Microsoft.EntityFrameworkCore.Abstractions is reached through Design too, but it is public on purpose, because it carries the [10.0.0, 11.0.0) ceiling. It is the one named exemption, and an exemption that no longer exempts anything fails the test.
  • CLAUDE.md: both of the above.

Tests

Full suite locally: 347 passed (including PostgreSQL 18 integration). How I checked the guard:

Whether the new ignores hold can only be confirmed on Dependabot's next run, by watching whether the PRs come back after #49–#51 are closed.

🤖 Generated with Claude Code

On 2026-10-18 Dependabot opened #49 and #51, which pin System.Security.Cryptography.Pkcs
and .Xml directly in src/EFCore.ComplexIndexes. Both packages reach the core package only
through Microsoft.EntityFrameworkCore.Design (PrivateAssets=all), so the pins would ship
them to every consumer. The src/ job skipped Xml as configured. The test-project job,
whose ignore list lacked it, followed the ProjectReference and wrote the pin into the
src/ csproj. The grouped src/ job opened #50 for Pkcs, which no ignore list named.

- dependabot.yml: ignore Xml and Pkcs under both nuget entries, and say why the test
  entry needs them.
- PackagingConventionTests: fail a public reference that a build-only reference reaches
  and no other public reference does, read from each project's restore graph. Core's
  EF Core Abstractions reference (the [10, 11) ceiling) is the one named exemption, and
  an exemption that exempts nothing fails too.
- CLAUDE.md: describe both.

Closes #52

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder added chore Build, CI, packaging, refactoring with no behaviour change package/core Affects EFCore.ComplexIndexes area/release Versioning, changelogs, release wiring labels Oct 18, 2026
@CaffeinatedCoder
CaffeinatedCoder merged commit 4e83df4 into main Oct 18, 2026
@CaffeinatedCoder
CaffeinatedCoder deleted the chore/dependabot-build-only-pins-52 branch October 18, 2026 14:54
CaffeinatedCoder added a commit that referenced this pull request Oct 18, 2026
Brings in #45 (tracking culture, two supported lines), #48 (Latest handling) and #53
(Dependabot build-only pins).

Conflicts: ChangelogConsistencyTests, PackagingConventionTests and
SecurityPolicyConsistencyTests, all resolved to main. 2085324 added a SemanticVersion
harness type here so the convention tests could read 11.0.0-preview.1; #45 solved the
same problem on main with ReleaseVersion (prerelease parsing, SemVer precedence, the
"## <version>" heading with a suffix) and made the security-policy checks aware of two
lines. SemanticVersion is unused after the merge and is removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, release wiring chore Build, CI, packaging, refactoring with no behaviour change package/core Affects EFCore.ComplexIndexes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependabot security updates add direct System.Security.Cryptography.* references to src/, despite the ignore list

1 participant