gitlabcis 1.3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. gitlabcis/__init__.py +12 -0
  2. gitlabcis/__main__.py +7 -0
  3. gitlabcis/benchmarks/__init__.py +8 -0
  4. gitlabcis/benchmarks/artifacts_4/__init__.py +4 -0
  5. gitlabcis/benchmarks/artifacts_4/access_to_artifacts_4_2.py +139 -0
  6. gitlabcis/benchmarks/artifacts_4/origin_traceability_4_4.py +11 -0
  7. gitlabcis/benchmarks/artifacts_4/package_registries_4_3.py +105 -0
  8. gitlabcis/benchmarks/artifacts_4/verification_4_1.py +83 -0
  9. gitlabcis/benchmarks/build_pipelines_2/__init__.py +4 -0
  10. gitlabcis/benchmarks/build_pipelines_2/build_environment_2_1.py +268 -0
  11. gitlabcis/benchmarks/build_pipelines_2/build_worker_2_2.py +129 -0
  12. gitlabcis/benchmarks/build_pipelines_2/pipeline_instructions_2_3.py +444 -0
  13. gitlabcis/benchmarks/build_pipelines_2/pipeline_integrity_2_4.py +146 -0
  14. gitlabcis/benchmarks/dependencies_3/__init__.py +2 -0
  15. gitlabcis/benchmarks/dependencies_3/third_party_packages_3_1.py +171 -0
  16. gitlabcis/benchmarks/dependencies_3/validate_packages_3_2.py +182 -0
  17. gitlabcis/benchmarks/deployment_5/__init__.py +2 -0
  18. gitlabcis/benchmarks/deployment_5/deployment_configuration_5_1.py +165 -0
  19. gitlabcis/benchmarks/deployment_5/deployment_environment_5_2.py +66 -0
  20. gitlabcis/benchmarks/source_code_1/__init__.py +6 -0
  21. gitlabcis/benchmarks/source_code_1/code_changes_1_1.py +665 -0
  22. gitlabcis/benchmarks/source_code_1/code_risks_1_5.py +506 -0
  23. gitlabcis/benchmarks/source_code_1/contribution_access_1_3.py +334 -0
  24. gitlabcis/benchmarks/source_code_1/repository_management_1_2.py +168 -0
  25. gitlabcis/benchmarks/source_code_1/third_party_1_4.py +139 -0
  26. gitlabcis/cli/__init__.py +0 -0
  27. gitlabcis/cli/log.py +30 -0
  28. gitlabcis/cli/main.py +541 -0
  29. gitlabcis/cli/output.py +151 -0
  30. gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/external_auth_server.yml +51 -0
  31. gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/limit_artifact_uploaders.yml +57 -0
  32. gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/limit_certifying_artifacts.yml +53 -0
  33. gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/minimum_package_registry_admins.yml +54 -0
  34. gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/readme.md +14 -0
  35. gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/require_mfa_to_package_registry.yml +52 -0
  36. gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/restrict_anonymous_access.yml +67 -0
  37. gitlabcis/recommendations/artifacts_4/origin_traceability_4_4/artifact_origin_info.yml +56 -0
  38. gitlabcis/recommendations/artifacts_4/origin_traceability_4_4/readme.md +7 -0
  39. gitlabcis/recommendations/artifacts_4/package_registries_4_3/all_artifact_versions_signed.yml +70 -0
  40. gitlabcis/recommendations/artifacts_4/package_registries_4_3/audit_package_registry_config.yml +46 -0
  41. gitlabcis/recommendations/artifacts_4/package_registries_4_3/readme.md +12 -0
  42. gitlabcis/recommendations/artifacts_4/package_registries_4_3/secure_repo_webhooks.yml +50 -0
  43. gitlabcis/recommendations/artifacts_4/package_registries_4_3/validate_signed_artifacts_on_upload.yml +72 -0
  44. gitlabcis/recommendations/artifacts_4/readme.md +12 -0
  45. gitlabcis/recommendations/artifacts_4/verification_4_1/encrypt_artifacts_before_distribution.yml +47 -0
  46. gitlabcis/recommendations/artifacts_4/verification_4_1/only_authorized_platforms_can_decrypt_artifacts.yml +59 -0
  47. gitlabcis/recommendations/artifacts_4/verification_4_1/readme.md +11 -0
  48. gitlabcis/recommendations/artifacts_4/verification_4_1/sign_artifacts_in_build_pipeline.yml +40 -0
  49. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/authenticate_build_access.yml +55 -0
  50. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/build_automation.yml +54 -0
  51. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/build_env_admins.yml +55 -0
  52. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/build_logging.yml +49 -0
  53. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/disable_build_tools_default_passwords.yml +54 -0
  54. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/immutable_pipeline_infrastructure.yml +60 -0
  55. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/limit_build_access.yml +64 -0
  56. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/limit_build_secrets_scope.yml +56 -0
  57. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/readme.md +19 -0
  58. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/secure_build_env_webhooks.yml +43 -0
  59. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/single_responsibility_pipeline.yml +58 -0
  60. gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/vuln_scanning.yml +64 -0
  61. gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/build_worker_vuln_scanning.yml +58 -0
  62. gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/monitor_worker_resource_consumption.yml +59 -0
  63. gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/pass_worker_envs_and_commands.yml +48 -0
  64. gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/readme.md +16 -0
  65. gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/restrict_worker_connectivity.yml +61 -0
  66. gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/segregate_worker_duties.yml +78 -0
  67. gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/single_use_workers.yml +47 -0
  68. gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/store_worker_config.yml +62 -0
  69. gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/worker_runtime_security.yml +37 -0
  70. gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/build_stage_io.yml +49 -0
  71. gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/build_steps_as_code.yml +42 -0
  72. gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/limit_pipeline_triggers.yml +76 -0
  73. gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/pipeline_misconfiguration_scanning.yml +48 -0
  74. gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/pipeline_secret_scanning.yml +56 -0
  75. gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/pipeline_vuln_scanning.yml +44 -0
  76. gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/readme.md +16 -0
  77. gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/secure_pipeline_output.yml +52 -0
  78. gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/track_pipeline_files.yml +48 -0
  79. gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/create_reproducible_artifacts.yml +52 -0
  80. gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/lock_dependencies.yml +59 -0
  81. gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/pipeline_produces_sbom.yml +81 -0
  82. gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/pipeline_signs_sbom.yml +38 -0
  83. gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/readme.md +14 -0
  84. gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/sign_artifacts.yml +35 -0
  85. gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/validate_dependencies.yml +63 -0
  86. gitlabcis/recommendations/build_pipelines_2/readme.md +12 -0
  87. gitlabcis/recommendations/dependencies_3/readme.md +10 -0
  88. gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/define_package_managers.yml +84 -0
  89. gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/dependency_sbom.yml +84 -0
  90. gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/monitor_dependencies.yml +61 -0
  91. gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/packages_over_60_days_old.yml +95 -0
  92. gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/pin_dependency_version.yml +48 -0
  93. gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/readme.md +14 -0
  94. gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/third_party_sbom_required.yml +70 -0
  95. gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/verify_artifacts.yml +45 -0
  96. gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/verify_signed_metadata.yml +41 -0
  97. gitlabcis/recommendations/dependencies_3/validate_packages_3_2/org_wide_dependency_policy.yml +47 -0
  98. gitlabcis/recommendations/dependencies_3/validate_packages_3_2/package_license_scanning.yml +47 -0
  99. gitlabcis/recommendations/dependencies_3/validate_packages_3_2/package_ownership_change.yml +42 -0
  100. gitlabcis/recommendations/dependencies_3/validate_packages_3_2/package_vuln_scanning.yml +62 -0
  101. gitlabcis/recommendations/dependencies_3/validate_packages_3_2/readme.md +10 -0
  102. gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/audit_deployment_config.yml +46 -0
  103. gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/limit_deployment_config_access.yml +51 -0
  104. gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/pin_deployment_config_manifests.yml +59 -0
  105. gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/readme.md +13 -0
  106. gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/scan_iac.yml +72 -0
  107. gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/secret_scan_deployment_config.yml +45 -0
  108. gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/separate_deployment_config.yml +50 -0
  109. gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/verify_deployment_config.yml +49 -0
  110. gitlabcis/recommendations/deployment_5/deployment_environment_5_2/automate_deployment.yml +47 -0
  111. gitlabcis/recommendations/deployment_5/deployment_environment_5_2/disable_default_passwords.yml +63 -0
  112. gitlabcis/recommendations/deployment_5/deployment_environment_5_2/limit_prod_access.yml +45 -0
  113. gitlabcis/recommendations/deployment_5/deployment_environment_5_2/readme.md +12 -0
  114. gitlabcis/recommendations/deployment_5/deployment_environment_5_2/reproducible_deployment.yml +50 -0
  115. gitlabcis/recommendations/deployment_5/readme.md +10 -0
  116. gitlabcis/recommendations/readme.md +24 -0
  117. gitlabcis/recommendations/source_code_1/code_changes_1_1/audit_branch_protections.yml +56 -0
  118. gitlabcis/recommendations/source_code_1/code_changes_1_1/auto_risk_scan_merges.yml +62 -0
  119. gitlabcis/recommendations/source_code_1/code_changes_1_1/branch_protections_for_admins.yml +60 -0
  120. gitlabcis/recommendations/source_code_1/code_changes_1_1/branches_updated_before_merging.yml +56 -0
  121. gitlabcis/recommendations/source_code_1/code_changes_1_1/checks_pass_before_merging.yml +57 -0
  122. gitlabcis/recommendations/source_code_1/code_changes_1_1/code_approval_dismissals.yml +62 -0
  123. gitlabcis/recommendations/source_code_1/code_changes_1_1/code_approvals.yml +65 -0
  124. gitlabcis/recommendations/source_code_1/code_changes_1_1/code_changes_require_code_owners.yml +68 -0
  125. gitlabcis/recommendations/source_code_1/code_changes_1_1/code_dismissal_restrictions.yml +69 -0
  126. gitlabcis/recommendations/source_code_1/code_changes_1_1/code_owners.yml +61 -0
  127. gitlabcis/recommendations/source_code_1/code_changes_1_1/code_tracing.yml +52 -0
  128. gitlabcis/recommendations/source_code_1/code_changes_1_1/comments_resolved_before_merging.yml +59 -0
  129. gitlabcis/recommendations/source_code_1/code_changes_1_1/commits_must_be_signed_before_merging.yml +63 -0
  130. gitlabcis/recommendations/source_code_1/code_changes_1_1/default_branch_protected.yml +85 -0
  131. gitlabcis/recommendations/source_code_1/code_changes_1_1/deny_branch_deletions.yml +76 -0
  132. gitlabcis/recommendations/source_code_1/code_changes_1_1/ensure_force_push_is_denied.yml +59 -0
  133. gitlabcis/recommendations/source_code_1/code_changes_1_1/linear_history_required.yml +56 -0
  134. gitlabcis/recommendations/source_code_1/code_changes_1_1/merging_restrictions.yml +65 -0
  135. gitlabcis/recommendations/source_code_1/code_changes_1_1/readme.md +26 -0
  136. gitlabcis/recommendations/source_code_1/code_changes_1_1/stale_branch_reviews.yml +72 -0
  137. gitlabcis/recommendations/source_code_1/code_changes_1_1/version_control.yml +45 -0
  138. gitlabcis/recommendations/source_code_1/code_risks_1_5/dast_api_scanning.yml +50 -0
  139. gitlabcis/recommendations/source_code_1/code_risks_1_5/dast_web_scanning.yml +51 -0
  140. gitlabcis/recommendations/source_code_1/code_risks_1_5/dependency_scanning.yml +84 -0
  141. gitlabcis/recommendations/source_code_1/code_risks_1_5/enable_secret_detection.yml +45 -0
  142. gitlabcis/recommendations/source_code_1/code_risks_1_5/license_scanning.yml +47 -0
  143. gitlabcis/recommendations/source_code_1/code_risks_1_5/readme.md +14 -0
  144. gitlabcis/recommendations/source_code_1/code_risks_1_5/secure_iac_instructions.yml +81 -0
  145. gitlabcis/recommendations/source_code_1/code_risks_1_5/secure_pipeline_instructions.yml +62 -0
  146. gitlabcis/recommendations/source_code_1/code_risks_1_5/vulnerability_scanning.yml +48 -0
  147. gitlabcis/recommendations/source_code_1/contribution_access_1_3/domain_verification.yml +65 -0
  148. gitlabcis/recommendations/source_code_1/contribution_access_1_3/ensure_2_admins_per_repo.yml +56 -0
  149. gitlabcis/recommendations/source_code_1/contribution_access_1_3/limit_top_level_group_creation.yml +61 -0
  150. gitlabcis/recommendations/source_code_1/contribution_access_1_3/limit_user_registration_domain.yml +58 -0
  151. gitlabcis/recommendations/source_code_1/contribution_access_1_3/minimum_number_of_admins.yml +56 -0
  152. gitlabcis/recommendations/source_code_1/contribution_access_1_3/org_provided_ssh_certs.yml +70 -0
  153. gitlabcis/recommendations/source_code_1/contribution_access_1_3/readme.md +21 -0
  154. gitlabcis/recommendations/source_code_1/contribution_access_1_3/require_mfa_at_org_level.yml +89 -0
  155. gitlabcis/recommendations/source_code_1/contribution_access_1_3/require_mfa_for_contributors.yml +76 -0
  156. gitlabcis/recommendations/source_code_1/contribution_access_1_3/restrict_ip_addresses.yml +84 -0
  157. gitlabcis/recommendations/source_code_1/contribution_access_1_3/review_and_remove_inactive_users.yml +62 -0
  158. gitlabcis/recommendations/source_code_1/contribution_access_1_3/scm_notification_restriction.yml +46 -0
  159. gitlabcis/recommendations/source_code_1/contribution_access_1_3/strict_permissions_for_repo.yml +62 -0
  160. gitlabcis/recommendations/source_code_1/contribution_access_1_3/track_code_anomalies.yml +43 -0
  161. gitlabcis/recommendations/source_code_1/readme.md +13 -0
  162. gitlabcis/recommendations/source_code_1/repository_management_1_2/limit_issue_deletions.yml +57 -0
  163. gitlabcis/recommendations/source_code_1/repository_management_1_2/limit_repo_creations.yml +64 -0
  164. gitlabcis/recommendations/source_code_1/repository_management_1_2/limit_repo_deletions.yml +57 -0
  165. gitlabcis/recommendations/source_code_1/repository_management_1_2/public_repos_have_security_file.yml +59 -0
  166. gitlabcis/recommendations/source_code_1/repository_management_1_2/readme.md +15 -0
  167. gitlabcis/recommendations/source_code_1/repository_management_1_2/review_and_archive_stale_repos.yml +65 -0
  168. gitlabcis/recommendations/source_code_1/repository_management_1_2/track_forks.yml +74 -0
  169. gitlabcis/recommendations/source_code_1/repository_management_1_2/track_project_visibility_status.yml +74 -0
  170. gitlabcis/recommendations/source_code_1/third_party_1_4/README.md +12 -0
  171. gitlabcis/recommendations/source_code_1/third_party_1_4/admin_approval_for_app_installs.yml +83 -0
  172. gitlabcis/recommendations/source_code_1/third_party_1_4/least_privilge_app_permissions.yml +103 -0
  173. gitlabcis/recommendations/source_code_1/third_party_1_4/secure_webhooks.yml +73 -0
  174. gitlabcis/recommendations/source_code_1/third_party_1_4/stale_app_reviews.yml +66 -0
  175. gitlabcis/recommendations/template.yml +30 -0
  176. gitlabcis/tests/__init__.py +0 -0
  177. gitlabcis/tests/input/__init__.py +0 -0
  178. gitlabcis/tests/input/conftest.py +29 -0
  179. gitlabcis/tests/input/no_input_test.py +82 -0
  180. gitlabcis/tests/input/switch_test.py +19 -0
  181. gitlabcis/tests/input/version_test.py +7 -0
  182. gitlabcis/tests/unit/__init__.py +0 -0
  183. gitlabcis/tests/unit/benchmarks/artifacts_4/access_to_artifacts_4_2_test.py +131 -0
  184. gitlabcis/tests/unit/benchmarks/artifacts_4/origin_traceability_4_4_test.py +15 -0
  185. gitlabcis/tests/unit/benchmarks/artifacts_4/package_registries_4_3_test.py +102 -0
  186. gitlabcis/tests/unit/benchmarks/artifacts_4/verification_4_1_test.py +78 -0
  187. gitlabcis/tests/unit/benchmarks/build_pipelines_2/build_environment_2_1_test.py +239 -0
  188. gitlabcis/tests/unit/benchmarks/build_pipelines_2/build_worker_2_2_test.py +105 -0
  189. gitlabcis/tests/unit/benchmarks/build_pipelines_2/pipeline_instructions_2_3_test.py +340 -0
  190. gitlabcis/tests/unit/benchmarks/build_pipelines_2/pipeline_integrity_2_4_test.py +115 -0
  191. gitlabcis/tests/unit/benchmarks/conftest.py +47 -0
  192. gitlabcis/tests/unit/benchmarks/dependencies_3/third_party_packages_3_1_test.py +135 -0
  193. gitlabcis/tests/unit/benchmarks/dependencies_3/validate_packages_3_2_test.py +171 -0
  194. gitlabcis/tests/unit/benchmarks/deployment_5/deployment_configuration_5_1_test.py +140 -0
  195. gitlabcis/tests/unit/benchmarks/deployment_5/deployment_environment_5_2_test.py +60 -0
  196. gitlabcis/tests/unit/benchmarks/function_test.py +24 -0
  197. gitlabcis/tests/unit/benchmarks/source_code_1/code_changes_1_1_test.py +565 -0
  198. gitlabcis/tests/unit/benchmarks/source_code_1/code_risks_1_5_test.py +419 -0
  199. gitlabcis/tests/unit/benchmarks/source_code_1/contribution_access_1_3_test.py +265 -0
  200. gitlabcis/tests/unit/benchmarks/source_code_1/repository_management_1_2_test.py +142 -0
  201. gitlabcis/tests/unit/benchmarks/source_code_1/third_party_1_4_test.py +119 -0
  202. gitlabcis/tests/unit/conftest.py +94 -0
  203. gitlabcis/tests/unit/log/log_test.py +23 -0
  204. gitlabcis/tests/unit/utils/argfilters_test.py +9 -0
  205. gitlabcis/tests/unit/utils/ci_test.py +156 -0
  206. gitlabcis/tests/unit/utils/output_test.py +95 -0
  207. gitlabcis/tests/unit/utils/utils_general_test.py +149 -0
  208. gitlabcis/tests/unit/utils/version_test.py +11 -0
  209. gitlabcis/tests/unit/yaml/bad_file_test.py +15 -0
  210. gitlabcis/tests/unit/yaml/recommendation_test.py +123 -0
  211. gitlabcis/utils/__init__.py +146 -0
  212. gitlabcis/utils/ci.py +132 -0
  213. gitlabcis-1.3.2.dist-info/LICENSE +21 -0
  214. gitlabcis-1.3.2.dist-info/METADATA +241 -0
  215. gitlabcis-1.3.2.dist-info/RECORD +218 -0
  216. gitlabcis-1.3.2.dist-info/WHEEL +5 -0
  217. gitlabcis-1.3.2.dist-info/entry_points.txt +2 -0
  218. gitlabcis-1.3.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,65 @@
