Scope Pages permissions to the deploy job and pin actions to commit SHAs

オープン 初心者向け
#20 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, yaml
領域
ci-cd, security

調査の方向性

.github/workflows/deploy.ymlから始め、workflowの権限と各uses:行を確認します。workflowの権限をcontents: readに設定し、deployジョブにPagesとOIDCの権限を付与し、参照されているActionsをバージョンコメント付きの完全なコミットSHAに固定します。npm run typecheckとnpm run buildを実行します。workflowが指定された権限と固定の基準を満たし、mainへのpushで引き続きデプロイされれば完了です。

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

説明

good first issue severity: low tech-debt

Summary

Workflow hardening: the build job holds deploy permissions it does not need, and actions are referenced by mutable major tags.

Where

  • .github/workflows/deploy.yml:8-11 (workflow-level pages: write, id-token: write)
  • .github/workflows/deploy.yml:21, :22, :28, :29, :41 (uses: lines)

Suggested fix

  • Set top-level permissions: contents: read and move pages: write and id-token: write under jobs.deploy.permissions.
  • Pin each action to a full commit SHA with the version in a trailing comment.

Acceptance criteria

  • Only the deploy job has pages: write and id-token: write
  • All uses: lines reference a commit SHA
  • A push to main still deploys

Getting started

  • Relevant files: .github/workflows/deploy.yml
  • Run locally: npm install, then npm run dev
  • Checks: npm run typecheck and npm run build (there is no test suite yet)
  • Related docs: README.md

Filed by repo-audit/full-audit at b001f5d. Severity: low. Effort: S. audit-key: security|.github/workflows/deploy.yml|permissions

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

環境構築

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

はじめの一歩

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

TMHSDigital/GH-Arcade のほかの issue

TMHSDigital/GH-Arcade の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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