False positive: Workflow does not contain permissions
- 主要言語
- CodeQL
- スター
- 10.1k
- フォーク
- 2.1k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 141
説明
**Description of the false positive**
We get a lot of `Workflow does not contain permissions` alerts.
It's description states
> If a GitHub Actions job or workflow has no explicit permissions set, then the repository permissions are used. Repositories created under organizations inherit the organization permissions. The organizations or repositories created before February 2023 have the default permissions set to read-write. Often these permissions do not adhere to the principle of least privilege and can be reduced to read-only, leaving the write permission only to a specific types as issues: write or pull-requests: write.
While our org was created before February 2023, the default permission on the org is set to read contents and packages only, and in the repository I can't even change the setting.
**Code samples or links to source code**
https://github.com/intility/templates/blob/8653a13809c06c5046e57cb689d8479726380414/.github/workflows/build-react.yml#L13-L36
**URL to the alert on GitHub code scanning (optional)**
https://github.com/intility/templates/security/code-scanning/4
コントリビューションガイド
調査の方向性
Start with the linked workflow at .github/workflows/build-react.yml, lines 13-36, and compare its permissions with the reported code-scanning alert. Determine whether the alert is a false positive given the organization and repository defaults, then verify that the alert behavior or query outcome matches the documented permissions model.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- github-actions
- 領域
- ci-cd, security
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100