github / github/codeql

Unable to validate code scanning workflow: error: getWorkflow() failed

オープン
#18,279 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

When I run my build it includes this step:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
source-root: source/my-app
queries: security-extended

I'm getting this warning:

> Initialize CodeQL
> Unable to validate code scanning workflow: error: getWorkflow() failed: Error: Expected to find a code scanning workflow file at /home/runner/work/My-Repo-Name/My-Repo-Name/.github/workflows/ci-build.yml, but no such file existed. This can happen if the currently running workflow checks out a branch that doesn't contain the corresponding workflow file.

But the repo isn't being checked out to the root of the directory, as explained in `source-root`. Is there any way of telling CodeQL to look in the subdirectory to find the workflow?

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

.github/workflows/ci-build.yml と github/codeql-action/init@v3 周辺の workflow invocation を調査します。まず、source-root: source/my-app と checkout 済みリポジトリの構成を使って警告を再現します。次に、action が workflow をどのように特定して検証するかを追跡し、サブディレクトリの検索がサポートされているか、またどのような動作を文書化またはテストすべきかを確認します。

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

評価

技術スタック
github-actions
領域
ci-cd, security
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
32/100

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

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