InfoGrab Docs

프로젝트 보안 설정 API

요약

프로젝트 보안 설정에 대한 모든 API 호출은 인증되어야 합니다. 프로젝트가 비공개이고 사용자가 보안 설정이 속한 프로젝트의 구성원이 아닌 경우 해당 프로젝트에 대한 요청은 404 Not Found 상태 코드를 반환합니다.

프로젝트 보안 설정에 대한 모든 API 호출은 인증되어야 합니다.

프로젝트가 비공개이고 사용자가 보안 설정이 속한 프로젝트의 구성원이 아닌 경우 해당 프로젝트에 대한 요청은 404 Not Found 상태 코드를 반환합니다.

모든 프로젝트 보안 설정 나열#

프로젝트의 모든 보안 설정을 나열합니다.

사전 요구 사항:

  • 프로젝트에 대한 Security Manager, Developer, Maintainer 또는 Owner 권한이 있어야 합니다.
GET /projects/:id/security_settings
속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로.
curl --request GET \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/7/security_settings"

응답 예시:

{
    "project_id": 7,
    "created_at": "2024-08-27T15:30:33.075Z",
    "updated_at": "2024-10-16T05:09:22.233Z",
    "auto_fix_container_scanning": true,
    "auto_fix_dast": true,
    "auto_fix_dependency_scanning": true,
    "auto_fix_sast": true,
    "continuous_vulnerability_scans_enabled": true,
    "container_scanning_for_registry_enabled": false,
    "secret_push_protection_enabled": true
}

secret_push_protection_enabled 설정 업데이트#

히스토리
  • GitLab 17.11에서 pre_receive_secret_detection_enabled에서 이름 변경.

지정된 프로젝트의 secret_push_protection_enabled 설정을 업데이트합니다.

사전 요구 사항:

  • 프로젝트에 대한 Maintainer 또는 Owner 권한이 있어야 합니다.
PUT /projects/:id/security_settings
속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로.
secret_push_protection_enabled 불리언 프로젝트에 대해 시크릿 푸시 보호를 활성화합니다.
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --data "secret_push_protection_enabled=false" \
  --url "https://gitlab.example.com/api/v4/projects/7/security_settings"

응답 예시:

{
    "project_id": 7,
    "created_at": "2024-08-27T15:30:33.075Z",
    "updated_at": "2024-10-16T05:09:22.233Z",
    "auto_fix_container_scanning": true,
    "auto_fix_dast": true,
    "auto_fix_dependency_scanning": true,
    "auto_fix_sast": true,
    "continuous_vulnerability_scans_enabled": true,
    "container_scanning_for_registry_enabled": false,
    "secret_push_protection_enabled": false
}

프로젝트 보안 설정 API

Tier: Ultimate
Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
원문 보기
요약

프로젝트 보안 설정에 대한 모든 API 호출은 인증되어야 합니다. 프로젝트가 비공개이고 사용자가 보안 설정이 속한 프로젝트의 구성원이 아닌 경우 해당 프로젝트에 대한 요청은 404 Not Found 상태 코드를 반환합니다.

프로젝트 보안 설정에 대한 모든 API 호출은 인증되어야 합니다.

프로젝트가 비공개이고 사용자가 보안 설정이 속한 프로젝트의 구성원이 아닌 경우 해당 프로젝트에 대한 요청은 404 Not Found 상태 코드를 반환합니다.

모든 프로젝트 보안 설정 나열#

프로젝트의 모든 보안 설정을 나열합니다.

사전 요구 사항:

  • 프로젝트에 대한 Security Manager, Developer, Maintainer 또는 Owner 권한이 있어야 합니다.
GET /projects/:id/security_settings
속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로.
curl --request GET \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/7/security_settings"

응답 예시:

{
    "project_id": 7,
    "created_at": "2024-08-27T15:30:33.075Z",
    "updated_at": "2024-10-16T05:09:22.233Z",
    "auto_fix_container_scanning": true,
    "auto_fix_dast": true,
    "auto_fix_dependency_scanning": true,
    "auto_fix_sast": true,
    "continuous_vulnerability_scans_enabled": true,
    "container_scanning_for_registry_enabled": false,
    "secret_push_protection_enabled": true
}

secret_push_protection_enabled 설정 업데이트#

히스토리
  • GitLab 17.11에서 pre_receive_secret_detection_enabled에서 이름 변경.

지정된 프로젝트의 secret_push_protection_enabled 설정을 업데이트합니다.

사전 요구 사항:

  • 프로젝트에 대한 Maintainer 또는 Owner 권한이 있어야 합니다.
PUT /projects/:id/security_settings
속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로.
secret_push_protection_enabled 불리언 프로젝트에 대해 시크릿 푸시 보호를 활성화합니다.
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --data "secret_push_protection_enabled=false" \
  --url "https://gitlab.example.com/api/v4/projects/7/security_settings"

응답 예시:

{
    "project_id": 7,
    "created_at": "2024-08-27T15:30:33.075Z",
    "updated_at": "2024-10-16T05:09:22.233Z",
    "auto_fix_container_scanning": true,
    "auto_fix_dast": true,
    "auto_fix_dependency_scanning": true,
    "auto_fix_sast": true,
    "continuous_vulnerability_scans_enabled": true,
    "container_scanning_for_registry_enabled": false,
    "secret_push_protection_enabled": false
}