This repository was archived by the owner on Jul 23, 2026. It is now read-only.
Fix Snyk findings: drop AspNetCore 2.2.0 meta-package & bump AutoMapper - #1
Open
kisst wants to merge 2 commits into
Open
Fix Snyk findings: drop AspNetCore 2.2.0 meta-package & bump AutoMapper#1kisst wants to merge 2 commits into
kisst wants to merge 2 commits into
Conversation
…rk (clears 4 Snyk CVEs incl. 1 critical)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Addresses all Snyk SCA findings for this repo. Verified each fix with a real
snyk testagainst the rebuilt dependency graph — the repo now scans clean (0 issues, down from 5).Fix 1 — drop the
Microsoft.AspNetCore2.2.0 meta-packageAll four transitive CVEs above traced back to the deprecated
Microsoft.AspNetCore@2.2.0meta-package, which pins ancient transitive versions. Onnet7.0the ASP.NET Core framework is already supplied by the shared framework (implicitFrameworkReferencefrom theMicrosoft.NET.Sdk.WebSDK), so the explicit 2.2.0 PackageReference was both redundant and the sole source of these four findings. Removing it lets the app resolve against the patched net7 framework assemblies — no replacement package needed.Fix 2 — bump AutoMapper 12.0.1 → 15.1.3
The only fix versions for the recursion CVE are 15.1.3 / 16.1.1, both major bumps. This required two small adjustments:
AutoMapper.Extensions.Microsoft.DependencyInjection— that separate DI package was folded into the mainAutoMapperpackage (and discontinued) as of v13.Startup.csfrom the removed marker-scanning overloadAddAutoMapper(typeof(Startup))toAddAutoMapper(cfg => cfg.AddProfile<MappingProfile>()). The mapping profile itself (CreateMap<TodoItem, TodoDynamo>().ReverseMap()) is unchanged.Verification
dotnet build -c Release— succeeds (each commit builds independently)./api/healthreturns 200 with AutoMapper resolving through DI.snyk test— 0 issues (was 5: 1 critical, 3 high, 1 medium).Snyk Code (SAST) is not enabled for the org, so no SAST pass; there are no IaC files in this repo to scan.