Unable to run custom queries against GitHub Actions
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
首先比較獨立的 CodeQL 命令、GitHub Actions 呼叫以及產生的 codescanning 設定。檢查 actions-queries/pull_request_target.ql 和連結的 pull request 中顯示的 workflow,然後在找出為何未定義任何 Actions 查詢後重新執行 workflow。自訂查詢能夠透過 Actions 執行且不出現 fatal error,即表示完成。
由索引模型根據 Issue 內容生成。
描述
I've been trying to use codeql to check my GitHub Actions workflows. I've got it kinda working here:
https://github.com/billnapier/github-actions-check-workflow/pulls
I can test things, and when I run codeql standalone, stuff works just fine:
codeql database create --force-overwrite --db-cluster /workspaces/c
--source-root=/workspaces/github-actions-check-workflow --calculate-language-specific-baseline --extractor-include-aliases --sublanguage-file-
coverage --language=actions --search-path /workspaces/codeql-action --build-mode=none
and then run the query:
codeql query run --database /workspaces/c/actions -- actions-queries/pull_request_target.ql
So my query is well formed, and I can generate the DB. But when I try and run it via Actions, I get this output instead (also in the PR):
Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.20.3/x64/codeql/codeql database init --force-overwrite --db-cluster /home/runner/work/_temp/codeql_databases --source-root=/home/runner/work/github-actions-check-workflow/github-actions-check-workflow --calculate-language-specific-baseline --extractor-include-aliases --sublanguage-file-coverage --language=actions --search-path /home/runner/work/_actions/github/codeql-action/v3/actions-extractor --codescanning-config=/home/runner/work/_temp/user-config.yaml --build-mode=none". Exit code was 2 and error was: A fatal error occurred: No queries defined for actions. See the logs for more details.
I've been trying to debug the "No queries defined for actions", but I'm stumped. I'm guessing that I'm missing something specifying what language my query is used for, but I have no idea what I'm missing.
- 主要語言
- TypeScript
- 星號
- 1.7k
- 分支
- 495
- 平均合併
- 1 天 2 小時
- 30 天內合併 PR
- 47
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/codeql-action 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
github/codeql-action#4052 · 4 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 45/100
github/codeql-action#4185 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
github/codeql-action#4173 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 45/100
github/codeql-action#4078 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
github/codeql-action#4008 · 9 則留言 ·
維護者通常 1 天內回覆
查看 github/codeql-action 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
Doist/todoist-cli#576 ·
維護者通常 1 天內回覆
-
feature
難度 1/5 1 小時以內 新手友好度 72/100
vercel-labs/skills#2370 ·
維護者通常 1 天內回覆
-
🐛 Bug supabase/cli
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 90/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
CopilotKit/aimock#491 ·
維護者通常 1 天內回覆