> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Devin Security 威胁

> 在 Devin Security 中跟踪安全威胁，扫描您的代码仓库以确认是否受到影响，并将发现项关联到各个威胁。

威胁是指您希望排查代码是否受其影响的具体安全风险，例如某个常用库中新披露的漏洞，或您的团队所担心的某种攻击手法。[Devin Security](https://docs.devinenterprise.com/zh/work-with-devin/security-2-0.md) 中的 **Threats** 页面会列出您的威胁，显示您的代码仓库是否受到影响，并汇总每个威胁对应的发现项。

打开 **Security**，进入 **Threats**，或直接访问 `/security/threats`。

## 威胁的来源

**Source** 列显示每个威胁的来源。

* **Cognition**：当出现新的风险 (例如新型漏洞) 时，Cognition 会发布相应的威胁。这些威胁会一直显示在 Threats 页面顶部，直到你对其进行处理。
* **Your team**：由你的组织成员创建的威胁。

### 创建威胁

1. 选择 **新建威胁**。
2. 在 **标题** 中输入威胁的名称。
3. 在 **描述** 中说明可能会发生什么以及如何发生。Devin 会根据这段文本搜索您的代码，因此请尽量写得具体。
4. 选择 **创建**。

## 针对威胁进行扫描

要检查某个威胁是否会影响你，请打开该威胁并选择 **Scan with Devin**，然后选择代码仓库并开始扫描。

此扫描仅查找该威胁，速度比全量扫描更快，扫描得到的发现项会关联到该威胁。

针对威胁的扫描开始后，该威胁会转为 **Investigating** 状态。**发现项** 列显示已关联的发现项数量；首次扫描运行之前，该列显示 **Not scanned**。

### 针对特定威胁进行扫描

你也可以在 Scans 页面[开始扫描](https://docs.devinenterprise.com/zh/work-with-devin/security-2-0.md#start-a-scan)时选择威胁。使用 **Focus on threats** 可将 Devin 的搜索范围限定在你所选的威胁内。

深度扫描对可选的威胁有所限制。请参阅[深度扫描](https://docs.devinenterprise.com/zh/work-with-devin/security-2-0.md#deep-scan)。

## 自动分诊

每当有新威胁发布时，自动分诊都会自动扫描你的代码仓库，你无需逐次手动启动扫描。

1. 在 Threats 页面中，选择 **auto-triage**。
2. 开启该功能，并选择要扫描的代码仓库。
3. 设置 **Severity to triage**。Devin 会扫描该严重程度及以上的威胁。选择 **Low** 则会扫描所有威胁。
4. 可选：开启 **Dismiss threats with no findings**。如果针对某个威胁的扫描没有任何发现项，Devin 会忽略该威胁。
5. 选择 **Save**。

自动分诊是一个名为 **Threat auto-triage** 的自动化。如需进行更详细的调整，请在[自动化](https://docs.devinenterprise.com/zh/product-guides/automations.md)中打开它。

## 威胁状态

| 状态 | 含义 |
| - | - |
| **Open** | 该威胁为新出现的威胁，或已被你重新打开。 |
| **Investigating** | 已开始针对该威胁进行扫描。 |
| **Mitigated** | 你的团队已解决该威胁。 |
| **已忽略** | 该威胁与你无关，或你选择不对其采取处理措施。 |

“威胁”页面包含三个选项卡：**活跃**选项卡显示 Open 和 Investigating 状态的威胁，**Mitigated** 和**已忽略**选项卡显示其余威胁。

通过威胁上的操作菜单，可选择 **Mark mitigated**、**Dismiss** 或 **Reopen**。Devin 不会自动将威胁标记为已缓解，请在其发现项的修复合并后自行标记。

## 威胁的发现项

打开某个威胁并选择 **View 发现项**，即可查看其发现项。你也可以在 [发现项](https://docs.devinenterprise.com/zh/work-with-devin/security-2-0.md#review-findings) 页面上按威胁筛选。

要将现有发现项链接到某个威胁，请打开该发现项并选择 **Threat**。要移除该链接，请选择 **Remove from threat**。

威胁的发现项与其他发现项的修复方式相同。请参阅[将修复分配给 Devin](https://docs.devinenterprise.com/zh/work-with-devin/security-2-0.md#assign-fixes-to-devin)。

## 权限

您的角色决定了能否创建和更改威胁，以及能否更改 auto-triage。如果某项操作不可用，请联系管理员检查您的访问权限。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.