Dependency security updates and NSubstitute 6.0 upgrade#654
Open
jschick04 wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates centrally managed dependencies to address security advisories and upgrades the NSubstitute test framework to 6.0, migrating the affected unit tests to the new nullable-annotated API patterns.
Changes:
- Bump NuGet package versions and add/refresh security pins (AngleSharp, SQLitePCLRaw native bundle, assorted routine bumps).
- Upgrade NSubstitute to 6.0 and migrate tests from
callInfo.Arg<T>()/ indexer casts tocallInfo.ArgAt<T>(n). - Update NSubstitute argument matchers in tests to include explicit null guards required by the new nullable annotations.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Packages.props | Central package version bumps and security pins (SQLite native bundle override, AngleSharp transitive pin). |
| tests/Unit/EventLogExpert.Windows.Tests/ActivationDispatcherTests.cs | Use CallInfo.ArgAt<T>(0) for main-thread delegate extraction under NSubstitute 6. |
| tests/Unit/EventLogExpert.UI.Tests/LogTable/LogTablePaneGroupingTests.cs | Migrate captured arguments to ArgAt and add null guards in matchers. |
| tests/Unit/EventLogExpert.UI.Tests/FilterPane/FilterPaneTests.cs | Add null guard to Arg.Is<IReadOnlyList<SavedFilter>> matcher. |
| tests/Unit/EventLogExpert.UI.Tests/FilterLibrary/LibrarySavedTabHeaderTests.cs | Add null guard to announcement string matcher. |
| tests/Unit/EventLogExpert.UI.Tests/FilterLibrary/LibraryEntryRowTests.cs | Add null guards to matchers; migrate call[2] access to ArgAt(2). |
| tests/Unit/EventLogExpert.UI.Tests/FilterLibrary/FilterLibraryModalTests.cs | Migrate CallInfo.Arg<T>() to ArgAt, and add null guards to matchers. |
| tests/Unit/EventLogExpert.UI.Tests/FilterEditor/ScenarioClipboardExporterTests.cs | Add null guard to exported warning message matcher. |
| tests/Unit/EventLogExpert.UI.Tests/DetailsPane/DetailsPaneTests.cs | Add null guard to clipboard text matcher. |
| tests/Unit/EventLogExpert.UI.Tests/DatabaseTools/Tabs/ManageDatabasesTabTests.cs | Add null guards to matchers; minor whitespace/formatting changes in selection-mode tests. |
| tests/Unit/EventLogExpert.UI.Tests/DatabaseTools/Tabs/CreateDatabaseTabTests.cs | Use ArgAt<CreateDatabaseRequest>(0) for request extraction in Returns callback. |
| tests/Unit/EventLogExpert.UI.Tests/Database/DatabaseRecoveryHostTests.cs | Replace call[0] casts with ArgAt<T>(0) for main-thread callbacks. |
| tests/Unit/EventLogExpert.UI.Tests/Database/DatabaseEntryRowTests.cs | Migrate context menu captured argument to ArgAt(2); add null guard in matcher. |
| tests/Unit/EventLogExpert.UI.Tests/Dashboard/EmptyStateDashboardTests.cs | Add null guards to scenario and announcement matchers. |
| tests/Unit/EventLogExpert.UI.Tests/Banner/CriticalBannerTests.cs | Add null guard to clipboard-copy matcher. |
| tests/Unit/EventLogExpert.UI.Tests/Banner/AttentionBannerTests.cs | Add null guards to error banner message matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/Update/UpdateServiceTests.cs | Add null guards to update failure alert message matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/Update/Deployment/DeploymentServiceTests.cs | Migrate CallInfo.Arg<T>() to ArgAt, add null guards for Uri/options/message matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/Scenarios/ScenarioLaunchServiceTests.cs | Add null guards to dispatched action matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/Scenarios/ScenarioApplyServiceTests.cs | Add null guards; migrate captured dispatch argument to ArgAt(0). |
| tests/Unit/EventLogExpert.Runtime.Tests/Scenarios/ScenarioApplyIntegrationTests.cs | Migrate captured dispatch argument to ArgAt(0). |
| tests/Unit/EventLogExpert.Runtime.Tests/Scenarios/Favorites/ScenarioFavoriteCommandsTests.cs | Add null guards to action matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/Scenarios/Favorites/EffectsTests.cs | Add null guards to dispatched action matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/LogTable/EffectsTests.cs | Add null guards to dispatched action and preference matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/FilterPane/EffectsTests.cs | Add null guards to dispatched action matchers (including date-range success cases). |
| tests/Unit/EventLogExpert.Runtime.Tests/FilterLibrary/FilterLibraryEffectsTests.cs | Migrate captured args to ArgAt; add null guards throughout matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/FilterLibrary/FilterLibraryCommandsTests.cs | Add null guards to dispatched action matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/FilterLenses/FilterLensEffectsTests.cs | Add null guard to dispatched action matcher. |
| tests/Unit/EventLogExpert.Runtime.Tests/FilterLenses/FilterLensCommandsTests.cs | Add null guards to dispatched action matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/EventLog/PartialLoadCoordinatorTests.cs | Migrate captured dispatch argument to ArgAt(0). |
| tests/Unit/EventLogExpert.Runtime.Tests/EventLog/EffectsTests.cs | Add null guards to dispatched action matchers; migrate captured args to ArgAt(0). |
| tests/Unit/EventLogExpert.Runtime.Tests/EventLog/DatabaseCoordinationEffectsReloadTests.cs | Migrate call.Args()[0] usage to ArgAt(0); add null guards to matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/Database/DatabaseOperationCoordinatorTests.cs | Add null guards to message and set/list matchers. |
| tests/Unit/EventLogExpert.Runtime.Tests/Alerts/AlertDialogServiceTests.cs | Add null guards to inline alert request matcher; migrate main-thread delegate extraction to ArgAt(0). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4 tasks
jschick04
force-pushed
the
fix/anglesharp-cve
branch
from
July 19, 2026 07:57
0600500 to
88bbf9c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dependency security updates plus the NSubstitute 6.0 test-framework upgrade, split into two commits so the urgent security fix can be reviewed and reverted independently of the test migration.
Commit 1 - Bump dependencies and refresh security pins
$(MauiVersion)) and Microsoft.WindowsAppSDK 2.2.0 - WindowsAppSDK tracks the MAUI head transitive resolution and cannot be validated locally.Commit 2 - Upgrade NSubstitute to 6.0.0 and migrate test matchers
NSubstitute 6.0 enables nullable-reference annotations on its public API, breaking compilation under TreatWarningsAsErrors across 33 test files (~210 matcher guards + ~67 CallInfo accessors). Uniform, behavior-preserving migration:
Arg.Is<T>(x => BODY)dereferencing x ->Arg.Is<T>(x => x != null && BODY)(an is-not-null pattern is illegal in an expression tree;!= nullcompiles there and still narrows nullability).callInfo.Arg<T>()/((T)callInfo[N])->callInfo.ArgAt<T>(N)(non-null typed positional accessor).Includes a test-quality audit of every touched test (remove tautologies / weak-redundant assertions). All touched tests exercise real behavior, so 0 removals.
Validation
dotnet list package --vulnerable-> 35 projects, no vulnerable packages.Notes