Repository navigation
decision(deps): SixLabors.ImageSharp 4 requires a build-time licence key — decide before upgrading #190
Description
Activity
- addedquestionFurther information is requestedFurther information is requesteddependenciesPull requests that update a dependency filePull requests that update a dependency file
on Sep 27, 2026 - added a commit that references this issue
on Sep 27, 2026 - addedneeds-triageMaintainer needs to evaluate this issueMaintainer needs to evaluate this issue
on Sep 28, 2026 This reverses the recommendation above
Found while investigating why Dependabot PRs #200 and #201 were failing. Holding at ImageSharp 3.1.12 is no longer the safe default — it is now the option that ships known high-severity vulnerabilities and does not build.
Every build in the repo currently fails
src/Directory.Build.propscombines:NuGetAudit = true NuGetAuditLevel = moderate NuGetAuditMode = all TreatWarningsAsErrors = trueSo any moderate-or-higher advisory, in any package, direct or transitive, is a hard build error.
SixLabors.ImageSharp3.1.12 now carries five:NU1903 high GHSA-j3p4-wp97-rph4 NU1903 high GHSA-j9gm-c75j-xc9q NU1903 high GHSA-jjfr-hcj7-qf5w NU1902 moderate GHSA-gwg2-r3hj-4w44 NU1902 moderate GHSA-wmxv-xphr-5c9g10 build errors — 5 advisories × 2 projects (
Anichron.Worker,Anichron.Worker.Tests.Unit). Reproduced locally onmaster's package set.There is no 3.x fix
Advisory Severity Vulnerable range First patched GHSA-j3p4-wp97-rph4 high >= 2.0.0, <= 4.1.14.1.2 GHSA-j9gm-c75j-xc9q high >= 2.0.0, <= 4.1.14.1.2 GHSA-jjfr-hcj7-qf5w high >= 2.1.0, <= 4.1.14.1.2 GHSA-gwg2-r3hj-4w44 moderate >= 1.0.0-beta0001, <= 4.1.14.1.2 GHSA-wmxv-xphr-5c9g moderate >= 2.0.0, <= 4.1.14.1.2 Queried from the GitHub advisory API. Every one is patched only in 4.1.2 — the exact upgrade this issue parked over the licence key. #202 already proposes it.
⚠️ A local green build is not evidence this is fixedNuGet's audit is best-effort: with no reachable advisory feed it silently skips and the build passes. Measured both ways on the same tree —
- restore with advisory data available → 10 errors
- restore with the feed unreachable → 0 errors, build succeeds
--no-restoreagainst assets from a networked restore → 10 errors (the advisory data is baked intoproject.assets.json)
CI always has the feed, so CI always fails. "It builds on my machine" may only mean the feed was unreachable.
What this does to the four options
- Stay on 3.x — was the recommendation. Now means three known high-severity CVEs and a repo that cannot build. No longer viable without also changing the audit settings.
- Licence 4.1.2 — the only option that removes the vulnerability. Cost unchanged: a key threaded into CI and the Worker
docker buildas a secret, never a build arg. - Lower
NuGetAuditLeveltohigh— silences the two moderates, leaves all three highs failing. Does not unblock. NoWarnthe five advisory codes — unblocks the build while explicitly accepting three high-severity CVEs. If this is the answer it needs an ADR, not a line in a props file.
📌 Nothing here has been changed. No audit setting touched, no package version moved — the choice between 2 and 4 is a security decision, not a build fix.
Knock-on
- Bump Roslynator.Analyzers and SonarAnalyzer.CSharp #200 (analyzers group) and Bump the nuget group with 9 updates #201 (nuget group) fail for this reason alone; neither has anything wrong with it.
- Bump Blurhash.ImageSharp and 7 others #202 is the fix, blocked on this decision.
- Health check for originals storage mount #112 is complete (commit
15905bf, 646/646 tests green before the advisory landed) but cannot be pushed — the pre-commit build hook hitsNU1903.
Resolved by #203: ImageSharp 4.1.2 + Blurhash.ImageSharp 4.1.1 under the Six Labors community licence. The key is supplied locally via a gitignored root
sixlabors.lic, in CI and for Dependabot via theSIXLABORS_LICENSE_KEYsecret, and to the Worker image via a BuildKit secret mount. The Worker Release image build in CI confirms it validates.
SixLabors.ImageSharpis pinned at 3.1.12 andBlurhash.ImageSharpat 3.0.0 insrc/Directory.Packages.props. They were held back in #187 because ImageSharp 4 cannot be builtwithout a licence key.
What actually happens
🔴 This is an ERROR in Release and only a WARNING in Debug. That asymmetry is the trap: a
local
dotnet build src/looks fine, and the failure appears in the Worker image, whoseDockerfile builds
-c Release. It is also why the Docker jobs are the only place CI catches it —they
needs: build-and-test, so they are skipped on any run that is already red.The licence did not change; the enforcement did
Both 3.1.12 and 4.1.2 ship the same Six Labors Split License 1.0. What 4.x adds is a
build/SixLabors.ImageSharp.targetsthat enforces a key at build time — 3.1.12 ships only a.propswith no such check. So this is not a new licence to evaluate so much as a key toprovision.
The two packages move together
Blurhash.ImageSharp4.1.1 takes a hard dependency onSixLabors.ImageSharp4.1.1, where3.0.0 only floors at
>= 2.0.0. Upgrading either forces the other, so they are held as a pair.What adopting v4 would require
free/OSS tier under AGPL-3.0, or whether it is a paid licence
$(SixLaborsLicenseKey)(or asixlabors.lic) reaching two places, not one: the CI job,and the Worker
docker build— the latter needs it as a build secret, and ⛔ a build argwould bake the key into image history
Options
eventually stop receiving fixes.
blurhash generation.
No action is required for v1.0; this is recorded so the holdback is a decision rather than drift.
Context: #187.