TMA-GITLAB-1.1.8
Ensure inactive branches are periodically reviewed and removed
説明
Keep track of code branches that are inactive for a lengthy period of time and periodically remove them. Git branches that have been inactive (i.e., no new changes introduced) for a long period of time are enlarging the surface of attack for malicious code injection, sensitive data leaks, and CI pipeline exploitation. They potentially contain outdated dependencies which may leave them highly vulnerable. They are more likely to be improperly managed, and could possibly be accessed by a large number of members of the organization.
チェック方法
監査方法: 手動レビュー
この推奨事項は自動ではチェックできません。--include-manual を指定すると、スキャン結果にこの手順付きで一覧表示されます。
For each project, verify that all existing Git branches are active or have yet to be checked for inactivity by performing the next steps: - Navigate to the main page of the project. - In the sidebar select Code > Branches - Use the navigation at the top of the page to view the Stale branches. The Stale view shows all branches that no one has committed to in the last three months, ordered by the branches with the oldest commits first. - If the list is empty, you are compliant. If the list is not empty, but there is a valid reason the branches listed are not deleted, you are compliant. You can perform the next steps to verify that merge request branches are prevented from becoming stale branches by default: - Navigate to the main page of the project. - In the left sidebar select Settings > Merge requests - Verify if 'Enable "Delete source branch" option by default' is selected. If it is not selected, you are more likely to become non-compliant.
修正方法
修正方法: ガイダンスまたは IaC パッチ
For each project, review existing Git branches and remove those which were identified during the audit as being non-compliant by performing the following: - Navigate to the main page of the project. - In the sidebar select Code > Branches - Next to each non-compliant branch select the vertical ellipsis - Select 'Delete branch' - Read the warning - Select 'Yes, delete branch' You can perform the next steps to reduce the likelihood of a stale branches remaining after a merge request: - Navigate to the main page of the project. - In the left sidebar select Settings > Merge requests - Select 'Enable "Delete source branch" option by default'.
プロパティ
- オペレーティングシステム
- すべて
- タグ
- branch-protectiondevsecopsgitlab
- 参照
- CIS GitLab Benchmark v1.0.1 - 1.1.8 Ensure inactive branches are periodically reviewed and removed