[Security] Strengthen branch protection rules
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
調査の方向性
Repository Settings → Branches から開始し、main に対する既存の保護ルールを確認してから、同じ対応が必要な release ブランチを特定します。記載されているレビュー、ステータスチェック、会話の解決、更新に関する要件を有効にし、テスト用の pull request でルールをテストします。保護されたブランチで必要な設定が適用され、ポリシーを回避できない状態になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Issue
OpenSSF Scorecard identified that branch protection is not maximal on development and release branches, scoring 5/10.
Risk Level
High - Inadequate branch protection can allow unauthorized or unreviewed code to reach production.
Current State
- Some branch protection rules are in place (5/10 score)
- Protection settings not maximal across all protected branches
- Gaps in enforcement could allow policy bypass
Recommendation
Strengthen branch protection on main and release branches:
Required Settings:
- ✅ Require pull request reviews before merging
- ✅ Require approvals (at least 1-2 reviewers)
- ✅ Dismiss stale pull request approvals when new commits are pushed
- ✅ Require review from Code Owners (if CODEOWNERS file exists)
- ✅ Require status checks to pass before merging
- ✅ Require branches to be up to date before merging
- ✅ Require conversation resolution before merging
Optional (Recommended):
- Consider requiring signed commits
- Restrict who can push to matching branches
- Require linear history
Steps to Implement
- Navigate to repository Settings → Branches → Branch protection rules
- Edit protection rules for
mainbranch - Enable recommended settings listed above
- Apply same rules to any release branches
- Test with a test PR to ensure rules work as expected
References
- OpenSSF Scorecard - Branch Protection
- GitHub Branch Protection Documentation
- OpenSSF Scorecard Score: 5/10
Related
Part of OpenSSF Scorecard evaluation THEEDGE-4717 (overall score: 6.8/10)
- 主要言語
- Go
- スター
- 66
- フォーク
- 27
- 平均マージ
- 17時間 25分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
containers/tar-diff のほかの issue
-
Create CHANGELOG.mdオープン
難易度 2/5 半日 初心者へのやさしさ 65/100
containers/tar-diff#44 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
containers/tar-diff#37 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
containers/tar-diff#104 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
containers/tar-diff#89 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
containers/tar-diff#88 ·
containers/tar-diff の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
-
product/backlog
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
TencentBlueKing/bk-nodemgr#3645 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
modelcontextprotocol/go-sdk#1387 ·
メンテナーはふだん 1 日以内に返信
-
docs(prompt): filer socket fragment hardcodes an issue-intent cap of 8 that Chore runs overrideオープンagent-butler-finding chore
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jordansmall/spindrift#5128 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 2 日以内に返信