# 在 GitHub Advisory Database 中浏览安全公告

可以浏览 GitHub Advisory Database 来查找影响开放源代码世界的 CVE 和 GitHub 发起的公告。

<!--Marketing-LINK: From /features/security/software-supply-chain page "Browsing security vulnerabilities in the GitHub Advisory Database".-->

## 访问 GitHub Advisory Database 中的通告

可以访问 GitHub Advisory Database 中的任何公告。

1. 导航到 [https://github.com/advisories](https://github.com/advisories?ref_product=security-advisories\&ref_type=engagement\&ref_style=text) 。

2. （可选）要筛选公告列表，请使用搜索字段或列表顶部的下拉菜单。

   > \[!NOTE]
   > 可以使用左侧边栏分别浏览经 GitHub 审核和未审核的通告，或按生态系统筛选。

3. 单击任何公告以查看详细信息。 默认情况下，你将看到经 GitHub 审核的安全漏洞公告。 要显示恶意软件通告，请在搜索栏中使用 `type:malware`。

也可以使用 GraphQL API 访问数据库。 默认情况下，查询将返回经 GitHub 审核的安全漏洞通告，除非你指定 `type:malware`。 有关详细信息，请参阅 [Webhook 事件和有效负载](/zh/webhooks-and-events/webhooks/webhook-events-and-payloads#security_advisory)。

此外，可以使用 REST API 访问 GitHub Advisory Database。 有关详细信息，请参阅“[适用于全局安全公告的 REST API 终结点](/zh/rest/security-advisories/global-advisories)”。

## 在 GitHub Advisory Database 中编辑公告

你可以对 GitHub Advisory Database 中的任何公告提出改进建议。 有关详细信息，请参阅“[在 GitHub Advisory Database 中编辑安全公告](/zh/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/editing-security-advisories-in-the-github-advisory-database)”。

## 搜索 GitHub Advisory Database

你可以搜索数据库，并使用限定符缩小搜索范围。 例如，你可以搜索在特定日期、特定生态系统或特定库中创建的通告。

日期格式必须遵循 [ISO8601](http://en.wikipedia.org/wiki/ISO_8601) 标准，即 `YYYY-MM-DD`（年-月-日）。 也可以在日期后添加可选的时间信息 `THH:MM:SS+00:00`，以按小时、分钟和秒进行搜索。 即 `T`，随后是 `HH:MM:SS`（时-分-秒）和 UTC 时差 (`+00:00`)。

搜索日期时，可以使用大于、小于和范围限定符来进一步筛选结果。 有关详细信息，请参阅“[了解搜索语法](/zh/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax)”。

| 限定符             | Example |
| --------------- | ------- |
| `type:reviewed` |         |

```
          [
          `type:reviewed`
          ](https://github.com/advisories?query=type%3Areviewed) 将显示经 GitHub 审核的安全漏洞通告。 |
```

\| `type:malware` |
[
`type:malware`
](https://github.com/advisories?query=type%3Amalware) 将显示恶意软件通告。 |
\| `type:unreviewed`|
[
`type:unreviewed`
](https://github.com/advisories?query=type%3Aunreviewed) 将显示未审核的通告。 |
\| `GHSA-ID`|
[
`GHSA-49wp-qq6x-g2rf`
](https://github.com/advisories?query=GHSA-49wp-qq6x-g2rf) 将显示具有此 GitHub Advisory Database ID 的通告。 |
\| `CVE-ID`|
[
`CVE-2020-28482`
](https://github.com/advisories?query=CVE-2020-28482) 将显示具有此 CVE ID 编号的通告。 |
\| `ecosystem:ECOSYSTEM`|
[
`ecosystem:npm`
](https://github.com/advisories?utf8=%E2%9C%93\&query=ecosystem%3Anpm) 仅显示影响 npm 包的通告。 |
\| `severity:LEVEL`|
[
`severity:high`
](https://github.com/advisories?utf8=%E2%9C%93\&query=severity%3Ahigh) 仅显示严重级别为高的通告。 |
\| `affects:LIBRARY`|
[
`affects:lodash`
](https://github.com/advisories?utf8=%E2%9C%93\&query=affects%3Alodash) 仅显示影响 lodash 库的通告。 |
\| `cwe:ID`|
[
`cwe:352`
](https://github.com/advisories?query=cwe%3A352) 仅显示具有此 CWE 编号的通告。 |
\| `credit:USERNAME`|
[
`credit:octocat`
](https://github.com/advisories?query=credit%3Aoctocat) 仅显示鸣谢“octocat”用户帐户的通告。 |
\| `sort:created-asc`|
[
`sort:created-asc`
](https://github.com/advisories?utf8=%E2%9C%93\&query=sort%3Acreated-asc) 按通告发布时间从早到晚排序。 |
\| `sort:created-desc`|
[
`sort:created-desc`
](https://github.com/advisories?utf8=%E2%9C%93\&query=sort%3Acreated-desc) 按通告发布时间从晚到早排序。 |
\| `sort:updated-asc`|
[
`sort:updated-asc`
](https://github.com/advisories?utf8=%E2%9C%93\&query=sort%3Aupdated-asc) 按最近更新时间从早到晚排序。 |
\| `sort:updated-desc`|
[
`sort:updated-desc`
](https://github.com/advisories?utf8=%E2%9C%93\&query=sort%3Aupdated-desc) 按最近更新时间从晚到早排序。 |
\| `is:withdrawn`|
[
`is:withdrawn`
](https://github.com/advisories?utf8=%E2%9C%93\&query=is%3Awithdrawn) 仅显示已撤回的通告。 |
\| `created:YYYY-MM-DD`|
[
`created:2021-01-13`
](https://github.com/advisories?utf8=%E2%9C%93\&query=created%3A2021-01-13) 仅显示在此日期创建的通告。 |
\| `updated:YYYY-MM-DD`|
[
`updated:2021-01-13`
](https://github.com/advisories?utf8=%E2%9C%93\&query=updated%3A2021-01-13) 仅显示在此日期更新的通告。 |

```
          `GHSA-ID` 限定符是 GitHub 自动分配给 GitHub Advisory Database 中的每个公告的唯一 ID。 有关这些标识符的详细信息，请参阅[关于 GitHub Advisory Database](/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-the-github-advisory-database#about-ghsa-ids)。
```

## 查看有漏洞的仓库

对于 GitHub 中任何经 GitHub Advisory Database 审核的通告，你可以查看你的哪些存储库受到该安全漏洞或恶意软件的影响。 要查看有漏洞的仓库，你必须有权访问该仓库的 Dependabot alerts。 有关详细信息，请参阅“[关于 Dependabot 警报](/zh/code-security/dependabot/dependabot-alerts/about-dependabot-alerts#access-to-dependabot-alerts)”。

1. 导航到 [https://github.com/advisories](https://github.com/advisories?ref_product=security-advisories\&ref_type=engagement\&ref_style=text) 。
2. 单击通告。
3. 在通告页面顶部，单击“Dependabot 警报”\*\*\*\*。

   ```
          ![“全局安全通告”的屏幕截图。 “Dependabot 警报”按钮以橙色轮廓突出显示。](/assets/images/help/security/advisory-database-dependabot-alerts.png)
   ```
4. （可选）要筛选列表，请使用搜索栏或下拉菜单。 “Organization（组织）”下拉菜单用于按所有者（组织或用户）筛选 Dependabot alerts。
5. 有关公告的更多详细信息，以及有关如何修复有漏洞的存储库的建议，请单击存储库名称。