Document that `pull_request` can upload SARIF without `security-events: write`
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 86/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github, github-actions
- Lĩnh vực
- documentation
Hướng nghiên cứu
Cập nhật mục “Ai có thể sử dụng tính năng này?” trong bài viết về các tùy chọn cấu hình workflow quét mã được nêu trong issue. Đọc hướng dẫn khắc phục sự cố được liên kết và so sánh hành vi của pull_request với các ví dụ push và schedule yêu cầu security-events: write. Công việc hoàn tất khi bài viết nêu rõ rằng các lần chạy pull_request có thể tải SARIF lên mà không cần quyền đó, kể cả với pull request từ fork.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- TypeScript
- Star
- 21.6k
- Fork
- 69.7k
- Merge trung bình
- 8 giờ 11 phút
- Pull request đã merge (30 ngày)
- 100
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/docs
-
Codespaces user secrets guide describes logout behavior from older GitHub CLI versionsCó thể đã có người làm @Jostar2 đã nhận hôm nay. Đang mởtriage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
github/docs#47156 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
content localization
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/docs#47125 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
content localization
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
github/docs#47093 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Remove deprecated node20 option from Actions MetadataCó thể đã có người làm @Netail đã nhận 11 ngày trước. Đang mởcontent skip-spammy-check
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
github/docs#47020 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SSH key pages: add the 3072-bit RSA rule and an ssh-keygen -lf check to the NoteCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbuilder persona content
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
github/docs#47001 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
eliasstravik/herdr-projects#1700 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[SNZB-02DR2 / SONOFF] ???Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Koenkk/zigbee2mqtt#33890 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[bug] Socrates launchd-path adapter throws EISDIR when an import names a folder beside its .ts fileĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
danielmiessler/LifeOS#3123 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
[Feature]: Skill Workshop skill diet should use the configured utility model, not always the primaryĐang mởclawsweeper: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
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
openclaw/openclaw#210348 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày