upload-sarif: `git call failed.` more times than necessary for a working directory without a git repository

オープン
#3,383 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

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

調査の方向性

src/git-utils.ts の参照された行から始め、リンク先の workflow ログとその動作を比較します。リポジトリが存在しない場合に upload-sarif 中に git の呼び出しが繰り返される理由を追跡し、リポジトリが checkout されていない場合でも、その呼び出しを繰り返し実行せずに action が SARIF を引き続き正常にアップロードできることを確認します。

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

説明

https://github.com/github/codeql-action/blob/f67ec12472e1b361f5e1e2085f5e6f85a57e3cd6/src/git-utils.ts#L87

https://github.com/check-spelling-sandbox/skipper/actions/runs/20649925837/job/59292941788

Run github/codeql-action/upload-sarif@7434149006143a4d75b82a2f411ef15b03ccc2d7
git call failed. Continuing with commit SHA from user input or environment. Error: The checkout path provided to the action does not appear to be a git repository.
Uploading code scanning results
  Processing sarif files: ["cifuzz-sarif/results.sarif"]
  Validating cifuzz-sarif/results.sarif
  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.
  (node:12002) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
  (Use `node --trace-deprecation ...` to show where the warning was created)
  git call failed. Continuing with commit SHA from user input or environment. Error: The checkout path provided to the action does not appear to be a git repository.
  git call failed. Continuing with commit SHA from user input or environment. Error: The checkout path provided to the action does not appear to be a git repository.
  git call failed. Will calculate the base branch SHA on the server. Error: The checkout path provided to the action does not appear to be a git repository.
  Uploading results
  Successfully uploaded results
Waiting for processing to finish
git call failed. Continuing with commit SHA from user input or environment. Error: The checkout path provided to the action does not appear to be a git repository.

Ideally, the action should be able to "quickly" determine that there isn't a repository checked out and not waste additional time running git commands.

Note that this flow (using google/clusterfuzzlite/actions/run_fuzzers and then ideally uploading sarif output) is a flow that people expect to be able to do (yes, Google is missing documentation for how to do it, but...).

主要言語
TypeScript
スター
1.6k
フォーク
493
平均マージ
1日 13時間
マージ済み PR(30日)
44

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/codeql-action のほかの issue

github/codeql-action の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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