lincc-frameworks / lincc-frameworks/python-project-template

Change third party github actions to target specific commits rather than tags

未关闭
#581 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Jinja
星标
85
派生
16
平均合并
6 小时 18 分钟
30 天内合并 PR
1

描述

We should pin our third party github actions to a specific commit, rather than a tag as we currently do.

This is a cybersecurity measure recommended by GitHub:

The individual jobs in a workflow can interact with (and compromise) other jobs. For example, a job querying the environment variables used by a later job, writing files to a shared directory that a later job processes, or even more directly by interacting with the Docker socket and inspecting other running containers and executing commands in them.

This means that a compromise of a single action within a workflow can be very significant, as that compromised action would have access to all secrets configured on your repository, and may be able to use the GITHUB_TOKEN to write to the repository. Consequently, there is significant risk in sourcing actions from third-party repositories on GitHub. For information on some of the steps an attacker could take, see Secure use reference.

In our workflows, we have some third party actions used like such:

    - name: Install uv
      uses: astral-sh/setup-uv@v7

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先在仓库的工作流文件中搜索第三方 GitHub Actions,包括 astral-sh/setup-uv@v7 示例。将每个第三方 action 固定到特定 commit,而不是 tag,然后运行可用的工作流检查,以确认它们仍然通过。

由索引模型根据 Issue 内容生成。

评估

技术栈
github-actions
领域
ci-cd, security
Issue 类型
重构
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
65/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。