Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Error while uploading SARIF file using action github/codeql-action/upload-sarif

未關閉
#2,456 8 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
github-actions, typescript
領域
ci-cd, security

研究方向

先檢查 trivy_report.sarif 和 upload-sarif@v3 的處理輸出,著重於錯誤所參照的 artifact location 資料。將 SARIF 結構與連結的 SARIF 支援文件進行比較,並判斷哪個 location 被拒絕。完成的標準是報告被接受,並在 code scanning 中完成處理且不發生 locationFromSarifResult 失敗。

由索引模型根據 Issue 內容生成。

描述

Hello expert,
I am trying to upload a SARIF file generated by a trivy scan. Whereas the SARIF file is generated, the upload of the file in the security tab failed with the message:

Run github/codeql-action/upload-sarif@v3
  with:
    sarif_file: trivy_report.sarif
    checkout_path: /home/runner/work/aws-htc-grid/aws-htc-grid
    token: ***
    matrix: null
    wait-for-processing: true
  env:
    TRIVY_REPORT_FILE: trivy_report.sarif
    ACTIONS_STEP_DEBUG: true
Uploading results
  Processing sarif files: ["trivy_report.sarif"]
  Validating trivy_report.sarif
  Combining SARIF files using the CodeQL CLI
  Adding fingerprints to SARIF file. See https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs for more information.
  Uploading results
  Successfully uploaded results
Waiting for processing to finish
  Analysis upload status is pending.
  Analysis upload status is failed.
Error: Code Scanning could not process the submitted SARIF file:
locationFromSarifResult: expected artifact location

Do you have any clues what could be wrong with my SARIF files or how to improve observability of the action ?

主要語言
TypeScript
星號
1.7k
分支
495
平均合併
1 天 2 小時
30 天內合併 PR
47

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/codeql-action 的其他 Issue

查看 github/codeql-action 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。