Repository navigation
fix(worker): Bump ImageSharp to 4.1.2 to clear five security advisories - #203
Merged
Merged
Conversation
ImageSharp 3.1.12 carries GHSA-j3p4-wp97-rph4, GHSA-j9gm-c75j-xc9q, GHSA-jjfr-hcj7-qf5w (high) and GHSA-gwg2-r3hj-4w44, GHSA-wmxv-xphr-5c9g (moderate), all patched only in 4.1.2. With NuGetAudit at moderate and warnings as errors, master no longer builds. Blurhash.ImageSharp moves to 4.1.1 because it pins ImageSharp 4. ImageSharp 4 validates a Six Labors licence at build time: Debug warns, Release fails. The licence is a credential and is never committed: - locally, a gitignored sixlabors.lic at the repo root is wired in via SixLaborsLicenseFile (the package's own search only looks downward from each project, so it cannot find the root file); - an SixLaborsLicenseKey property or env var takes precedence; - the Worker image receives it as a BuildKit secret mount, not a build arg, so it never lands in a layer or the image history; CI passes secrets.SIXLABORS_LICENSE_KEY to build-push-action. Refs #190 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixture set the file time to 12:00 UTC, but the fallback reads LastWriteTime in host-local time, so the asserted day was off by one east of UTC+12 (e.g. Pacific/Auckland in NZDT). Express the fixture time in local time instead; production behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 10, 2026
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.
Refs #190. Unblocks #112, #200, #201, #202.
Why
Five advisories against ImageSharp 3.1.12 are patched only in 4.1.2:
Because NuGetAudit runs at
moderatewith warnings treated as errors, master does not currently build. This bumps ImageSharp on its own, so the fix doesn't have to wait for #189's test-platform migration.Changes
SixLabors.ImageSharp3.1.12 → 4.1.2, andBlurhash.ImageSharp3.0.0 → 4.1.1, which pins ImageSharp 4. No code changes were needed.sixlabors.licsits at the repo root, is gitignored, andDirectory.Build.propspointsSixLaborsLicenseFileat it. The package only searches downward from each project, so it would not find the root file without this.SixLaborsLicenseKey(as an MSBuild property or env var) takes precedence over the file.id=sixlabors_license), not a build arg, so it never ends up in a layer or in the image history.dockerjob passessecrets.SIXLABORS_LICENSE_KEYtobuild-push-action. Build & test run in Debug, so they don't need the key.Before merging
SIXLABORS_LICENSE_KEYrepository secret for Actions.Verification
dotnet build src/passes in Debug and Release with 0 warnings and 0 errors.SixLaborsLicenseKeyenv var set: passesdockerjob will be the first real check.Also: timezone-dependent test
PersistenceMiddlewareTests.InvokeAsync_WithNullDateCaptured_FallsBackToFileLastWriteTimeAsyncset the file time to 12:00 UTC, but the fallback readsLastWriteTimein host-local time. East of UTC+12 the asserted day was off by one, and master fails the same way. The fixture time is now expressed in local time. Production behaviour is unchanged. The test passes under UTC, Pacific/Auckland, Pacific/Kiritimati (UTC+14), Etc/GMT+12 (UTC−12) and Europe/Zurich.🤖 Generated with Claude Code