Skip to content

Security: load every catalogue icon through the server - #501

Merged
SandObserver merged 2 commits into
mainfrom
security/icons-through-server
Oct 19, 2026
Merged

SandObserver merged 2 commits into
mainfrom
security/icons-through-server

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Remove the direct cdn.jsdelivr.net entries from iconChain: a name resolves to its local copy, then one /api/icons/cdn request.
  • Add throughServer, which maps catalogue CDN URLs to the proxy, and use it for saved icon links and icon picker results.
  • Set connect-src 'self' in the default and admin policies. Keep the img-src CDN allowance for demo mode, which loads icons directly.

Testing
All green. Added unit tests for the chain and proxy mapping, an nginx policy test, and an e2e test that the dashboard and Settings make no CDN request.

Changelog

Security

  • Icons always load through the server, so the CDN does not learn which services a dashboard shows.

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.

Drop the direct CDN fallbacks from the icon chain, route saved CDN links and icon picker results through /api/icons/cdn, and set connect-src 'self' in both page policies. The demo still loads icons from the CDN directly.
@SandObserver SandObserver added the security Security fix label Oct 19, 2026
Comment thread ui/test/icons.test.mjs Fixed
@SandObserver
SandObserver merged commit 65e4c02 into main Oct 19, 2026
6 checks passed
@SandObserver
SandObserver deleted the security/icons-through-server branch October 19, 2026 02:15
stackyard-release Bot pushed a commit that referenced this pull request Oct 19, 2026
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.

2 participants