TMAegis
Thêm quy tắc cho gitlab

TMA-GITLAB-1.2.2

Ensure repository creation is limited to specific members

Trung bìnhCấp 1Tự độnggitlab

Mô tả

Limit the ability to create repositories to trusted users and teams. Restricting repository creation to trusted users and teams is recommended in order to keep the organization properly structured, track fewer items, prevent impersonation, and to not overload the version-control system. It will allow administrators easier source code tracking and management capabilities, as they will have fewer repositories to track. The process of detecting potential attacks also becomes far more straightforward, as well, since the easier it is to track the source code, the easier it is to detect malicious acts within it. Additionally, the possibility of a member creating a public repository and sharing the organization's data externally is significantly decreased.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
command -v glab >/dev/null 2>&1 || exit 1
glab auth status >/dev/null 2>&1 || exit 1
proj=$(glab repo view -F json 2>/dev/null) || exit 1
printf "%s" "$proj" | grep -q '"id":' && echo compliant || echo non-compliant
Đầu ra mong đợi
compliant

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

Ensure that only trusted users and teams can create repositories by performing the following. As an administrator: - Navigate to the Admin Area - In the sidebar, select Settings > General - Expand the Sign-up restrictions section - (Option 1) Deselect 'Sign-up enabled', OR - (Option 2) Select 'Sign-up enabled', select 'Require admin approval for new sign- ups' are selected, and under 'Email confirmation settings' select 'Hard' - Select 'Save changes'

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
devsecopsgitlab
Tham chiếu
CIS GitLab Benchmark v1.0.1 - 1.2.2 Ensure repository creation is limited to specific members

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target gitlab