Addresses all Snyk SCA findings for this repo. Verified each fix with a real snyk test against the rebuilt dependency graph — the repo now scans clean (0 issues, down from 5).
Fix 1 — drop the Microsoft.AspNetCore 2.2.0 meta-package
All four transitive CVEs above traced back to the deprecated Microsoft.AspNetCore@2.2.0 meta-package, which pins ancient transitive versions. On net7.0 the ASP.NET Core framework is already supplied by the shared framework (implicit FrameworkReference from the Microsoft.NET.Sdk.Web SDK), 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:
Dropped AutoMapper.Extensions.Microsoft.DependencyInjection — that separate DI package was folded into the main AutoMapper package (and discontinued) as of v13.
Updated the DI registration in Startup.cs from the removed marker-scanning overload AddAutoMapper(typeof(Startup)) to AddAutoMapper(cfg => cfg.AddProfile<MappingProfile>()). The mapping profile itself (CreateMap<TodoItem, TodoDynamo>().ReverseMap()) is unchanged.
Snyk Code (SAST) is not enabled for the org, so no SAST pass; there are no IaC files in this repo to scan.
Note: a pre-existing CS1998 warning in HealthApiController.cs (async method without await) is unrelated to these security fixes and left for a separate change.
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
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 test against the rebuilt dependency graph — the repo now scans clean (0 issues, down from 5).
Fix 1 — drop the Microsoft.AspNetCore 2.2.0 meta-package
All four transitive CVEs above traced back to the deprecated Microsoft.AspNetCore@2.2.0 meta-package, which pins ancient transitive versions. On net7.0 the ASP.NET Core framework is already supplied by the shared framework (implicit FrameworkReference from the Microsoft.NET.Sdk.Web SDK), 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:
Verification
Snyk Code (SAST) is not enabled for the org, so no SAST pass; there are no IaC files in this repo to scan.