Document that `pull_request` can upload SARIF without `security-events: write`
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 86/100
- Issue-Typ
- Dokumentation
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- github, github-actions
- Bereich
- documentation
Rechercherichtung
Aktualisiere den Abschnitt „Wer kann diese Funktion nutzen?“ im Artikel zu den Konfigurationsoptionen für Code-Scanning-Workflows, der im Issue genannt wird. Lies die verlinkten Hinweise zur Fehlerbehebung und vergleiche das Verhalten von pull_request mit den Beispielen für push und schedule, die security-events: write erfordern. Fertig ist die Aufgabe, wenn der Artikel klar dokumentiert, dass pull_request-Läufe SARIF auch ohne diese Berechtigung hochladen können, einschließlich bei Pull Requests aus Forks.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/code-security/reference/code-scanning/workflow-configuration-options
What part(s) of the article would you like to see updated?
Who can use this feature?
Users with write access if advanced setup is already enabled
To mention that pull_requests magically have security-events: write or something functionally equivalent to it.
Additional information
Confirming the cause of the error
If you're using Dependabot in your code scanning workflow, investigate the scope it's using.Uploading code scanning results for a branch usually requires the
security-events: writescope. However, code scanning always allows the uploading of results when thepull_requestevent triggers the action run. This is why, for Dependabot branches, we recommend you use thepull_requestevent instead of thepushevent.
Hallucinations follow:
-
The Actions workflow syntax
explains why fork PR tokens are read-only.Using the permissions key for forked repositories
You can use thepermissionskey to add and removereadpermissions for forked repositories, but typically you can't grantwriteaccess. The exception to this behavior is where an admin user has selected the Send write tokens to workflows from pull requests option in the GitHub Actions settings. For more information, see Managing GitHub Actions settings for a repository.-- this strongly hints that it's the only exception.
-
The code-scanning workflow guide
describes scanning onpull_requestwithout discussing the upload permission exception.Scanning pull requests
The default CodeQL analysis workflow uses thepull_requestevent to trigger a code scan on pull requests targeted against the default branch. If a pull request is from a private fork, thepull_requestevent will only be triggered if you've selected the "Run workflows from fork pull requests" option in the repository settings. For more information, see Managing GitHub Actions settings for a repository.-- doesn't mention
permissions:at all -
The SARIF upload guide
labelssecurity-events: writeas “required for all workflows” in examples that run onpushandschedule.Who can use this feature?
Users with write accessCode scanning is available for the following repository types:
- Public repositories on GitHub.com
- Organization-owned repositories on GitHub Team, GitHub Enterprise Cloud, or GitHub Enterprise Server, with GitHub Code Security enabled.
-- doesn't mention
pull_requestat all- https://github.com/check-spelling-outlook/curly-giggle-ideal-garbanzo/pull/12
(https://github.com/check-spelling-outlook/curly-giggle-ideal-garbanzo/actions/runs/46330116831/job/141558162788)
is about what GitHub accepts from a job token:
A workflow triggered bypull_requestcan upload code-scanning results for that pull request usingGITHUB_TOKENeven when the token lackssecurity-events: write, including for pull requests from forks (by users who do not have an affiliation with the PR target repo).
- Vorherrschende Sprache
- TypeScript
- Sterne
- 21.6k
- Forks
- 69.7k
- Ø Merge
- 8 Std. 11 Min.
- Gemergte PRs (30 T.)
- 100
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
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/docs
-
Codespaces user secrets guide describes logout behavior from older GitHub CLI versionsEvtl. vergeben @Jostar2 hat das heute übernommen. Offentriage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
github/docs#47156 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
content localization
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
github/docs#47125 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
content localization
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 75/100
github/docs#47093 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Remove deprecated node20 option from Actions MetadataEvtl. vergeben @Netail hat das vor 11 Tagen übernommen. Offencontent skip-spammy-check
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 70/100
github/docs#47020 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
SSH key pages: add the 3072-bit RSA rule and an ssh-keygen -lf check to the NoteEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offenbuilder persona content
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
github/docs#47001 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
eliasstravik/herdr-projects#1700 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
Koenkk/zigbee2mqtt#33890 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[bug] Socrates launchd-path adapter throws EISDIR when an import names a folder beside its .ts fileOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
danielmiessler/LifeOS#3123 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
[Feature]: Skill Workshop skill diet should use the configured utility model, not always the primaryOffenclawsweeper:fix-shape-clear clawsweeper:needs-live-repro clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:auth-provider issue-rating: 🐚 platinum hermit P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
openclaw/openclaw#210348 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag