Upload-sarif action doesn't seem to respect "uriBaseId" in SARIF files
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- github-actions, typescript
調査の方向性
まず Android Lint SARIF の例で問題を再現し、v2 upload-sarif action がアーティファクトの場所をどのように解決するかを追跡します。originalUriBaseIds と uriBaseId の処理を確認し、次に解決されたパスに設定済みのベースディレクトリが含まれていること、および fingerprinting と code scanning がソースファイルを特定することを確認します。
索引モデルが issue の本文から書いたものです。
説明
We're using "Android Lint" to generate a sarif file. The sarif locations use this pattern:
"originalUriBaseIds": {
"%SRCROOT%": {
"uri": "file:///runner/_work/myrepo/myrepo/some/repo/dir/"
}
},
...
"physicalLocation": {
"artifactLocation": {
"uriBaseId": "%SRCROOT%",
"uri": "src/main/kotlin/Foo.kt"
},
The artifact location is relative to this uriBaseId. This is a reference to originalUriBaseIds, which the SARIF spec says should be used by consumers to find the absolute path.
However, the upload-sarif action debug logs show lines such as this:
##[debug]Unable to compute fingerprint for non-existent file: /runner/_work/myrepo/myrepo/src/main/kotlin/Foo.kt
which shows that it's not resolving paths using that %SRCROOT% path -- the correct path would be /runner/_work/myrepo/myrepo/some/repo/dir/src/main/kotlin/Foo.kt. We also see that the code scanning page says src/main/kotlin/Foo.kt can't be found in our repo ("Sorry, we couldn't find this file in the repository.").
(Caveat: we're using v2 because we can't use node20 in our private runners yet)
- 主要言語
- TypeScript
- スター
- 1.6k
- フォーク
- 493
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 44
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
github/codeql-action#3915 · コメント 6 件 · リアクション 3 件 ·
github/codeql-action の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vicharanashala/fln#563 ·