Repository navigation
fix(webserver): align static HTML and SVG CSP - #245
Merged
Merged
Conversation
This was referenced Oct 15, 2026
Jonas Elfering (keulinho)
marked this pull request as ready for review
October 15, 2026 08:43
Soner (shyim)
approved these changes
Oct 15, 2026
This was referenced Oct 15, 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.
1. Why is this change necessary?
Static assets are served directly by the webserver and do not receive application response policies. HTML and SVG should use a consistent policy, scoped so that application-rendered pages and bundled HTML applications keep their existing behavior.
2. What does this change do, exactly?
Apply
script-src 'none'; object-src 'none'; frame-src 'none'; base-uri 'none'; form-action 'none'to stored SVG files and existing HTML undermedia/andthumbnail/in Nginx, Caddy and FrankenPHP. Existing-file matchers keep the policy off application-rendered HTML and bundled HTML apps. Let Nginx's SVG-specific location handle SVG instead of the preceding generic extension location, retaining caching and PHP fallback. Development images inherit their corresponding server configuration; FPM-only and telemetry layers do not introduce an independent static-file handler. Document the behavior in the README.Images and styles remain permitted. Custom static documents must work without scripts, embedded documents, base URL overrides or form submissions.
Correct the dev-image workflow's webserver path interpolation so Caddy/Nginx changes trigger the corresponding development-image builds. Previously those builds were skipped, leaving the structure-test job to pull a nonexistent PR image.
3. Describe each step to reproduce the issue or behaviour.
media/orthumbnail/, and an SVG file.Validation: Built the PHP 8.4 Nginx, Caddy and FrankenPHP Dockerfiles locally on ARM64 and ran their normal entrypoints with a fixture PHP application. Native configuration validation and 70 HTTP cases pass, including content types, asset/application policy scope, HEAD, byte ranges and missing-file handling. Nginx/Caddy use the published unchanged FPM base via the named build context. No local registry publication or full Shopware installation was performed.
For the CI correction, a temporary local check reproduces the skipped Caddy/Nginx builds with the old filter and confirms both match the PR's changed files with the corrected interpolation. Actionlint syntax/expression validation passes with the existing custom runner-label and unrelated ShellCheck findings excluded. The full GitHub build/test rerun is pending.
4. Please link to the relevant issues (if any).
5. Checklist