# 查看来自GitHub Actions的代码扫描日志

在code scanning中查看GitHub Actions分析的输出。

> \[!NOTE]
> 网站管理员必须先启用 code scanning 才能使用此功能。 如果你想使用 GitHub Actions 扫描代码，站点管理员还必须启用 GitHub Actions 并搭建所需的基础设施。 有关详细信息，请参阅“[为设备配置代码扫描](/zh/enterprise-server@3.22/code-security/how-tos/secure-at-scale/configure-enterprise-security/configure-specific-tools/configuring-code-scanning-for-your-appliance)”。

使用默认设置或自定义code scanning工作流进行配置GitHub Actions后，可以在操作运行时监视操作的输出。 有关其他 code scanning 设置的日志的信息，请参阅 [代码扫描日志](/zh/enterprise-server@3.22/code-security/reference/code-scanning/code-scanning-logs)。

1. 在仓库名称下，单击“<svg version="1.1" width="16" height="16" viewBox="0 0 16 16" class="octicon octicon-play" aria-label="play" role="img"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path></svg> Actions”\*\*\*\*。

   ![“github/docs”存储库的选项卡的屏幕截图。 “操作”选项卡以橙色边框突出显示。](/assets/images/help/repository/actions-tab-global-nav-update.png)

   你将看到一个列表，其中包含用于运行工作流的 code scanning 条目。 条目的文本是提交消息的标题。

   ![“所有工作流”页的屏幕截图。 在工作流运行列表中，有一个标记为“创建 .github/workflows/codeql.yml”的运行。](/assets/images/help/repository/code-scanning-actions-list.png)

2. 单击 code scanning 工作流的相应条目。

   > \[!NOTE]
   > 如果要查找通过启用默认设置触发的 CodeQL 工作流运行，则条目的文本为“CodeQL”。

3. 单击左侧的作业名称。 例如，**分析(语言)**。

   ![“分析(转到)”作业的日志输出的屏幕截图。 在左侧边栏的“作业”标题下，列出了“分析(转到)”。](/assets/images/help/repository/code-scanning-logging-analyze-action.png)

4. 查看此工作流运行时操作的日志记录输出。

5. （可选）要查看有关触发工作流运行的提交的更多详细信息，请单击短格式提交哈希。 此短格式提交哈希是紧跟在提交作者用户名之后的 7 个小写字符。

6. 完成所有作业后，可以查看已标识的任何 code scanning 警报的详细信息。 有关详细信息，请参阅“[访问存储库的代码扫描警报](/zh/enterprise-server@3.22/code-security/how-tos/manage-security-alerts/manage-code-scanning-alerts/assess-alerts#viewing-the-alerts-for-a-repository)”。

## 延伸阅读

如果你想了解关于 code scanning 是否访问过任何专用注册表的诊断信息，请参阅 [代码扫描日志](/zh/enterprise-server@3.22/code-security/reference/code-scanning/code-scanning-logs#diagnostic-information-for-private-package-registries)。