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

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

オープン
#581 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Jinja
スター
85
フォーク
16
平均マージ
6時間 18分
マージ済み PR(30日)
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](https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions):
> 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](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#potential-impact-of-a-compromised-runner).

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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、astral-sh/setup-uv@v7 の例を含め、リポジトリのワークフローファイルでサードパーティの GitHub Actions を検索します。各サードパーティ action をタグではなく特定の commit に pin し、その後、利用可能なワークフローチェックを実行して、引き続き成功することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github-actions
領域
ci-cd, security
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
65/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。