Skip to content

Security: stop allowing Google Fonts in the content security policies - #50

Merged
SandObserver merged 1 commit into
mainfrom
security/drop-google-fonts-csp
Aug 12, 2026
Merged

SandObserver merged 1 commit into
mainfrom
security/drop-google-fonts-csp

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Drop https://fonts.googleapis.com from style-src and https://fonts.gstatic.com from font-src in nginx/csp-default.conf and in the widget policy in nginx/dashboard.conf.
  • Update the comment in csp-default.conf that described /admin as the policy without Google Fonts, which no longer distinguishes it.
  • Add an nginx-config test asserting that no policy in the config lists an outside host under font-src or style-src.

Testing
All green, apart from the Docker build smoke test, which needs a local Docker daemon. Added 1 test covering every policy in the config; verified it fails against the previous policy text rather than passing vacuously.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

The default policy and the widget policy permitted
fonts.googleapis.com and fonts.gstatic.com, left from a widget that no
longer exists. The stylesheets use system fonts and the image ships its
own assets, so nothing requests either host.
@SandObserver SandObserver added the security Security fix label Aug 12, 2026
@SandObserver
SandObserver merged commit 60740eb into main Aug 12, 2026
4 checks passed
@SandObserver
SandObserver deleted the security/drop-google-fonts-csp branch August 12, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Security fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant