CodeQL Action Fails to Find eslint-results.sarif: Path Does Not Exist Error
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- github-actions
- 領域
- ci-cd
研究方向
從 issue 中顯示的 workflow 和 CodeQL 的 upload-sarif 步驟開始;將報告中缺少的 eslint-results.sarif 路徑與前面的 ESLint 命令進行比較。當 workflow 產生該 SARIF 檔案,且上傳步驟在沒有路徑錯誤的情況下完成時,即可完成。
由索引模型根據 Issue 內容生成。
描述
Always getting the follow error when running the default CodeQL upload action, seen this has been raised before but no solution found.
Warning: CodeQL Action v2 will be deprecated on December 5th, 2024. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/
Error: Path does not exist: eslint-results.sarif
ConfigurationError: Path does not exist: eslint-results.sarif
at getSarifFilePaths (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:2[9](https://github.com/********/********/actions/runs/9045918875/job/24867198772?pr=11#step:5:10)0:15)
at Object.uploadFromActions (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:284:30)
at run (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-sarif-action.js:56:47)
at async runWrapper (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-sarif-action.js:84:9)
Action:
name: ESLint
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '38 15 * * 3'
jobs:
eslint:
name: Run eslint scanning
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install ESLint
run: |
npm install [email protected]
npm install @microsoft/[email protected]
- name: Run ESLint
run: npx eslint .
--config .eslintrc.js
--ext .js,.jsx,.ts,.tsx
--format @microsoft/eslint-formatter-sarif
--output-file eslint-results.sarif
continue-on-error: true
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: eslint-results.sarif
token: ${{ secrets.GITHUB_TOKEN }}
wait-for-processing: true
- 主要語言
- TypeScript
- 星號
- 1.6k
- 分支
- 493
- 平均合併
- 1 天 10 小時
- 30 天內合併 PR
- 52
貢獻指南
從這裡開始
- 先讀完整個 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 天 新手友好度 48/100
github/codeql-action#4173 ·
-
難度 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 ·
查看 github/codeql-action 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
-
security
難度 2/5 1-3 小時 新手友好度 72/100
IBM/node-sdk-core#373 ·
-
e2e-failure ready-to-code
難度 2/5 1-3 小時 新手友好度 86/100
-
bug
難度 2/5 1-3 小時 新手友好度 74/100
-
chore
難度 2/5 1-3 小時 新手友好度 88/100