告诉 HN:GitHub 的 Dependabot REST API 悄无声息地返回不完整的结果
4 分•作者: zetaben•5 个月前
截至今天早上(2026年3月27日),GitHub Dependabot Alerts REST API 接口(GET /repos/{owner}/{repo}/dependabot/alerts)悄无声息地返回空结果或部分结果。
我们的应用程序会调用这个接口,涉及数百个 GitHub 组织。从今天大约协调世界时 07:00 开始,我们注意到警报数量急剧下降。深入调查后,我们确认该 API 根本没有返回在 GitHub UI 中清晰可见的警报。
在我们的组织中可复现的例子:
```
$ gh api repos/{org}/{repo}/dependabot/alerts
[]
```
同时,[https://github.com/{org}/{repo}/security/dependabot](https://github.com/{org}/{repo}/security/dependabot) 显示有 9 个未解决的警报。
关键细节:
* REST API 返回 [] 或实际数量的一部分
* GraphQL API 仍然返回正确的结果
* GitHub UI 显示正确的数量
* 没有错误,没有速率限制,没有 4xx 错误,只是默默地返回不完整的数据
* 我们发现这种情况发生在许多组织中,而不仅仅是一个
这尤其令人讨厌,因为没有任何信号表明出现了问题。如果您依赖此接口进行合规性或任何自动化操作,那么您现在获取的数据已经过时,除非您进行交叉检查,否则您不会知道。
截至撰写本文时,[https://www.githubstatus.com](https://www.githubstatus.com) 上没有任何信息。
还有其他人遇到这种情况吗?
查看原文
As of this morning (March 27, 2026), the GitHub Dependabot Alerts REST API endpoint (GET /repos/{owner}/{repo}/dependabot/alerts) is silently returning empty or partial results.<p>Our app hits this endpoint across hundreds of GitHub orgs. Starting around 07:00 UTC today, we noticed massive drops in alert counts. Digging in, we confirmed the API simply isn't returning alerts that are clearly visible in the GitHub UI.<p>Reproducible example on our own org:<p><pre><code> $ gh api repos/{org}/{repo}/dependabot/alerts
[]
</code></pre>
Meanwhile <a href="https://github.com/{org}/{repo}/security/dependabot" rel="nofollow">https://github.com/{org}/{repo}/security/dependabot</a> shows 9 open alerts.<p>Key details:
- The REST API returns [] or a fraction of the real count
- The GraphQL API still returns correct results
- The GitHub UI shows the right number
- No error, no rate limit, no 4xx, just silently incomplete data
- We're seeing this across many orgs, not just one<p>This is particularly nasty because there's no signal that anything is wrong. If you're relying on this endpoint for compliance or any automation, you're getting stale data right now and you won't know unless you cross-check.<p>Nothing on <a href="https://www.githubstatus.com" rel="nofollow">https://www.githubstatus.com</a> as of writing.<p>Anyone else seeing this?