Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Restrict GitHub token permissions in examples

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

@FichteFoll がすでに取り組んでいます。

2025年4月10日 から。

評価

この issue はまだ評価されていません。

説明

Hi,

This is not a bug. I was reading about code reviews and ended up reading about zizmor.

I run zizmor against the CI copied from README. The minimal example and gave 2 warnings.

This may not be important, as I am a newbie, but I read about some repos using it in their CI. Ruff applied the persist-credentials.

warning[artipacked]: credential persistence through GitHub Actions artifacts
  --> .github/workflows/ci.yml:30:9
   |
30 |       - uses: actions/checkout@v4
   |         ------------------------- does not set persist-credentials: false
   |
   = note: audit confidence → Low

warning[excessive-permissions]: overly broad permissions
  --> .github/workflows/ci.yml:18:3
   |
18 | /   syntax_tests:
19 | |     name: Syntax Tests (${{ matrix.build }})
...  |
33 | |           build: ${{ matrix.build }}
34 | |           # default_packages: ${{ matrix.packages }}
   | |                                                     -
   | |_____________________________________________________|
   |                                                       this job
   |                                                       default permissions used due to no permissions: block
   |
   = note: audit confidence → Medium

And suggested a fix permissions and persist-credentials.

jobs:
  syntax_tests:
    name: Syntax Tests (${{ matrix.build }})
    runs-on: ubuntu-latest
    permissions:
      id-token: write
    timeout-minutes: 15
    strategy:
      matrix:
        include:
          - build: 'latest'
            # packages: master
          - build: stable
            # packages: binary
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: SublimeText/syntax-test-action@v2
        with:
          build: ${{ matrix.build }}
          # default_packages: ${{ matrix.packages }}

Maybe add to README example if useful.

主要言語
Shell
スター
13
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

Shell/Bash の issue をもっと見る

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

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