Rate-limit CSRF token and static file routes
- Lingua principale
- JavaScript
- Stelle
- 30
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Follow-up slice of #227.
Protect the remaining file-serving handlers identified by CodeQL in server/index.js.
Scope:
- apply the established request limit to the CSRF-token endpoint and client static/fallback routes;
- preserve normal browser, API, and health-check behavior;
- add focused regression coverage for the standard 429 response;
- resolve alerts through code, without suppression or query changes;
- do not add, inspect, store, or search email data.
Acceptance criteria:
- CodeQL closes the two remaining file-system route alerts;
- normal static and CSRF requests work within the configured window;
- server tests and CI pass.
Production rollout verification remains part of #176.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia in server/index.js e individua l’endpoint del token CSRF e le route statiche/di fallback del client menzionati nell’issue. Confrontali con il limite di richieste stabilito, quindi aggiungi una copertura mirata nei test del server per la risposta 429 standard. Il lavoro è considerato completato quando le richieste normali funzionano all’interno della finestra configurata, i due alert di CodeQL sulle route del file system vengono chiusi senza soppressioni o modifiche alle query e i test del server e CI passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs
- Ambito
- backend, security
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 65/100