dependabot-alerts.mjs's openAlerts() has no error handling for a rate-limited or partially-failed GitHub API response
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 74/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- github, javascript
Línea de trabajo
Comienza con openAlerts() en scripts/dependabot-alerts.mjs y compara su llamada a gh api con isPermissionDenied() y el manejo existente. Ejecuta scripts/dependabot-alerts.test.mjs y, después, añade cobertura para respuestas paginadas limitadas por tasa y parcialmente fallidas. La tarea está terminada cuando los fallos se gestionan deliberadamente sin una excepción no controlada y las pruebas de las rutas negativas pasan.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Which version line?
v2 — current (@modelcontextprotocol/inspector@latest)
Which client?
All / shared core
Inspector version
2.7.0 (git tag) — static code-review finding, not run locally
Node version
N/A — static code review, no live run performed
Operating system (and browser, for the web client)
N/A — static code review
Transport
Not applicable / never connected
MCP server under inspection
N/A — this is a static code-review finding against the 2.7.0 tag's scripts/dependabot-alerts.mjs, not a live reproduction against a running MCP server.
Steps to reproduce
Found via static review of the 2.7.0 tag source, not a live run.
- scripts/dependabot-alerts.mjs's isPermissionDenied() (~line 737) explicitly detects and handles rate-limiting for the "is Dependabot security-fixes enabled" check, and main() has a test covering "continues, reporting UNVERIFIED, when the token cannot read the setting."
- The actual alert-listing function, openAlerts() (~lines 797-805), calls
gh api --paginate --slurp repos/${repo}/dependabot/alerts?state=open&per_page=100with no try/catch or equivalent handling around that call, unlike the permission-check path. - A repo-wide read of the co-located scripts/dependabot-alerts.test.mjs finds tests for the permission-check rate-limit path but no negative-path test exercising openAlerts() itself against a rate-limited (403/429) or partially-failed (paginated request cut off mid-stream) GitHub API response.
No live run against the GitHub API was performed; this is based on reading the script and its test file against the 2.7.0 tag.
Expected behavior
openAlerts() handles a rate-limited (403/429) or partially-failed paginated response from the GitHub API the same deliberate way isPermissionDenied() already handles rate-limiting for the security-fixes-setting check — either surfacing a clear, non-crashing error/UNVERIFIED result, or retrying — rather than letting an unhandled exception propagate out of gh api.
Actual behavior
openAlerts() calls gh api --paginate --slurp repos/${repo}/dependabot/alerts?state=open&per_page=100 with no try/catch and no test covering what happens when that call is rate-limited or fails partway through a paginated response — in contrast to the permission-check path a few functions away, which explicitly detects and handles rate-limiting (isPermissionDenied(), covered by tests at lines 234-253 of the test file).
Suggested fix: wrap openAlerts()'s gh api call in the same kind of error handling as the permission-check path (detect rate-limit/partial-failure, surface a clear error or retry), and add a negative-path test for it alongside the existing rate-limit test for isPermissionDenied().
Logs, errors, or screenshots
No response
Already prototyped a fix?
No response
Before you submit
- I searched existing issues and this is not a duplicate.
- This is not a security vulnerability report (those go through the private advisory process).
- Lenguaje dominante
- TypeScript
- Estrellas
- 10.9k
- Forks
- 1.5k
- Merge medio
- 5 h 41 min
- PR fusionados (30 d)
- 145
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/inspector
-
bug security v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
modelcontextprotocol/inspector#2485 · 1 comentario ·
-
chore security v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
modelcontextprotocol/inspector#2484 · 1 comentario ·
-
enhancement v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
modelcontextprotocol/inspector#2438 · 1 comentario ·
-
bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/inspector#2424 · 2 comentarios ·
-
chore v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/inspector#2416 · 1 comentario ·
Todos los issues de modelcontextprotocol/inspector
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
motiondivision/motion#3849 ·
-
Add: S Play Event HD Abiertocheck:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Improvement for contact popover Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
LiteLLM proxy response_cost (x-litellm-response-cost) is never applied to ChatModelOutput.cost Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
i-am-bee/beeai-framework#1697 · 1 reacción ·
-
Support bun dedupe Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
antfu/node-modules-inspector#214 ·