Skip to content

Clean up redundant ImageSharp references, document the elFinder HTTP pin - #763

Merged
KrzysztofPajak merged 2 commits into
developfrom
chore/package-hygiene-and-roadmap
Aug 8, 2026
Merged

Clean up redundant ImageSharp references, document the elFinder HTTP pin#763
KrzysztofPajak merged 2 commits into
developfrom
chore/package-hygiene-and-roadmap

Conversation

@KrzysztofPajak

Copy link
Copy Markdown
Member

Type: bugfix

Issue

Two package references in the admin projects looked like leftovers. Verifying them
before removal showed they meant opposite things.

Microsoft.AspNetCore.Http 2.3.11 in Grand.Web.AdminShared reads as a stray
ASP.NET Core 2.x package on net10.0. It is not. elFinder.Net.* 1.5.0 pulls in the
whole ASP.NET Core 2.1.x graph, including Microsoft.AspNetCore.Http2.1.1,
which carries GHSA-hxrm-9w7p-39cc (high severity). The direct reference is a
deliberate lift to a patched 2.x. Removing it makes restore emit NU1903.

SixLabors.ImageSharp appeared to be a second graphics stack alongside
SkiaSharp, referenced directly by three projects. There is no SixLabors
identifier in any .cs file in the solution; the only graphics code is
Grand.Business.Storage/Services/PictureService.cs, which uses SkiaSharp.
dotnet nuget why shows ImageSharp arriving through Scryber.Core 9.5.0 and
elFinder.Net.Core 1.5.0, both already asking for 3.1.12 - so all three direct
references were pins to a version the graph produces on its own.

Solution

  • Keep the Microsoft.AspNetCore.Http reference, with a comment in the .csproj
    recording the advisory it lifts and that it should only be removed together with
    elFinder.
  • Drop the three direct SixLabors.ImageSharp references and the now-unreferenced
    PackageVersion entry.

Breaking changes

None. ImageSharp still resolves at 3.1.12 through Scryber and elFinder, so nothing
changes in the build output.

Note that ImageSharp therefore still ships in the artifacts, so the Six Labors
Split License question is unaffected by this PR - it needs one of those two
dependencies replaced, which is a separate decision.

Testing

  1. dotnet restore ./GrandNode.sln --force - no NU1903, no errors.
  2. dotnet list src/Web/Grand.Web.Admin package --include-transitive | grep -i sixlabors
    still reports SixLabors.ImageSharp 3.1.12.
  3. dotnet build ./GrandNode.sln - clean.
  4. dotnet test ./src/Tests/Grand.Web.Admin.Tests/Grand.Web.Admin.Tests.csproj (51 pass)
    and ./src/Tests/Grand.Business.Common.Tests/Grand.Business.Common.Tests.csproj
    (126 pass, 2 skipped).
  5. Manual: in the admin panel open the elFinder file manager, upload an image and
    confirm the thumbnail renders; generate an order PDF to exercise Scryber.

🤖 Generated with Claude Code

KrzysztofPajakand others added 2 commits August 8, 2026 21:39
The package looks like a stray ASP.NET Core 2.x reference on net10.0 and
was queued for removal on that reading. It is not: elFinder.Net.* 1.5.0
pulls in the ASP.NET Core 2.1.x graph, including Microsoft.AspNetCore.Http
2.1.1, which carries GHSA-hxrm-9w7p-39cc (high severity).
Removing the reference lets the transitive 2.1.1 win and restore starts
warning NU1903. The reference is a deliberate lift to a patched 2.x, so it
stays until elFinder itself is replaced or upgraded.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ImageSharp is not used anywhere in the solution - there is no `SixLabors`
identifier in any .cs file. It reached three .csproj files as a direct
reference, which read like a second graphics stack alongside SkiaSharp.
It is neither. `dotnet nuget why` shows it arriving transitively through
Scryber.Core 9.5.0 and elFinder.Net.Core 1.5.0, both of which already ask
for 3.1.12. Dropping the three references and the now-unreferenced
PackageVersion resolves the same 3.1.12 with no NU1903 downgrade warning,
so these were pins to a version the graph produced on its own.
ImageSharp still ships in the output through those two dependencies, so
the Six Labors Split License question is unaffected by this change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 8, 2026 20:01
CopilotAI reviewed Aug 8, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@KrzysztofPajak
KrzysztofPajak merged commit 9b45b9d into developAug 8, 2026
6 checks passed
@KrzysztofPajak
KrzysztofPajak deleted the chore/package-hygiene-and-roadmap branch August 8, 2026 20:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@KrzysztofPajak