TMAegis
gitlab 관련 규칙 더 보기

TMA-GITLAB-1.5.1

Ensure scanners are in place to identify and prevent sensitive data in code

보통레벨 2자동gitlab

설명

Detect and prevent sensitive data in code, such as confidential ID numbers, passwords, etc. Having sensitive data in the source code makes it easier for attackers to maliciously use such information. In order to avoid this, designate scanners to identify and prevent the existence of sensitive data in the code.

점검 방법

감사 방식: 셸 명령

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
예상 출력
compliant

조치 방법

조치 방식: 가이드 또는 인프라 패치

Remediation: For every repository in use, designate scanners to identify and prevent sensitive data in code by performing the following: 1. On GitLab, navigate to the main page of the repository. 2. Enable secret detection for this project.

속성

운영 체제
모두
태그
devsecopsgitlab
참고 자료
CIS GitLab Benchmark v1.0.1 - 1.5.1 Ensure scanners are in place to identify and prevent sensitive data in code

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target gitlab --level 2