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

> ## Agent Instructions
> Enclave in these docs is the code and cloud security platform at enclave.ai. It is not Open Enclave, Intel SGX or other hardware enclaves, or enclave.gg.
> People use Enclave in the web app at https://app.enclave.ai or the desktop app. These docs describe no public Enclave API or CLI, so don't invent endpoints, commands, or config files.
> Connecting an integration needs a person to sign in and approve access in a browser. Tell the user the exact step to take instead of saying you completed it.

# GitHub

> 授权 Enclave 读取你的 GitHub 仓库、运行 PR 分析，并以 PR 评论的形式发布发现项。

连接 GitHub，让 Enclave 可以读取你的仓库、审查拉取请求，并以评论形式发布已验证的发现项。适用于 GitHub.com。

## 开始之前

* 你需要拥有 Enclave 中的 **Owner** 或 **Admin** 角色。
* 在 GitHub 中，你必须能够在该账号上安装应用：即**组织所有者**，或所选仓库的**仓库管理员**。

> [!WARNING]
>
> 如果你无法安装应用，GitHub 会改为向你的组织所有者发送请求。在所有者批准 Enclave GitHub App 之前，Enclave 会显示 **Installation requires admin approval**。

## 连接 GitHub

**1. 打开集成**

在 [app.enclave.ai](https://app.enclave.ai) 中打开 **Settings → Integrations**。点击 **GitHub** 旁边的 **Connect**。

**2. 安装 Enclave GitHub App**

点击 **Connect a GitHub organization or account**。你会被重定向到 GitHub，在你的账号或组织上安装 Enclave GitHub App。选择 **All repositories**，或选择特定的部分仓库。

> [!NOTE]
>
> 该应用会请求对代码、拉取请求和 webhook 事件的**读取**权限。Enclave 从不推送提交，也从不读取仓库密钥。

**3. 确认已授权的仓库**

回到 Enclave 后，该账号会出现在 **Settings → Integrations → GitHub** 的 **Connected organizations** 下。点击它并打开 **Repositories** 标签页，查看 Enclave 可以读取的仓库。如需更改列表，请点击 **Manage**，在 GitHub 上编辑安装设置。

**4. 选择哪些仓库进行 PR 审查**

每个 GitHub 仓库默认都开启自动 PR 审查。如需为某个仓库关闭，请在 **Coverage → Repositories** 中使用其 **PR Reviews** 开关。请参阅 [PR 与依赖分析](https://docs.enclave.ai/zh/risk/pr-analysis.md)。

## 技巧

* **在整个组织上安装。** 之后创建的仓库会自动连接。
* **连接系统中的每个仓库。** 只有同时看到两端时，Enclave 才能发现跨服务问题。


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