Skip to content

Comprehensive security hardening for self-hosted deployments#91

Merged
dietrichmax merged 3 commits intomainfrom
security/hardening-audit
Feb 21, 2026
Merged

Comprehensive security hardening for self-hosted deployments#91
dietrichmax merged 3 commits intomainfrom
security/hardening-audit

Conversation

@dietrichmax
Copy link
Owner

  • SSRF prevention: URL validation (IPv4/IPv6/mapped/ULA/link-local/decimal/hex), redirect blocking on tile and marker fetches, tileLayers and subdomain validation
  • SVG injection prevention: escapeXml on all user-interpolated SVG attributes including marker colors, text, attribution
  • Auth hardening: HMAC-signed demo cookies, timing-safe API key comparison
  • Resource limits: pixel budget (25MP), Sharp limitInputPixels, cache maxKeys, feature count cap (1000), zoom/timeout/tileRequestLimit caps, format allowlist
  • Security headers: CSP without unsafe-inline (extracted styles to demo.css), strict Referrer-Policy, HSTS, X-Frame-Options, Permissions-Policy
  • Log safety: API key redaction in request logs and error handler
  • Rate limiting on demo-map proxy, cookie path scoping
  • Tile header sanitization via allowlist
  • GitHub Actions bumped to latest major versions (checkout@v4, setup-node@v4, build-push-action@v6)

- SSRF prevention: URL validation (IPv4/IPv6/mapped/ULA/link-local/decimal/hex),
  redirect blocking on tile and marker fetches, tileLayers and subdomain validation
- SVG injection prevention: escapeXml on all user-interpolated SVG attributes
  including marker colors, text, attribution
- Auth hardening: HMAC-signed demo cookies, timing-safe API key comparison
- Resource limits: pixel budget (25MP), Sharp limitInputPixels, cache maxKeys,
  feature count cap (1000), zoom/timeout/tileRequestLimit caps, format allowlist
- Security headers: CSP without unsafe-inline (extracted styles to demo.css),
  strict Referrer-Policy, HSTS, X-Frame-Options, Permissions-Policy
- Log safety: API key redaction in request logs and error handler
- Rate limiting on demo-map proxy, cookie path scoping
- Tile header sanitization via allowlist
- GitHub Actions bumped to latest major versions (checkout@v4, setup-node@v4,
  build-push-action@v6)
@dietrichmax dietrichmax added enhancement Enhancement of existing feature cli Tasks related to the CLI server web tests labels Feb 21, 2026
@dietrichmax dietrichmax merged commit 9c97450 into main Feb 21, 2026
5 checks passed
@dietrichmax dietrichmax deleted the security/hardening-audit branch February 21, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Tasks related to the CLI enhancement Enhancement of existing feature server tests web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant