コンテンツへスキップ

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

すべての処理はお使いのブラウザー内で行われます。入力した内容が外部に送信されることはありません。

使い方

  1. ワークフローの YAML をボックスに貼り付けてください。サンプルには、すでにいくつかの問題が含まれています。
  2. 検出結果を確認してください。エラー、警告、注意に分類され、判断できる場合は行番号も表示されます。
  3. 提案された修正を適用し、一覧がすっきりするまで再度貼り付けてください。

よくある質問

ワークフローがアップロードされますか?

いいえ。解析とチェックはブラウザ内で実行されます。読み込まれるコードは小さな YAML パーサーのみで、このページでのみ使用されます。

スキーマを完全に検証するツールですか?

いいえ。よく見られる間違いと、セキュリティに影響する問題をチェックします。網羅的な検証には、CI で actionlint をご利用ください。

アクションをコミット SHA に固定する理由は?

タグやブランチは、アクションの所有者や、それを侵害した攻撃者によって移動される可能性があります。完全なコミット SHA は変更できないため、パイプラインは変更したときにのみ変わります。

pull_request_target が危険な理由は?

フォークからのプルリクエストであっても、書き込み権限のあるトークンとシークレットを使って実行されます。プルリクエストのコードをチェックアウトして実行すると、外部の人があなたのシークレットを使ってコードを実行できてしまいます。

関連ガイド

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>