Summary
Add rate limiting to the POST /config/reload endpoint to prevent abuse.
Background
During the OWASP security review of PR #281, a medium-severity finding was identified: the /config/reload endpoint has no rate limiting. While it requires X-Gitlab-Token authentication, a compromised token could be used to spam reload requests, causing excessive registry rebuilds and log noise.
Acceptance Criteria
Notes
- Consider using
slowapi or a simple in-memory token bucket
- Keep it simple — this is a single-replica service
Summary
Add rate limiting to the
POST /config/reloadendpoint to prevent abuse.Background
During the OWASP security review of PR #281, a medium-severity finding was identified: the
/config/reloadendpoint has no rate limiting. While it requiresX-Gitlab-Tokenauthentication, a compromised token could be used to spam reload requests, causing excessive registry rebuilds and log noise.Acceptance Criteria
POST /config/reload(e.g., max 5 requests per minute)429 Too Many RequestswithRetry-Afterheader when limit exceededNotes
slowapior a simple in-memory token bucket