Skip to content

security: XSS, auth, input validation, error sanitization#6

Merged
Inch-high merged 1 commit into
mainfrom
security/hardening
Apr 1, 2026
Merged

security: XSS, auth, input validation, error sanitization#6
Inch-high merged 1 commit into
mainfrom
security/hardening

Conversation

@Inch-high
Copy link
Copy Markdown
Owner

Summary

  • XSS: escape all user data in innerHTML templates via esc() helper
  • Auth: optional API_KEY env var with Bearer token middleware and login overlay
  • Validation: Pydantic validators on settings (URL format, numeric ranges)
  • Error sanitization: generic error messages on test_connection failures
  • Disable /docs and /redoc endpoints
  • Add X-Content-Type-Options and X-Frame-Options headers
  • Bound limit/offset query params on sessions endpoint

Generated with Claude Code

…ization

- Add esc() helper and escape all user data in innerHTML templates (XSS)
- Add optional API_KEY env var with Bearer token auth middleware
- Add login overlay to dashboard when auth is enabled
- Add Pydantic validators for settings (URL format, numeric ranges)
- Sanitize error messages in test_connection (no stack traces to client)
- Disable OpenAPI /docs and /redoc endpoints
- Add X-Content-Type-Options and X-Frame-Options security headers
- Add query param validation (limit/offset bounds) on sessions endpoint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Inch-high Inch-high merged commit 3167e38 into main Apr 1, 2026
@Inch-high Inch-high deleted the security/hardening branch April 1, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant