TMAegisBeta
Aturan lainnya untuk gitlab

GitLab

TMA-GITLAB-1.1.9

Ensure all checks have passed before merging new code

SedangLevel 1Otomatisgitlab

Deskripsi

Before a code change request can be merged to the code base, all predefined checks must successfully pass. On top of manual reviews of code changes, a code protect should contain a set of prescriptive checks which validate each change. Organizations should enforce those status checks so that changes can only be introduced if all checks have successfully passed. This set of checks should serve as the absolute quality, stability, and security conditions which must be met in order to merge new code to a project.

Cara pemeriksaan

Metode audit: Perintah 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
Output yang diharapkan
compliant

Cara perbaikan

Metode perbaikan: Panduan atau patch infrastruktur

To block the merging of merge requests when checks fail: 1. On the left sidebar, select Search or go to and find your project. 2. Select Settings > Merge requests. 3. Select the Status checks must succeed checkbox. 4. Select Save changes.

Properti

Sistem operasi
Apa saja
Tag
devsecopsgitlab
Referensi
CIS GitLab Benchmark v1.0.1 - 1.1.9 Ensure all checks have passed before merging new code

Periksa host ini

Jalankan ini pada mesin yang diizinkan untuk Anda audit. Pemindaian bersifat hanya baca.

shell
tmaegis scan --target gitlab