Upload-sarif action doesn't seem to respect "uriBaseId" in SARIF files
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- github-actions, typescript
Rechercherichtung
Beginne damit, das Problem mit dem Android Lint SARIF-Beispiel zu reproduzieren und nachzuverfolgen, wie die v2 upload-sarif action Artefaktpositionen auflöst. Überprüfe die Verarbeitung von originalUriBaseIds und uriBaseId und bestätige anschließend, dass der aufgelöste Pfad das konfigurierte Basisverzeichnis enthält und dass Fingerprinting und Code Scanning die Quelldatei finden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.6k
- Forks
- 493
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 44
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/codeql-action
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
github/codeql-action#4052 · 4 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
github/codeql-action#4078 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
github/codeql-action#4008 · 9 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
github/codeql-action#3978 · 4 Kommentare · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
github/codeql-action#3915 · 6 Kommentare · 3 Reaktionen ·
Alle Issues in github/codeql-action
Ähnliche Issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Mend: dependency security vulnerability untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100