1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GitHub Actions で reviewdog バイナリを直接インストールして使用する

Last updated at Posted at 2025-05-04

背景

GitHub Actions で reviewdog を使いたい場合、reviewdog/action-setup を使用するのが一般的ですが、先日サプライチェーン攻撃の被害に遭ったようです。

[Security Advisory] Supply Chain Attack on reviewdog GitHub Actions during a specific time period #2079

2025/5/4 時点で緊急対応はされているようですが、事案としては進行中となっており reviewdog/action-setup を使用するのはセキュリティ的にリスクがあります。

そのため、上記 issue でも述べられているように、reviewdog バイナリを直接インストールして使用する方法を共有します。

Consider directly installing and using the reviewdog binary instead of reviewdog/action-* if you want to completely eliminate the risk of GitHub Action-based supply chain attacks.

方法

reviewdog/action-setup の install.sh より、最低限必要な部分を抽出することで対応しました。

      - name: Setup reviewdog
        shell: bash
        env:
          REVIEWDOG_TEMPDIR: ${{ runner.temp }}
        run: |
          curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/fd59714416d6d9a1c0692d872e38e7f8448df4fc/install.sh | sh -s -- -b "${REVIEWDOG_TEMPDIR}/reviewdog/bin" latest
          echo "${REVIEWDOG_TEMPDIR}/reviewdog/bin" >> "$GITHUB_PATH"

最新版以外を使用したい場合は、curl コマンドの latest を変更してください。

curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/fd59714416d6d9a1c0692d872e38e7f8448df4fc/install.sh | sh -s -- -b "${REVIEWDOG_TEMPDIR}/reviewdog/bin" [vX.Y.Z]

上記をワークフローに記載することで、GitHub Actions で reviewdog を使えるようになりました。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?