GitHub Actions ワークフロー YAML チェッカー
ワークフローファイルを貼り付けると、実行を壊す問題やセキュリティ上の穴を即座に確認できます。対象は、runs-on の欠落、固定されていないサードパーティ製アクション、リスクのある pull_request_target の使用、permissions の欠落、スクリプトインジェクション、無効な needs です。
- Errors
- 4
- Warnings
- 5
- Notes
- 3
Error (line 6): Job
build has no runs-on:.runs-on: ubuntu-latest
Error (line 10):
pull_request_target combined with a checkout of the pull request head runs untrusted code with secrets (a classic supply-chain hole).Check out the base ref, or split into an unprivileged `pull_request` workflow plus a `workflow_run` follow-up.
Error (line 12): Script injection: an untrusted
${{ ... }} value is interpolated into a run: step in job build.Pass it through `env:` and reference "$VAR" in the script.
Error (line 13): Job
test needs lint, which is not defined. Jobs: build, test.Warning (line 3):
pull_request_target runs with a write token and secrets in the context of the base repository. Never check out or run code from the pull request with it.Use `pull_request` unless you need secrets for labeling or commenting.
Warning (line 1): No top-level
permissions:. The token defaults to the repository's setting, which may be read-write. Declare the least privilege.permissions: contents: read
Warning (line 6): Job
build sets no permissions: and there is no workflow-level default.Warning (line 11): Third-party action
some-org/deploy-action@v2 is pinned to a tag, which can be moved. Pin to a full commit SHA.some-org/deploy-action@<40-char sha> # v2
Warning (line 13): Job
test sets no permissions: and there is no workflow-level default.Note (line 6): Job
build has no timeout-minutes; the default is 360 minutes, so a hung job can burn a lot of CI time.timeout-minutes: 15
Note (line 8):
actions/checkout@v4 uses a tag; GitHub-owned actions are lower risk, but a SHA pin is stricter.Note (line 13): Job
test has no timeout-minutes; the default is 360 minutes, so a hung job can burn a lot of CI time.timeout-minutes: 15
すべての処理はお使いのブラウザー内で行われます。入力した内容が外部に送信されることはありません。
使い方
- ワークフローの YAML をボックスに貼り付けてください。サンプルには、すでにいくつかの問題が含まれています。
- 検出結果を確認してください。エラー、警告、注意に分類され、判断できる場合は行番号も表示されます。
- 提案された修正を適用し、一覧がすっきりするまで再度貼り付けてください。
よくある質問
ワークフローがアップロードされますか?
いいえ。解析とチェックはブラウザ内で実行されます。読み込まれるコードは小さな YAML パーサーのみで、このページでのみ使用されます。
スキーマを完全に検証するツールですか?
いいえ。よく見られる間違いと、セキュリティに影響する問題をチェックします。網羅的な検証には、CI で actionlint をご利用ください。
アクションをコミット SHA に固定する理由は?
タグやブランチは、アクションの所有者や、それを侵害した攻撃者によって移動される可能性があります。完全なコミット SHA は変更できないため、パイプラインは変更したときにのみ変わります。
pull_request_target が危険な理由は?
フォークからのプルリクエストであっても、書き込み権限のあるトークンとシークレットを使って実行されます。プルリクエストのコードをチェックアウトして実行すると、外部の人があなたのシークレットを使ってコードを実行できてしまいます。
関連ガイド
- GitHub Actions から AWS への OIDC: 長期間有効なキーは不要GitHub Actions と AWS の間で OpenID Connect を設定する方法を解説します。対象は、IDプロバイダー、権限を絞った IAM 信頼ポリシー、ワークフロー YAML、よくあるエラーです。
- GitHub Actions の実行時間制限: ジョブごとに 6 時間、35 日 (2026 年)2026 年の GitHub Actions の実行時間制限は、ジョブごとに 6 時間、ワークフロー実行ごとに 35 日です。timeout-minutes の設定方法と、ジョブ、ステップ、ワークフローを遅延させる方法を解説します。
- CircleCI から GitHub Actions への移行: ステップごとの手順概念の対応表、設定の並列比較、シークレット、キャッシュ、Importer、切り替え計画を使って、CircleCI から GitHub Actions へ移行します。
- GitLab CI から GitHub Actions への移行: ステップごとの手順.gitlab-ci.yml の対応表、並列比較による変換、変数、キャッシュ、サービス、Importer、切り替えを使って、GitLab CI から GitHub Actions へ移行します。
compiler.dev が提供する、より高速な GitHub Actions ランナーで作成されました。その他の無料ツールもご利用いただけます。
このツールをご自身のサイトに埋め込む
ブログやドキュメントへの埋め込みは無料です。表示させたい場所に次の HTML を貼り付けてください:
<iframe src="https://compiler.dev/embed/github-workflow-yaml-checker" title="GitHub Actions workflow YAML checker" width="100%" height="560" style="border:1px solid #e5e7eb;border-radius:12px" loading="lazy"></iframe>
<p style="font-size:12px">Calculator by <a href="https://compiler.dev/tools/github-workflow-yaml-checker">compiler.dev</a></p>関連ツール
- GitHub Actions matrix 展開ツールGitHub Actions の strategy.matrix が生成するすべてのジョブを、include と exclude を適用した状態で表示します。ジョブの総数が 256 ジョブの上限に対してどの程度かも確認できます。
- GitHub Actions 向け cron ビルダー兼説明ツールGitHub Actions のスケジュール用 cron 式を作成し、内容を説明します。平易な英語での説明と、UTC およびローカル時間での次の 10 回の実行時刻を確認できます。
- GitHub Actions キャッシュキー生成ツールhashFiles パターンと restore-keys を使って、npm、pnpm、pip、Gradle、Maven、Go、Cargo などに対応する正しい actions/cache キーを作成します。コピーしてすぐ使える YAML です。
- Dependabot 設定ジェネレーターnpm、pip、Docker、GitHub Actions、Go、Cargo などの dependabot.yml を、スケジュール、グループ化、ラベル、レビュアーを含めて生成します。検証済みで、そのままコピーして使えます。