codeql-action/init workflow validation doesn't respect custom source-root
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 48/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- github-actions, typescript
研究方向
從 src/workflow.ts 第 285-290 行開始,issue 將其確定為警告的可能來源。使用路徑 "my-custom-path" 的 actions/checkout,以及使用 source-root "my-custom-path" 的 init,重現此驗證流程。在沒有報告的警告的情況下找到自訂 CodeQL workflow 即表示完成。
由索引模型根據 Issue 內容生成。
描述
We get the warning
Warning: Unable to validate code scanning workflow: error: getWorkflow() failed: Error: Expected to find a code scanning workflow file at /home/runner/_work/ProDriver-Safety-Path/ProDriver-Safety-Path/.github/workflows/nightly_codeql.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.
in our custom CodeQL workflow. We check out our repository in a custom location and specify this location using source-root:
- name: Checkout
uses: actions/checkout@v4
if: always()
with:
path: "my-custom-path"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
source-root: "my-custom-path"
It looks like the bug is this code: https://github.com/github/codeql-action/blob/c6e30a2b5a6e3c0a72eb142ec994f99816593c51/src/workflow.ts#L285-L290
- 主要語言
- TypeScript
- 星號
- 1.6k
- 分支
- 493
- 平均合併
- 1 天 13 小時
- 30 天內合併 PR
- 44
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/codeql-action 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
github/codeql-action#4052 · 4 則留言 ·
-
難度 4/5 3-5 天 新手友好度 45/100
github/codeql-action#4078 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 48/100
github/codeql-action#4008 · 9 則留言 ·
-
難度 4/5 3-5 天 新手友好度 52/100
github/codeql-action#3978 · 4 則留言 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 48/100
github/codeql-action#3915 · 6 則留言 · 3 個 reaction ·
查看 github/codeql-action 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
ontola/atomic-server#1625 ·
-
bug
難度 2/5 1-3 小時 新手友好度 70/100
melgarafael/DeskcommCRM#1451 ·
-
難度 1/5 1 小時以內 新手友好度 82/100
-
bug via-triage
難度 2/5 1-3 小時 新手友好度 78/100
-
bot:ai-assisted component:compact-js status:untriaged
難度 2/5 1-3 小時 新手友好度 84/100
midnightntwrk/midnight-sdk#403 ·