GHSA-26w7-cxv4-gfx2 (kritisch, RCE beim Verarbeiten von AVIF) hat für
Astro 5 keinen Fix. Also hoch auf Astro 7.3.2, @astrojs/node 11,
@astrojs/react 6 und sharp 0.35. `npm audit`: 0 Funde.
Zwei Stellen mussten mit:
- `experimental.csp` heißt seit Astro 7 `security.csp`. Das ist keine
kosmetische Umbenennung: ein `csp` auf oberster Ebene wird ohne Warnung
geschluckt und die Seite läuft ganz ohne Policy. Gemessen — Header
vorher weg, nach der Korrektur wieder da, mit denselben Skript-Hashes
wie unter Astro 5.
- sharp exportiert den Typ `Sharp` jetzt benannt statt als Namensraum.
Dazu das Image: node 20 → 22 (Astro 7 verlangt mehr als 20.19, die Tests
brauchen 22.6 für --experimental-strip-types), und `npm ci` mit Lockfile
statt `npm install` — sonst baut das Image nicht die Versionen, die
getestet wurden.
Geprüft gegen echtes Postgres: alle Seiten 200, Upload durch sharp 0.35,
Bogen-PDF auf 210,00 × 297,00 mm gemessen, Einzelbild 35 × 45 mm bei
300 dpi = 413 × 531 px mit korrekter dpi-Angabe. 124 Tests grün.
Five things off the open list in the wiki.
CSP with real hashes for every inline script (Astro's experimental.csp), so no
'unsafe-inline' for scripts. style-src is deliberately reopened in middleware:
React sets styles as attributes and attributes cannot be hashed -- measured, the
hash-only policy blocks them and the print preview loses its layout. Plus
nosniff, referrer-policy, X-Frame-Options and a permissions-policy. Verified
across all pages: zero violations.
mem_limit 3g in compose. sharp can spike; without a limit an outlier takes the
whole container down instead of just the process, and the healthcheck can't
help.
AI results now carry IPTC DigitalSourceType (trainedAlgorithmicMedia, or
compositeWithTrainedAlgorithmicMedia for edited photos) plus the model, embedded
as XMP -- written by hand into PNG iTXt and JPEG APP1 rather than pulling in a
sharp upgrade with a native postinstall. exiftool reads it back from both
formats; pixels, dimensions and dpi are provably untouched.
Crop maths lived twice, in the browser preview and the server renderer, with
nothing holding them together. Now one dependency-free module, and 60000
randomised cases assert both entry points agree. That test immediately found a
real bug: the zoom limits (0.02 / 8x) also clamped the *initial* crop, so an
extreme format silently broke the aspect ratio -- "Rand lassen" would have
cropped after all. Limits are now widened to whatever the format needs.
Also: the colour flag sat exactly on the selection circle in the library and
covered it. Moved to the bottom left.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BNhLunz586g6DeYMa7Qsd1