[upload-sarif@v3] action completely ignore the `sha` input and using commit hash from `checkout_path` instead
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- github-actions, typescript
Rechercherichtung
Beginne in src/upload-sarif-action.ts bei Zeile 91 und in src/upload-lib.ts bei Zeile 605 und verfolge anschließend, wie die Eingabe sha und der Commit checkout_path ausgewählt werden. Reproduziere den gemeldeten Upload mithilfe des YAML-Beispiels und untersuche den Request-Body. Die Aufgabe ist erledigt, wenn die Upload-Anfrage den angegebenen sha als commit_oid verwendet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
- Usage:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results/fix-paths-cpp.sarif
ref: refs/heads/main
sha: a8e616ed369f7f74173a13c5489dbae89c3b12
checkout_path: /runner/_work/parent-repo/build
- Output from action:
request: {
method: 'PUT',
url: 'https://github.com/api/v3/repos/PFO/OpenSIL/code-scanning/analysis',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'CodeQL-Action/3.22.12 octokit-core.js/3.6.0 Node.js/20.18.0 (linux; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"commit_oid":"b0b0efb3f489d6c16d35gsfd4b388173h99e1049","ref":"refs/heads/main","analysis_key":".github/workflows/codeql-nightly.yml:codeql","analysis_name":"CodeQL- Nightly","sarif":"..."}'
From the output, we can see that it is not actually uploading with the commit_oid that we assigned in the sha input.
Looking at the src code of the upload-sarif action:
- https://github.com/github/codeql-action/blob/main/src/upload-sarif-action.ts#L91
- https://github.com/github/codeql-action/blob/main/src/upload-lib.ts#L605
It is actually using the commit hash sha from the repo under thecheckout_path, which completely ignores theshainput in the action.
- 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
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
mksglu/context-mode#1200 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
anthropics/claude-code#96687 ·
-
good first issue
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
AOSSIE-Org/DebateAI#582 · 2 Kommentare ·