1
+ ---
2
+ id: 1.1.3
3
+ name: code_approvals
4
+ title: Ensure any change to code receives approval of two strongly authenticated users
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Ensure that every code change is reviewed and approved by two authorized
10
+ contributors who are both strongly authenticated - using Multi-Factor Authentication
11
+ (MFA), from the team relevant to the code change.
12
+ rationale: >-
13
+ To prevent malicious or unauthorized code changes, the first layer of protection is the
14
+ process of code review. This process involves engineer teammates reviewing each
15
+ other's code for errors, optimizations, and general knowledge-sharing. With proper peer
16
+ reviews in place, an organization can detect unwanted code changes very early in the
17
+ process of release. In order to help facilitate code review, companies should employ
18
+ automation to verify that every code change has been reviewed and approved by at
19
+ least two team members before it is pushed into the code base. These team members
20
+ should be from the team that is related to the code change, so it will be a meaningful
21
+ review.
22
+ impact: >-
23
+ To enforce a code review requirement, verification for a minimum of two reviewers must
24
+ be put into place. This will ensure new code will not be able to be pushed to the code
25
+ base before it has received two independent approvals.
26
+ audit: |
27
+ For every project in use, perform the next steps to verify that two approvals from the specific project team are required to push new code to the code base:
28
+ • On the left sidebar, select Search or go to and find your project.
29
+ • Select Settings > Merge requests.
30
+ • In the Merge request approvals section, in the Approval rules section, next to the rule you want to edit, select Edit.
31
+ • Review the field In Approvals required, if the number is 2 or above, you are compliant.
32
+ remediation: |
33
+ For every project in use, perform the next steps to require two approvals from the specific project team in order to push new code to the code base:
34
+ • On the left sidebar, select Search or go to and find your project.
35
+ • Select Settings > Merge requests.
36
+ • In the Merge request approvals section, in the Approval rules section, next to the rule you want to edit, select Edit.
37
+ • Edit the field In Approvals required to ensure the value is 2 or above.
38
+ • Select Update approval rule.
39
+ default_value: 0
40
+ references:
41
+ - https://docs.gitlab.com/ee/user/project/merge_requests/approvals/rules.html#edit-an-approval-rule
42
+ cis_controls:
43
+ - id: 16.1
44
+ version: 8
45
+ name: Establish and Maintain a Secure Application Development Process
46
+ description: >-
47
+ Establish and maintain a secure application development process. In the
48
+ process, address such items as: secure application design standards, secure coding
49
+ practices, developer training, vulnerability management, security of third-party code,
50
+ and application security testing procedures. Review and update documentation
51
+ annually, or when significant enterprise changes occur that could impact this
52
+ Safeguard.
53
+ implementation_groups:
54
+ - IG2
55
+ - IG3
56
+ - id: 18.1
57
+ version: 7
58
+ name: Establish Secure Coding Practices
59
+ description: >-
60
+ Establish secure coding practices appropriate to the programming language and
61
+ development environment being used.
62
+ implementation_groups:
63
+ - IG2
64
+ - IG3
65
+ additional_info: >-
@@ -0,0 +1,68 @@
1
+ ---
2
+ id: 1.1.7
3
+ name: code_changes_require_code_owners
4
+ title: Ensure code owner's review is required when a change affects owned code
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Ensure trusted code owners are required to review and approve any code change
10
+ proposal made to their respective owned areas in the code base.
11
+ rationale: >-
12
+ Configuring code owners ensures that no code, especially code which could prove
13
+ malicious, will slip into the source code or configuration files of a repository. This allows
14
+ an organization to mark areas in the code base that are especially sensitive or more
15
+ prone to an attack. It can also enforce review by specific individuals who are designated
16
+ as owners to those areas so that they may filter out unauthorized or unwanted changes
17
+ beforehand.
18
+ impact: >-
19
+ If an organization enforces code owner-based reviews, some code change proposals
20
+ would not be able to be merged to the codebase before specific, trusted individuals
21
+ approve them.
22
+ audit: |
23
+ With merge request approval rules, you can set the minimum number of required approvals by code owners before work can merge into your project.
24
+ 1. On the left sidebar, select Search or go to and find your project.
25
+ 2. Select Settings > Repository.
26
+ 3. Expand Protected branches.
27
+ 4. Next to the default branch, turn on the toggle under Code owner approval.
28
+ remediation: |
29
+ Prerequisites:
30
+ • You must have at least the Maintainer role for the project.
31
+ • To add a group as an approver in GitLab.com, you must be a member of the group or the group must be public.
32
+ To add a merge request approval rule:
33
+ 1. On the left sidebar, select Search or go to and find your project.
34
+ 2. Select Settings > Merge requests.
35
+ 3. In the Merge request approvals section, in the Approval rules section, select Add approval rule.
36
+ 4. Complete the fields:
37
+ • In Approvals required, a value of 0 makes the rule optional, and any number greater than 0 creates a required rule. Maximum number of required approvals is 100.
38
+ • From Add approvers, select users or groups that are eligible to approve. GitLab suggests approvers based on previous authors of the files changed by the merge request.
39
+ 5. Select Add approval rule. You can add multiple approval rules.
40
+ default_value: Code owners are not required to review changes by default.
41
+ references:
42
+ - https://docs.gitlab.com/ee/user/project/merge_requests/approvals/
43
+ - https://docs.gitlab.com/ee/user/project/merge_requests/approvals/rules.html
44
+ - https://docs.gitlab.com/ee/user/project/codeowners/index.html
45
+ cis_controls:
46
+ - id: 16.1
47
+ version: 8
48
+ name: Establish and Maintain a Secure Application Development Process
49
+ description: >-
50
+ Establish and maintain a secure application development process. In the
51
+ process, address such items as: secure application design standards, secure coding
52
+ practices, developer training, vulnerability management, security of third-party code,
53
+ and application security testing procedures. Review and update documentation
54
+ annually, or when significant enterprise changes occur that could impact this
55
+ Safeguard.
56
+ implementation_groups:
57
+ - IG2
58
+ - IG3
59
+ - id: 18.1
60
+ version: 7
61
+ name: Establish Secure Coding Practices
62
+ description: >-
63
+ Establish secure coding practices appropriate to the programming language and
64
+ development environment being used.
65
+ implementation_groups:
66
+ - IG2
67
+ - IG3
68
+ additional_info: >-
@@ -0,0 +1,69 @@
1
+ ---
2
+ id: 1.1.5
3
+ name: code_dismissal_restrictions
4
+ title: Ensure there are restrictions on who can dismiss code change reviews
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Only trusted users should be allowed to dismiss code change reviews.
10
+ rationale: >-
11
+ Dismissing a code change review permits users to merge new suggested code changes
12
+ without going through the standard process of approvals. Controlling who can perform
13
+ this action will prevent malicious actors from simply dismissing the required reviews to
14
+ code changes and merging malicious or dysfunctional code into the code base.
15
+ impact: >-
16
+ In cases where a code change proposal has been updated since it was last reviewed
17
+ and the person who reviewed it isn't available for approval, a general collaborator would
18
+ not be able to merge their code changes until a user with "dismiss review" abilities could
19
+ dismiss the open review.
20
+ Users who are not allowed to dismiss code change reviews will not be permitted to do
21
+ so, and thus are unable to waive the standard flow of approvals.
22
+ audit: |
23
+ For each code repository in use, perform the next steps to verify that only trusted users are allowed to dismiss code change reviews:
24
+ To verify that restrictions are in place around who can dismiss code change reviews, view your branch protection settings for a project.
25
+ You must have at least the Maintainer role.
26
+ 1. On the left sidebar, select Search or go to and find your project.
27
+ 2. Select Settings > Repository.
28
+ 3. Expand Protected branches.
29
+ remediation: |
30
+ Prerequisites:
31
+
32
+ You must have at least the Maintainer role. When granting a group Allowed to merge or Allowed to push and merge permissions on a protected branch, the group must be added to the project. To protect a branch:
33
+ 1. On the left sidebar, select Search or go to and find your project.
34
+ 2. Select Settings > Repository.
35
+ 3. Expand Protected branches.
36
+ 4. Select Add protected branch.
37
+ 5. From the Branch dropdown list, select the branch you want to protect.
38
+ 6. From the Allowed to merge list, select a role that can merge into this branch.
39
+ 7. From the Allowed to push and merge list, select a role that can push to this branch.
40
+
41
+ In GitLab Premium and Ultimate, you can also add groups or individual users to Allowed to merge and Allowed to push and merge. Select Protect. The protected branch displays in the list of protected branches.
42
+ default_value: By default, all users who have write access to the code repository are able to dismiss code change reviews.
43
+ references:
44
+ - https://docs.gitlab.com/ee/user/project/protected_branches.html
45
+ cis_controls:
46
+ - id: 5.4
47
+ version: 8
48
+ name: Restrict Administrator Privileges to Dedicated Administrator Accounts
49
+ description: >-
50
+ Restrict administrator privileges to dedicated administrator accounts on
51
+ enterprise assets. Conduct general computing activities, such as internet
52
+ browsing, email, and productivity suite use, from the user's primary, non-privileged
53
+ account.
54
+ implementation_groups:
55
+ - IG1
56
+ - IG2
57
+ - IG3
58
+ - id: 4.3
59
+ version: 7
60
+ name: Ensure the Use of Dedicated Administrative Accounts
61
+ description: >-
62
+ Ensure that all users with administrative account access use a dedicated or
63
+ secondary account for elevated activities. This account should only be used for
64
+ administrative activities and not internet browsing, email, or similar activities.
65
+ implementation_groups:
66
+ - IG1
67
+ - IG2
68
+ - IG3
69
+ additional_info: >-
@@ -0,0 +1,61 @@
1
+ ---
2
+ id: 1.1.6
3
+ name: code_owners
4
+ title: Ensure code owners are set for extra sensitive code or configuration
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Code owners are trusted users that are responsible for reviewing and managing an
10
+ important piece of code or configuration. An organization is advised to set code owners
11
+ for every extremely sensitive code or configuration.
12
+ rationale: >-
13
+ Configuring code owners protects data by verifying that trusted users will notice and
14
+ review every edit, thus preventing unwanted or malicious changes from potentially
15
+ compromising sensitive code or configurations.
16
+ impact: >-
17
+ Code owner users will receive notifications for every change that occurs to the code and
18
+ subsequently added as reviewers of merge requests automatically.
19
+ audit: |
20
+ In every project, view the Code Owners of a file or directory:
21
+ 1. On the left sidebar, select Search or go to and find your project.
22
+ 2. Select Code > Repository.
23
+ 3. Go to the file or directory you want to see the Code Owners for.
24
+ 4. Optional. Select a branch or tag.
25
+ GitLab shows the Code Owners at the top of the page.
26
+ remediation: |
27
+ Prerequisites:
28
+ • You must be able to either push to the default branch or create a merge request.
29
+ 1. Create a CODEOWNERS file in your preferred location.
30
+ 2. Define some rules in the file following the Code Owners syntax reference. Some suggestions:
31
+ • Configure All eligible approvers approval rule.
32
+ • Require Code Owner approval on a protected branch.
33
+ 3. Commit your changes, and push them up to GitLab.
34
+ default_value:
35
+ references:
36
+ - https://docs.gitlab.com/ee/user/project/codeowners/
37
+ cis_controls:
38
+ - id: 6.8
39
+ version: 8
40
+ name: Define and Maintain Role-Based Access Control
41
+ description: >-
42
+ Define and maintain role-based access control, through determining and
43
+ documenting the access rights necessary for each role within the enterprise to
44
+ successfully carry out its assigned duties. Perform access control reviews of
45
+ enterprise assets to validate that all privileges are authorized, on a recurring
46
+ schedule at a minimum annually, or more frequently.
47
+ implementation_groups:
48
+ - IG3
49
+ - id: 14.6
50
+ version: 7
51
+ name: Protect Information through Access Control Lists
52
+ description: >-
53
+ Protect all information stored on systems with file system, network share, claims,
54
+ application, or database specific access control lists. These controls will enforce the
55
+ principle that only authorized individuals should have access to the information
56
+ based on their need to access the information as a part of their responsibilities.
57
+ implementation_groups:
58
+ - IG1
59
+ - IG2
60
+ - IG3
61
+ additional_info: >-
@@ -0,0 +1,52 @@
1
+ ---
2
+ id: 1.1.2
3
+ name: code_tracing
4
+ title: Ensure any change to code can be traced back to its associated task
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Use a task management system to trace any code back to its associated task.
10
+ rationale: >-
11
+ The ability to trace each piece of code back to its associated task simplifies the Agile
12
+ and DevOps process by enabling transparency of any code changes. This allows faster
13
+ remediation of bugs and security issues, while also making it harder to push
14
+ unauthorized code changes to sensitive projects. Additionally, using a task
15
+ management system simplifies achieving compliance, as it is easier to track each
16
+ regulation.
17
+ impact: >-
18
+ audit: >-
19
+ Ensure every code change can be traced back to its origin task in a task management
20
+ system.
21
+ remediation: >-
22
+ Use GitLab issues to manage tasks as the starting point for each code change. Whether
23
+ it is a new feature, bug fix, or security fix - all should originate from a dedicated task
24
+ (GitLab issue) in your organization's task management system. Tasks (issues) should
25
+ be linked to Merge Requests, and Merge requests should be linked to Issues.
26
+ default_value:
27
+ references:
28
+ - https://docs.gitlab.com/ee/user/project/issues/related_issues.html
29
+ cis_controls:
30
+ - id: 16.1
31
+ version: 8
32
+ name: Establish and Maintain a Secure Application Development Process
33
+ description: >-
34
+ Establish and maintain a secure application development process. In the
35
+ process, address such items as: secure application design standards, secure coding
36
+ practices, developer training, vulnerability management, security of third-party code,
37
+ and application security testing procedures. Review and update documentation
38
+ annually, or when significant enterprise changes occur that could impact this
39
+ Safeguard.
40
+ implementation_groups:
41
+ - IG2
42
+ - IG3
43
+ - id: 18.1
44
+ version: 7
45
+ name: Establish Secure Coding Practices
46
+ description: >-
47
+ Establish secure coding practices appropriate to the programming language and
48
+ development environment being used.
49
+ implementation_groups:
50
+ - IG2
51
+ - IG3
52
+ additional_info: >-
@@ -0,0 +1,59 @@
1
+ ---
2
+ id: 1.1.11
3
+ name: comments_resolved_before_merging
4
+ title: Ensure all open comments are resolved before allowing code change merging
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Organizations should enforce a "no open comments" policy before allowing code
10
+ change merging.
11
+ rationale: >-
12
+ In an open code change proposal, reviewers can leave comments containing their
13
+ questions and suggestions. These comments can also include potential bugs and
14
+ security issues. Requiring all comments on a code change proposal to be resolved
15
+ before it can be merged ensures that every concern is properly addressed or
16
+ acknowledged before the new code changes are introduced to the code base.
17
+ impact: >-
18
+ Code change proposals containing open comments would not be able to be merged into
19
+ the code base.
20
+ audit: |
21
+ Ensure that All threads must be resolved before changes in a branch can be merged.
22
+ To review these settings:
23
+ 1. On the left sidebar, select Search or go to and find your project.
24
+ 2. Select Settings > Merge requests.
25
+ 3. In the Merge checks section, check to see that the All threads must be resolved checkbox has been selected.
26
+ remediation: |
27
+ You can prevent merge requests from being merged until all threads are resolved.
28
+ When this setting is enabled, the Unresolved threads counter in a merge request is shown in orange when at least one thread remains unresolved.
29
+ 1. On the left sidebar, select Search or go to and find your project.
30
+ 2. Select Settings > Merge requests.
31
+ 3. In the Merge checks section, select the All threads must be resolved checkbox.
32
+ 4. Select Save changes.
33
+ default_value: By default, code changes with open comments on them are able to be merged into the code base
34
+ references:
35
+ - https://docs.gitlab.com/ee/user/project/merge_requests/index.html#prevent-merge-unless-all-threads-are-resolved
36
+ cis_controls:
37
+ - id: 16.1
38
+ version: 8
39
+ name: Establish and Maintain a Secure Application Development Process
40
+ description: >-
41
+ Establish and maintain a secure application development process. In the
42
+ process, address such items as: secure application design standards, secure coding
43
+ practices, developer training, vulnerability management, security of third-party code,
44
+ and application security testing procedures. Review and update documentation
45
+ annually, or when significant enterprise changes occur that could impact this
46
+ Safeguard.
47
+ implementation_groups:
48
+ - IG2
49
+ - IG3
50
+ - id: 18.1
51
+ version: 7
52
+ name: Establish Secure Coding Practices
53
+ description: >-
54
+ Establish secure coding practices appropriate to the programming language and
55
+ development environment being used.
56
+ implementation_groups:
57
+ - IG2
58
+ - IG3
59
+ additional_info: >-
@@ -0,0 +1,63 @@
1
+ ---
2
+ id: 1.1.12
3
+ name: commits_must_be_signed_before_merging
4
+ title: Ensure verification of signed commits for new changes before merging
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Ensure every commit in a merge request is signed and verified before merging.
10
+ rationale: >-
11
+ Signing commits, or requiring to sign commits, gives other users confidence about the
12
+ origin of a specific code change. It ensures that the author of the change is not hidden
13
+ and is verified by the version control system, thus the change comes from a trusted
14
+ source.
15
+ impact: >-
16
+ Merge requests with unsigned commits cannot be merged.
17
+ audit: |
18
+ Identify which projects permit unsigned commits by performing the following steps for each project:
19
+ • Navigate to the main page of the project.
20
+ • In the sidebar, select Settings > Repository.
21
+ • Expand the Push rules section.
22
+ • Identify the Select push rules section.
23
+ • If 'Reject unsigned commits' is selected the project is compliant.
24
+ remediation: |
25
+ Ensure only signed commits can be merged for every branch via branch protection rules by performing the following steps for each project:
26
+ • Navigate to the main page of the project.
27
+ • In the sidebar, select Settings > Repository.
28
+ • Expand the Push rules section.
29
+ • Under Select push rules select 'Reject unsigned commits'.
30
+ • Select 'Save push rules'.
31
+
32
+ As an administrator you can configure a secure default for new projects by performing the following steps:
33
+ • Navigate to the Admin Area.
34
+ • In the sidebar, select Push Rules.
35
+ • Select 'Reject unsigned commits'.
36
+ • Select 'Save push rules'.
37
+ default_value:
38
+ references:
39
+ - https://docs.gitlab.com/ee/user/project/repository/push_rules.html
40
+ cis_controls:
41
+ - id: 16.1
42
+ version: 8
43
+ name: Establish and Maintain a Secure Application Development Process
44
+ description: >-
45
+ Establish and maintain a secure application development process. In the
46
+ process, address such items as: secure application design standards, secure coding
47
+ practices, developer training, vulnerability management, security of third-party code,
48
+ and application security testing procedures. Review and update documentation
49
+ annually, or when significant enterprise changes occur that could impact this
50
+ Safeguard.
51
+ implementation_groups:
52
+ - IG2
53
+ - IG3
54
+ - id: 18.1
55
+ version: 7
56
+ name: Establish Secure Coding Practices
57
+ description: >-
58
+ Establish secure coding practices appropriate to the programming language and
59
+ development environment being used.
60
+ implementation_groups:
61
+ - IG2
62
+ - IG3
63
+ additional_info: >-
@@ -0,0 +1,85 @@
1
+ ---
2
+ id: 1.1.20
3
+ name: default_branch_protected
4
+ title: Ensure branch protection is enforced on the default branch
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Enforce branch protection on the default and main branch.
10
+ rationale: >-
11
+ The default or main branch of repositories is considered very important, as it is
12
+ eventually gets deployed to the production. Therefore it needs protection. By enforcing
13
+ branch protection rules on this branch, it is secured from unwanted or unauthorized
14
+ changes. It can also be protected from untested and unreviewed changes and more.
15
+ impact: >-
16
+ audit: |
17
+ The default branch of GitLab repositories are protected by default. This setting can be overridden at the instance, group, or project level.
18
+
19
+ To verify that branch protection is enabled for the main or default branch at the project level:
20
+ 1. Navigate to the main page of the GitLab repository.
21
+ 2. Select Settings > Repository.
22
+ 3. Expand Protected branches.
23
+ 4. Verify that initial default branch protection is applied to the "main" or default branch.
24
+
25
+ GitLab Group Owners can also perform the following to ensure branch protection is enabled by default for new projects at the group level:
26
+ 1. Navigate to the main page for your GitLab group.
27
+ 2. Select Settings > Repository.
28
+ 3. Under Default branch, verify that initial default branch protection is applied to the "main" or default branch.
29
+
30
+ GitLab administrators can perform the following to ensure branch protection is enabled by default for the main or default branch of all new projects at the instance level (self-managed GitLab only):
31
+ 1. Navigate to Admin Area.
32
+ 2. Select Settings > Repository.
33
+ 3. Under Default branch, verify that initial default branch protection is applied to the "main" or default branch.
34
+ remediation: |
35
+ Perform the following to enforce branch protection on the main or default branch at the project level:
36
+ 1. Navigate to your project page.
37
+ 2. Select Settings > Repository.
38
+ 3. Expand Protected branches.
39
+ 4. Select Add protected branch.
40
+ 5. From the Branch dropdown list, select the project's main or default branch.
41
+ 6. Choose the roles who should be Allowed to merge and Allowed to push and merge for this protected default branch.
42
+ 7. Select Protect.
43
+
44
+ Perform the following to enforce branch protection on the main or default branch of new projects at the group level:
45
+ 1. Navigate to the main page for your GitLab group.
46
+ 2. Select Settings > Repository.
47
+ 3. Expand Default branch
48
+ 4. Enable initial default branch protection for the "main" or default branch of new repositories created in the group.
49
+ 5. Select Save changes.
50
+
51
+ Perform the following to enforce branch protection on the main branch of new projects at the instance level (self-managed GitLab administrators only):
52
+ 1. Navigate to Admin Area.
53
+ 2. Select Settings > Repository.
54
+ 3. Expand Default branch.
55
+ 4. Enable initial default branch protection for the "main" or default branch of new repositories created on this GitLab instance.
56
+ 5. Select Save changes.
57
+ default_value:
58
+ references:
59
+ - https://docs.gitlab.com/ee/api/protected_branches.html
60
+ - https://docs.gitlab.com/ee/api/group_protected_branches.html
61
+ - https://docs.gitlab.com/ee/api/settings.html
62
+ cis_controls:
63
+ - id: 16.1
64
+ version: 8
65
+ name: Establish and Maintain a Secure Application Development Process
66
+ description: >-
67
+ Establish and maintain a secure application development process. In the
68
+ process, address such items as: secure application design standards, secure coding
69
+ practices, developer training, vulnerability management, security of third-party code,
70
+ and application security testing procedures. Review and update documentation
71
+ annually, or when significant enterprise changes occur that could impact this
72
+ Safeguard.
73
+ implementation_groups:
74
+ - IG2
75
+ - IG3
76
+ - id: 18.1
77
+ version: 7
78
+ name: Establish Secure Coding Practices
79
+ description: >-
80
+ Establish secure coding practices appropriate to the programming language and
81
+ development environment being used.
82
+ implementation_groups:
83
+ - IG2
84
+ - IG3
85
+ additional_info: >-
@@ -0,0 +1,76 @@
1
+ ---
2
+ id: 1.1.17
3
+ name: deny_branch_deletions
4
+ title: Ensure branch deletions are denied
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Ensure that users with only push access are incapable of deleting a protected branch.
10
+ rationale: >-
11
+ When enabling deletion of a protected branch, any user with at least push access to the
12
+ repository can delete a branch. This can be potentially dangerous, as a simple human
13
+ mistake or a hacked account can lead to data loss if a branch is deleted. It is therefore
14
+ crucial to prevent such incidents by denying protected branch deletion.
15
+ impact: >-
16
+ audit: |
17
+ For each repository that is being used, verify that protected branches cannot be deleted by performing the following:
18
+ • View your protected branches by going to the left sidebar and selecting Search or go to the Homepage and find your project.
19
+ • Select Settings > Repository.
20
+ • Expand Protected branches to view a list of protected branches
21
+ remediation: |
22
+ For each repository that is being used, protect a branch in order to block the option to delete branches. To protect a branch for one project:
23
+ 1. On the left sidebar, select Search or go to and find your project.
24
+ 2. Select Settings > Repository.
25
+ 3. Expand Protected branches.
26
+ 4. Select Add protected branch.
27
+ 5. From the Branch dropdown list, select the branch you want to protect.
28
+ 6. From the Allowed to merge list, select a role that can merge into this branch.
29
+ 7. From the Allowed to push and merge list, select a role that can push to this branch.
30
+
31
+ Group owners can create protected branches at the group level. These settings are
32
+ inherited by all projects in the group and can't be overridden by project settings. If a
33
+ specific branch is configured with Allowed to force push settings at both the group and
34
+ project levels, the Allowed to force push setting at the project level is ignored in favor
35
+ of the group level setting.
36
+
37
+ • You must have the Owner role in the group.
38
+
39
+ To protect a branch for all the projects in a group:
40
+ 1. On the left sidebar, select Search or go to and find your group.
41
+ 2. Select Settings > Repository.
42
+ 3. Expand Protected branches.
43
+ 4. Select Add protected branch.
44
+ 5. In the Branch text box, type the branch name or a wildcard. Branch names and wildcards are case-sensitive.
45
+ 6. From the Allowed to merge list, select a role that can merge into this branch.
46
+ 7. From the Allowed to push and merge list, select a role that can push to this branch.
47
+ 8. Select Protect.
48
+ default_value:
49
+ references:
50
+ - https://docs.gitlab.com/ee/user/project/protected_branches.html
51
+ cis_controls:
52
+ - id: 3.3
53
+ version: 8
54
+ name: Configure Data Access Control Lists
55
+ description: >-
56
+ Configure data access control lists based on a user's need to know. Apply data
57
+ access control lists, also known as access permissions, to local and remote file
58
+ systems, databases, and applications.
59
+ implementation_groups:
60
+ - IG1
61
+ - IG2
62
+ - IG3
63
+ - id: 14.6
64
+ version: 7
65
+ name: Protect Information through Access Control Lists
66
+ description: >-
67
+ Protect all information stored on systems with file system, network share,
68
+ claims, application, or database specific access control lists. These controls will
69
+ enforce the principle that only authorized individuals should have access to the
70
+ information based on their need to access the information as a part of their
71
+ responsibilities.
72
+ implementation_groups:
73
+ - IG1
74
+ - IG2
75
+ - IG3
76
+ additional_info: >-
@@ -0,0 +1,59 @@
1
+ ---
2
+ id: 1.1.16
3
+ name: ensure_force_push_is_denied
4
+ title: Ensure force push code to branches is denied
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ The "Force Push" option allows users with "Push" permissions to force their changes
10
+ directly to the branch without a merge request, and thus should be disabled.
11
+ rationale: >-
12
+ The "Force Push" option allows users to override the existing code with their own code.
13
+ This can lead to both intentional and unintentional data loss, as well as data infection
14
+ with malicious code. Disabling the "Force Push" option prohibits users from forcing their
15
+ changes to the master branch, which ultimately prevents malicious code from entering
16
+ source code.
17
+ impact: >-
18
+ Users cannot force push to protected branches.
19
+ audit: |
20
+ For every code repository in use, validate that no one can force push code by performing the following:
21
+ • On GitLab, navigate to the main page of the repository.
22
+ • Navigate to Settings > Repository.
23
+ • Click Expand next to the Protected Branches section.
24
+ • Verify that your repository's main (or default) branch is protected.
25
+ • Verify that "Allowed to force push" is toggled off.
26
+ remediation: |
27
+ For each repository in use, block the option to "Force Push" code by performing the following:
28
+ • On GitLab, navigate to the main page of the repository.
29
+ • Navigate to Settings > Repository .
30
+ • Click Expand next to the Protected Branches section.
31
+ • Ensure your project's default branch is protected.
32
+ • Toggle "Allowed to force push" off.
33
+ default_value:
34
+ references:
35
+ - https://docs.gitlab.com/ee/user/project/protected_branches.html
36
+ cis_controls:
37
+ - id: 16.1
38
+ version: 8
39
+ name: Establish and Maintain a Secure Application Development Process
40
+ description: >-
41
+ Establish and maintain a secure application development process. In the
42
+ process, address such items as: secure application design standards, secure coding
43
+ practices, developer training, vulnerability management, security of third-party code,
44
+ and application security testing procedures. Review and update documentation
45
+ annually, or when significant enterprise changes occur that could impact this
46
+ Safeguard.
47
+ implementation_groups:
48
+ - IG2
49
+ - IG3
50
+ - id: 18.1
51
+ version: 7
52
+ name: Establish Secure Coding Practices
53
+ description: >-
54
+ Establish secure coding practices appropriate to the programming language and
55
+ development environment being used.
56
+ implementation_groups:
57
+ - IG2
58
+ - IG3
59
+ additional_info: >-