Document that `pull_request` can upload SARIF without `security-events: write`

未關閉 適合新手
#47,120 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1-3 小時
新手友好度
86/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
github, github-actions
領域
documentation

研究方向

更新 issue 中提到的程式碼掃描工作流程設定選項文章中的「誰可以使用這項功能?」章節。閱讀其連結的疑難排解指引,並比較 pull_request 的行為與需要 security-events: write 的 push 和 schedule 範例。完成標準是文章清楚說明 pull_request 執行不需要該權限即可上傳 SARIF,包括來自 fork 的提取要求。

由索引模型根據 Issue 內容生成。

描述

content driver persona
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

https://docs.github.com/en/code-security/reference/code-scanning/troubleshoot-analysis-errors/resource-not-accessible#confirming-the-cause-of-the-error

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: write scope. However, code scanning always allows the uploading of results when the pull_request event triggers the action run. This is why, for Dependabot branches, we recommend you use the pull_request event instead of the push event.


Hallucinations follow:

主要語言
TypeScript
星號
21.6k
分支
69.7k
平均合併
8 小時 11 分鐘
30 天內合併 PR
100

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/docs 的其他 Issue

查看 github/docs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。