TMAegis
Thêm quy tắc cho gitlab

TMA-GITLAB-1.1.11

Ensure all open comments are resolved before allowing code change merging

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

Mô tả

Organizations should enforce a "no open comments" policy before allowing code change merging. In an open code change proposal, reviewers can leave comments containing their questions and suggestions. These comments can also include potential bugs and security issues. Requiring all comments on a code change proposal to be resolved before it can be merged ensures that every concern is properly addressed or acknowledged before the new code changes are introduced to the code base.

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

You can prevent merge requests from being merged until all threads are resolved. When this setting is enabled, the Unresolved threads counter in a merge request is shown in orange when at least one thread remains unresolved. 1. On the left sidebar, select Search or go to and find your project. 2. Select Settings > Merge requests. 3. In the Merge checks section, select the All threads must be resolved checkbox. 4. 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.1.11 Ensure all open comments are resolved before allowing code change merging

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 --level 2