fix: resolve OpenApi/NPOI vulnerable package and all build warnings - #832
Merged
KrzysztofPajak merged 2 commits intoSep 12, 2026
Merged
Conversation
- Downgrade Microsoft.OpenApi 3.10.2 -> 2.12.2: Microsoft.AspNetCore.OpenApi 10.0.12 (current .NET 10 release) requires OpenApi <3.0.0; its source generator targets the 2.x API surface where IOpenApiMediaType.Example is writable, causing CS0200 build errors against OpenApi 3.x. - Pin transitive Microsoft.Build.Tasks.Git to 10.0.401 (moderate CVE GHSA-23fw-v26w-5fgq) via a direct PackageReference in Grand.Business.Common (pulled in by ExcelMapper -> NPOI -> Microsoft.SourceLink.GitHub 8.0.0; NPOI 2.8.0 is already latest so it can't be bumped further). - CS8632: add missing #nullable enable to 10 test files that already used nullable annotations without the pragma. - CS0618: remove the now-redundant PowerExcelExtensions.Rows(ISheet) extension - NPOI 2.8.0's ISheet implements IEnumerable<IRow> natively; fix the obsolete RedisConnectionException constructor call in a test. - CS8604: widen IReportDataScope.CanIncludeProduct to Product? - passing null is the documented, intentional fail-closed signal for Vendor's scope. - CS9107/CS9124: eliminate the double-capture of primary-constructor parameters that are both forwarded to base() and reused by the derived controller, across the Tax/Discount/EmailAccount/MessageTemplate/ OnlineCustomer/Reports/Order/Blog/News/Page Base*Controller hierarchy - reuse each base's already-established protected accessor pattern instead of re-capturing the parameter in the derived class. Verified: full solution build (0 errors, 1 pre-existing unrelated warning) and Grand.Web.Admin.Tests/Grand.Web.Store.Tests/Grand.Infrastructure.Tests/ Grand.Business.Common.Tests all pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013y3MqvZq7y1Uc5p4JZad2i
# Conflicts: # src/Web/Grand.Web.Admin/Controllers/TaxController.cs
KrzysztofPajak
deleted the
chore/openapi-vulnerable-packages-and-warnings
branch
September 12, 2026 06:17
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
Microsoft.OpenApi3.10.2 -> 2.12.2:Microsoft.AspNetCore.OpenApi10.0.12 (current .NET 10 release) requires OpenApi<3.0.0; its source generator targets the 2.x API surface whereIOpenApiMediaType.Exampleis writable, causingCS0200build errors against OpenApi 3.x.Microsoft.Build.Tasks.Gitto 10.0.401 (moderate CVE GHSA-23fw-v26w-5fgq) via a directPackageReferenceinGrand.Business.Common(pulled in byExcelMapper -> NPOI -> Microsoft.SourceLink.GitHub 8.0.0; NPOI 2.8.0 is already latest so it can't be bumped further).#nullable enableto 10 test files that already used nullable annotations without the pragma.PowerExcelExtensions.Rows(ISheet)extension — NPOI 2.8.0'sISheetimplementsIEnumerable<IRow>natively; fix the obsoleteRedisConnectionExceptionconstructor call in a test.IReportDataScope.CanIncludeProducttoProduct?— passingnullis the documented, intentional fail-closed signal for Vendor's scope.base()and reused by the derived controller, across the Tax/Discount/EmailAccount/MessageTemplate/OnlineCustomer/Reports/Order/Blog/News/PageBase*Controllerhierarchy — reuse each base's already-established protected accessor pattern instead of re-capturing the parameter in the derived class.Test plan
ASPIRE010).dotnet list ... --vulnerableacross the whole solution: 0 vulnerable packages.Grand.Web.Admin.Tests(1479),Grand.Web.Store.Tests(158),Grand.Infrastructure.Tests(155),Grand.Business.Common.Tests(127) all pass.🤖 Generated with Claude Code