You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: close stored XSS, anon RPC, and rate limiting gaps in marketplace (#32)
* security: close stored XSS, anon RPC, and rate limiting gaps in marketplace
- Replace raw innerHTML rendering with sanitize-html (allowlist-based) in
plugin detail page — blocks stored XSS via community plugin markdown
- Add marketplace/lib/rate-limit.ts: in-memory sliding-window limiter
- Rate limit /api/install (5/slug/IP/hr), /api/search (60/IP/min),
/api/register (10/IP/hr) with 429 + Retry-After responses
- Add migration 00003: REVOKE EXECUTE on increment_install_count from
anon + authenticated roles (migration applied to production)
- Add *.tsbuildinfo to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(marketplace): move rate limit before auth check in /api/register
Rate limiting must run before authentication so that failed auth
attempts increment the counter — otherwise an attacker can brute-force
the API key without ever hitting the rate limit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments