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,12 @@
1
+ # 4 Artifacts
2
+
3
+ This section consists of security recommendations for the management of artifacts produced by build pipelines, as well as ones used by the application in the build process itself.
4
+
5
+ Artifacts are packaged versions of software. They are stored in package registries (or artifact managers) and require securing from the moment they are created, through the time they are copied and updated, and up to deployment to their relevant environment.
6
+
7
+ ## Sections
8
+
9
+ - [4.1 - Verification](./verification_4_1/)
10
+ - [4.2 - Access to Artifacts](./access_to_artifacts_4_2/)
11
+ - [4.3 - Package Registries](./package_registries_4_3/)
12
+ - [4.4 - Origin Traceability](./origin_traceability_4_4/)
@@ -0,0 +1,47 @@
1
+ ---
2
+ id: 4.1.2
3
+ name: encrypt_artifacts_before_distribution
4
+ title: Ensure artifacts are encrypted before distribution
5
+ profile: 1
6
+ category: artifacts
7
+ sub_category: verification
8
+ description: >-
9
+ Encrypt artifacts before they are distributed and ensure only trusted platforms have
10
+ decryption capabilities.
11
+ rationale: >-
12
+ Build artifacts might contain sensitive data such as production configurations. In order to
13
+ protect them and decrease the risk for breach, it is recommended to encrypt them
14
+ before delivery. Encryption makes data unreadable, so even if attackers gain access to
15
+ these artifacts, they won't be able to harvest sensitive data from them without the
16
+ decryption key.
17
+ impact: >-
18
+ audit: >-
19
+ Ensure every artifact is encrypted before it is delivered.
20
+ remediation: >-
21
+ Encrypt every artifact before distribution.
22
+ default_value: Artifacts do not get encrypted by default.
23
+ references:
24
+ cis_controls:
25
+ - id: 3.11
26
+ version: 8
27
+ name: Encrypt Sensitive Data at Rest
28
+ description: >-
29
+ Encrypt sensitive data at rest on servers, applications, and databases containing
30
+ sensitive data. Storage-layer encryption, also known as server-side encryption,
31
+ meets the minimum requirement of this Safeguard. Additional encryption methods
32
+ may include application-layer encryption, also known as client-side encryption,
33
+ where access to the data storage device(s) does not permit access to the plain-text
34
+ data.
35
+ implementation_groups:
36
+ - IG2
37
+ - IG3
38
+ - id: 14.8
39
+ version: 7
40
+ name: Encrypt Sensitive Information at Rest
41
+ description: >-
42
+ Encrypt all sensitive information at rest using a tool that requires a secondary
43
+ authentication mechanism not integrated into the operating system, in order to
44
+ access the information.
45
+ implementation_groups:
46
+ - IG3
47
+ additional_info: >-
@@ -0,0 +1,59 @@
1
+ ---
2
+ id: 4.1.3
3
+ name: only_authorized_platforms_can_decrypt_artifacts
4
+ title: Ensure only authorized platforms have decryption capabilities of artifacts
5
+ profile: 1
6
+ category: artifacts
7
+ sub_category: verification
8
+ description: >-
9
+ Grant decryption capabilities of artifacts only to trusted and authorized platforms.
10
+ rationale: >-
11
+ Build artifacts might contain sensitive data such as production configuration. To protect
12
+ them and decrease the risk of a breach, it is recommended to encrypt them before
13
+ delivery. This will make them unreadable for every unauthorized user who doesn't have
14
+ the decryption key. By implementing this, the decryption capabilities become overly
15
+ sensitive in order to prevent a data leak or theft. Ensuring that only trusted and
16
+ authorized platforms can decrypt the organization's packages decreases the possibility
17
+ for an attacker to gain access to the critical data in artifacts.
18
+ impact: >-
19
+ audit: >-
20
+ Ensure only trusted and authorized platforms have decryption capabilities of the
21
+ organization's artifacts.
22
+ remediation: >-
23
+ Grant decryption capabilities of the organization's artifacts only for trusted and
24
+ authorized platforms.
25
+ default_value:
26
+ references:
27
+ cis_controls:
28
+ - id: 2.5
29
+ version: 8
30
+ name: Allowlist Authorized Software
31
+ description: >-
32
+ Use technical controls, such as application allowlisting, to ensure that only
33
+ authorized software can execute or be accessed. Reassess bi-annually, or more
34
+ frequently.
35
+ implementation_groups:
36
+ - IG2
37
+ - IG3
38
+ - id: 2.6
39
+ version: 8
40
+ name: Allowlist Authorized Libraries
41
+ description: >-
42
+ Use technical controls to ensure that only authorized software libraries, such
43
+ as specific .dll, .ocx, .so, etc., files, are allowed to load into a system process.
44
+ Block unauthorized libraries from loading into a system process. Reassess bi-
45
+ annually, or more frequently.
46
+ implementation_groups:
47
+ - IG2
48
+ - IG3
49
+ - id: 2.7
50
+ version: 8
51
+ name: Allowlist Authorized Scripts
52
+ description: >-
53
+ Use technical controls, such as digital signatures and version control, to ensure
54
+ that only authorized scripts, such as specific .ps1, .py, etc., files, are allowed to
55
+ execute. Block unauthorized scripts from executing. Reassess bi-annually, or more
56
+ frequently
57
+ implementation_groups:
58
+ - IG3
59
+ additional_info: >-
@@ -0,0 +1,11 @@
1
+ # 4.1 Verification
2
+
3
+ This section consists of security recommendations for managing verification of artifacts.
4
+
5
+ When build artifacts are being pushed to the registry, a lot of different attacks can happen: a malicious artifact with the same name can be pushed, the artifact can be stolen over the network or if the registry is hacked, etc. It is important to secure artifacts by ensuring various verification methods, listed in the recommendations in this section, are available.
6
+
7
+ ## Recommendations
8
+
9
+ * [4.1.1 - sign_artifacts_in_build_pipeline.yml](./sign_artifacts_in_build_pipeline.yml)
10
+ * [4.1.2 - encrypt_artifacts_before_distribution.yml](./encrypt_artifacts_before_distribution.yml)
11
+ * [4.1.3 - only_authorized_platforms_can_decrypt_artifacts.yml](./only_authorized_platforms_can_decrypt_artifacts.yml)
@@ -0,0 +1,40 @@
1
+ ---
2
+ id: 4.1.1
3
+ name: sign_artifacts_in_build_pipeline
4
+ title: Ensure all artifacts are signed by the build pipeline itself
5
+ profile: 2
6
+ category: artifacts
7
+ sub_category: verification
8
+ description: >-
9
+ Configure the build pipeline to sign every artifact it produces and verify that each artifact
10
+ has the appropriate signature.
11
+ rationale: >-
12
+ A cryptographic signature can be used to verify artifact authenticity. The signature
13
+ created with a certain key is unique and not reversible, thus making it unique to the
14
+ author. This means that an attacker tampering with a signed artifact will be noticed
15
+ immediately using a simple verification step because the signature will change. Signing
16
+ artifacts by the build pipeline that produces them ensures the integrity of those artifacts.
17
+ impact: >-
18
+ audit: >-
19
+ Verify that the build pipeline signs every new artifact it produces and all artifacts are signed.
20
+ There are many different signing tools or options each have there own method or
21
+ commands to verify that the code or package created is signed.
22
+ remediation: >-
23
+ Sign every artifact produced with the build pipeline that created it. Configure the build
24
+ pipeline to sign each artifact.
25
+ default_value: Artifacts are not signed by Default.
26
+ references:
27
+ cis_controls:
28
+ - id: 0.0
29
+ version: 8
30
+ name: Explicitly Not Mapped
31
+ description: >-
32
+ Explicitly Not Mapped
33
+ implementation_groups:
34
+ - id: 0.0
35
+ version: 7
36
+ name: Explicitly Not Mapped
37
+ description: >-
38
+ Explicitly Not Mapped
39
+ implementation_groups:
40
+ additional_info: >-
@@ -0,0 +1,55 @@
1
+ ---
2
+ id: 2.1.6
3
+ name: authenticate_build_access
4
+ title: Ensure users must authenticate to access the build environment
5
+ profile: 1
6
+ category: build_pipelines
7
+ sub_category: build_environment
8
+ description: >-
9
+ Require users to login in to access the build environment - where the orchestrator, the
10
+ pipeline executer, where the build workers are running, etc.
11
+ rationale: >-
12
+ Requiring users to authenticate and disabling anonymous access to the build
13
+ environment allows organization to track every action on that environment, good or bad,
14
+ to its actor. This will help recognizing attack and its attacker becuase the authentication
15
+ is required.
16
+ impact: >-
17
+ Anonymous users won't be able to access the build environment.
18
+ audit: |
19
+ Ensure authentication is required to access the build environment.
20
+ In GitLab, viewing environments in private projects is limited to Reporter roles at least and you must have at least the Developer role to create a new environment. Both require prior authentication.
21
+ • On the left sidebar, select Search or go to and find your project.
22
+ • Select Manage > Members.
23
+ • At the top of the member list, from the dropdown list, select Max role the members have in the group and descending order.
24
+ • If there are minimum number of members with Reporter/Developer role or above in the list, you are compliant.
25
+ remediation: |
26
+ Require authentication to access the build environment and disable anonymous access.
27
+ In GitLab, viewing environments in private projects is limited to Reporter roles at least and you must have at least the Developer role to create a new environment. Both require prior authentication.
28
+ • On the left sidebar, select Search or go to and find your project.
29
+ • Select Manage > Members.
30
+ • At the top of the member list, from the dropdown list, select Max role the members have in the group and descending order.
31
+ • Next to the project member you want to remove, select Remove member
32
+ default_value:
33
+ references:
34
+ - https://docs.gitlab.com/ee/ci/environments/#environment-permissions
35
+ cis_controls:
36
+ - id: 2.5
37
+ version: 8
38
+ name: Allowlist Authorized Software
39
+ description: >-
40
+ Use technical controls, such as application allowlisting, to ensure that only
41
+ authorized software can execute or be accessed. Reassess bi-annually, or more
42
+ frequently.
43
+ implementation_groups:
44
+ - IG2
45
+ - IG3
46
+ - id: 2.7
47
+ version: 7
48
+ name: Utilize Application Whitelisting
49
+ description: >-
50
+ Utilize application whitelisting technology on all assets to ensure that only
51
+ authorized software executes and all unauthorized software is blocked from
52
+ executing on assets.
53
+ implementation_groups:
54
+ - IG3
55
+ additional_info: >-
@@ -0,0 +1,54 @@
1
+ ---
2
+ id: 2.1.4
3
+ name: build_automation
4
+ title: Ensure the creation of the build environment is automated
5
+ profile: 1
6
+ category: build_pipelines
7
+ sub_category: build_environment
8
+ description: >-
9
+ Automate the creation of the build environment.
10
+ rationale: >-
11
+ Automating the deployment of the build environment reduces the risk for human
12
+ mistakes — such as a wrong configuration or exposure of sensitive data — because it
13
+ requires less human interaction and intervention. It also eases re-deployment of the
14
+ environment. It is best to automate with Infrastructure as Code because it offers more
15
+ control over changes made to the environment creation configuration and stores to a
16
+ version control platform.
17
+ impact: >-
18
+ audit: |
19
+ Verify that the deployment of the build environment is automated and can be easily redeployed.
20
+ In GitLab, build environments are automatically created for each CI/CD pipeline. To verify that a build environment has been automatically created, do the following:
21
+ • On the left sidebar, select Search or go to and find your project.
22
+ • Select Operate > Environments.
23
+ • Review the environments.
24
+ remediation: >-
25
+ Automate the deployment of the build environment.
26
+ In GitLab, build environments are automatically created for each CI/CD pipeline.
27
+ To automate a deployment of the build environment, you need to create a CI/CD pipeline using the gitlab-ci.yml file.
28
+ default_value:
29
+ references:
30
+ - https://docs.gitlab.com/ee/ci/environments/
31
+ cis_controls:
32
+ - id: 16.1
33
+ version: 8
34
+ name: Establish and Maintain a Secure Application Development Process
35
+ description: >-
36
+ Establish and maintain a secure application development process. In the
37
+ process, address such items as: secure application design standards, secure coding
38
+ practices, developer training, vulnerability management, security of third-party code,
39
+ and application security testing procedures. Review and update documentation
40
+ annually, or when significant enterprise changes occur that could impact this
41
+ Safeguard.
42
+ implementation_groups:
43
+ - IG2
44
+ - IG3
45
+ - id: 18.1
46
+ version: 7
47
+ name: Establish Secure Coding Practices
48
+ description: >-
49
+ Establish secure coding practices appropriate to the programming language and
50
+ development environment being used.
51
+ implementation_groups:
52
+ - IG2
53
+ - IG3
54
+ additional_info: >-
@@ -0,0 +1,55 @@
1
+ ---
2
+ id: 2.1.11
3
+ name: build_env_admins
4
+ title: Ensure minimum number of administrators are set for the build environment
5
+ profile: 1
6
+ category: build_pipelines
7
+ sub_category: build_environment
8
+ description: >-
9
+ Ensure the build environment has a minimum number of administrators.
10
+ rationale: >-
11
+ Build environment administrators have the highest level of permissions, including the
12
+ ability to add/remove users, create or delete pipelines, control build workers, change
13
+ build trigger permissions and more. Due to the permissive access granted to a build
14
+ environment administrator, it is highly recommended to keep the number of
15
+ administrator accounts as minimal as possible.
16
+ impact: >-
17
+ audit: |
18
+ Verify that the build environment has only the minimum number of administrators.
19
+ • On the left sidebar, select Search or go to and find your project.
20
+ • Select Manage > Members.
21
+ • At the top of the member list, from the dropdown list, select Max role the members have in the group and descending order.
22
+ • If there are minimum number of members with Owner/Maintainer role in the list, you are compliant.
23
+ remediation: |
24
+ Set the minimum number of administrators in the build environment.
25
+ • On the left sidebar, select Search or go to and find your project.
26
+ • Select Manage > Members.
27
+ • At the top of the member list, from the dropdown list, select Max role the members have in the group and descending order.
28
+ • Next to the project member you want to remove, select Remove member.
29
+ default_value:
30
+ references:
31
+ cis_controls:
32
+ - id: 5.4
33
+ version: 8
34
+ name: Restrict Administrator Privileges to Dedicated Administrator Accounts
35
+ description: >-
36
+ Restrict administrator privileges to dedicated administrator accounts on
37
+ enterprise assets. Conduct general computing activities, such as internet
38
+ browsing, email, and productivity suite use, from the user's primary, non-privileged
39
+ account.
40
+ implementation_groups:
41
+ - IG1
42
+ - IG2
43
+ - IG3
44
+ - id: 4.3
45
+ version: 7
46
+ name: Ensure the Use of Dedicated Administrative Accounts
47
+ description: >-
48
+ Ensure that all users with administrative account access use a dedicated or
49
+ secondary account for elevated activities. This account should only be used for
50
+ administrative activities and not internet browsing, email, or similar activities.
51
+ implementation_groups:
52
+ - IG1
53
+ - IG2
54
+ - IG3
55
+ additional_info: >-
@@ -0,0 +1,49 @@
1
+ ---
2
+ id: 2.1.3
3
+ name: build_logging
4
+ title: Ensure the build environment is logged
5
+ profile: 1
6
+ category: build_pipelines
7
+ sub_category: build_environment
8
+ description: >-
9
+ Keep build logs of the build environment detailing configuration and all activity within it.
10
+ Also, consider to store them in a centralized organizational log store.
11
+ rationale: >-
12
+ Logging the environment is important for two primary reasons: one, for debugging and
13
+ investigating the environment in case of a bug or security incident; and two, for
14
+ reproducing the environment easily when needed. Storing these logs in a centralized
15
+ organizational log store allows the organization to generate useful insights and identify
16
+ anomalies in the build process faster.
17
+ impact: >-
18
+ audit: |
19
+ Verify that the build environment is logged and stored in a centralized organizational log store.
20
+ When a build environment is created, all information related to the environment is logged as part of the job logs.
21
+ Depending on the stage in the build environment lifecycle, the path to retrieve the logs will differ:
22
+
23
+ • When a job is running: #{ROOT_PATH}/gitlab-ci/builds/#{YYYY_mm}/#{project_id}/#{job_id}.log
24
+ • After a job is finished: #{ROOT_PATH}/gitlab-rails/shared/artifacts/#{disk_hash}/#{YYYY_mm_dd}/#{job_id}/#{job_artifact_id}/job.log
25
+ • After a log is archived: #{bucket_name}/#{disk_hash}/#{YYYY_mm_dd}/#{job_id}/#{job_artifact_id}/job.log
26
+ remediation: >-
27
+ Keep logs of the build environment. Also, store the logs in a centralized organizational log store.
28
+ This is automatically done by GitLab and can be retrieved in the paths mentioned in the audit section.
29
+ default_value:
30
+ references:
31
+ - https://docs.gitlab.com/ee/administration/job_logs.html
32
+ cis_controls:
33
+ - id: 3.14
34
+ version: 8
35
+ name: Log Sensitive Data Access
36
+ description: >-
37
+ Log sensitive data access, including modification and disposal.
38
+ implementation_groups:
39
+ - IG3
40
+ - id: 14.9
41
+ version: 7
42
+ name: Enforce Detail Logging for Access or Changes to Sensitive Data
43
+ description: >-
44
+ Enforce detailed audit logging for access to sensitive data or changes to
45
+ sensitive data (utilizing tools such as File Integrity Monitoring or Security
46
+ Information and Event Monitoring).
47
+ implementation_groups:
48
+ - IG3
49
+ additional_info: >-
@@ -0,0 +1,54 @@
1
+ ---
2
+ id: 2.1.9
3
+ name: disable_build_tools_default_passwords
4
+ title: Ensure default passwords are not used
5
+ profile: 1
6
+ category: build_pipelines
7
+ sub_category: build_environment
8
+ description: >-
9
+ Do not use default passwords of build tools and components.
10
+ rationale: >-
11
+ Sometimes build tools and components are provided with default passwords for the first
12
+ login. This password is intended to be used only on the first login and should be
13
+ changed immediately after. Using the default password substantially increases the
14
+ attack risk. It is especially important to ensure that default passwords are not used in
15
+ build tools and components.
16
+ impact: >-
17
+ audit: |
18
+ GitLab's default root password depends on the installation method, and when the installation occurred:
19
+ 1. When deploying a GitLab instance using the official AWS AMI, the root password to the instance is the EC2 Instance ID
20
+ 2. Most installation methods allow a non-default password to be provided as configuration
21
+ 3. Prior to 14.0 the default password was 5iveL!fe
22
+ 4. Otherwise the default password is unique and randomly generated.
23
+ Attempt to log in as root using a suspected default password to audit whether it has changed.
24
+ For any other external build tools, ensure the password used is not the default one.
25
+ remediation: >-
26
+ GitLab's root password can be changed by an administrator using the UI, the
27
+ “gitlab:password:reset” rake task, or by using the Rails console.
28
+ For each build tool with a default password, change to a unique cryptographically
29
+ secure pseudorandom password.
30
+ default_value:
31
+ references:
32
+ cis_controls:
33
+ - id: 5.2
34
+ version: 8
35
+ name: Use Unique Passwords
36
+ description: >-
37
+ Use unique passwords for all enterprise assets. Best practice implementation
38
+ includes, at a minimum, an 8-character password for accounts using MFA and a
39
+ 14-character password for accounts not using MFA.
40
+ implementation_groups:
41
+ - IG1
42
+ - IG2
43
+ - IG3
44
+ - id: 4.2
45
+ version: 7
46
+ name: Change Default Passwords
47
+ description: >-
48
+ Before deploying any new asset, change all default passwords to have values
49
+ consistent with administrative level accounts.
50
+ implementation_groups:
51
+ - IG1
52
+ - IG2
53
+ - IG3
54
+ additional_info: >-
@@ -0,0 +1,60 @@
1
+ ---
2
+ id: 2.1.2
3
+ name: immutable_pipeline_infrastructure
4
+ title: Ensure all aspects of the pipeline infrastructure and configuration are immutable
5
+ profile: 1
6
+ category: build_pipelines
7
+ sub_category: build_environment
8
+ description: >-
9
+ Ensure the pipeline orchestrator and its configuration are immutable.
10
+ rationale: >-
11
+ An immutable infrastructure is one that cannot be changed during execution of the
12
+ pipeline. This can be done, for example, by using Infrastructure as Code for configuring
13
+ the pipeline and the pipeline environment. Utilizing such infrastructure creates a more
14
+ predictable environment because updates will require re-deployment to prevent any
15
+ previous configuration from interfering. Because it is dependent on automation, it is
16
+ easier to revert changes. Testing code is also simpler because it is based on
17
+ virtualization. Most importantly, an immutable pipeline infrastructure ensures that a
18
+ potential attacker seeking to compromise the build environment itself would not be able
19
+ to do so if the orchestrator, its configuration, and any other component cannot be
20
+ changed. Verifying that all aspects of the pipeline infrastructure and configuration are
21
+ immutable therefore keeps them safe from malicious tampering attempts.
22
+ impact: >-
23
+ audit: >-
24
+ Verify that the pipeline orchestrator, its configuration, and all other aspects of the build
25
+ environment are immutable.
26
+ remediation: >-
27
+ Use an immutable pipeline orchestrator and ensure that its configuration and all other
28
+ aspects of the built environment are immutable, as well.
29
+ default_value:
30
+ references:
31
+ cis_controls:
32
+ - id: 16.1
33
+ version: 8
34
+ name: Establish and Maintain a Secure Application Development Process
35
+ description: >-
36
+ Establish and maintain a secure application development process. In the
37
+ process, address such items as: secure application design standards, secure coding
38
+ practices, developer training, vulnerability management, security of third-party code,
39
+ and application security testing procedures. Review and update documentation
40
+ annually, or when significant enterprise changes occur that could impact this
41
+ Safeguard.
42
+ implementation_groups:
43
+ - IG2
44
+ - IG3
45
+ - id: 18.1
46
+ version: 8
47
+ name: Establish and Maintain a Penetration Testing Program
48
+ description: >-
49
+ Establish and maintain a penetration testing program appropriate to the size,
50
+ complexity, and maturity of the enterprise. Penetration testing program
51
+ characteristics include scope, such as network, web application, Application
52
+ Programming Interface (API), hosted services, and physical premise controls;
53
+ frequency; limitations, such as acceptable hours, and excluded attack types; point of
54
+ contact information; remediation, such as how findings will be routed internally; and
55
+ retrospective requirements.
56
+ implementation_groups:
57
+ - IG1
58
+ - IG2
59
+ - IG3
60
+ additional_info: >-
@@ -0,0 +1,64 @@
1
+ ---
2
+ id: 2.1.5
3
+ name: limit_build_access
4
+ title: Ensure access to build environments is limited
5
+ profile: 1
6
+ category: build_pipelines
7
+ sub_category: build_environment
8
+ description: >-
9
+ Restrict access to the build environment (orchestrator, pipeline executor, their
10
+ environment, etc.) to trusted and qualified users only.
11
+ rationale: >-
12
+ A build environment contains sensitive data such as environment variables, secrets,
13
+ and the source code itself. Any user that has access to this environment can make
14
+ changes to the build process, including changes to the code within it. Restricting access
15
+ to the build environment to trusted and qualified users only will reduce the risk for
16
+ mistakes such as exposure of secrets or misconfiguration. Limiting access also reduces
17
+ the number of accounts that are vulnerable to hijacking in order to potentially harm the
18
+ build environment.
19
+ impact: >-
20
+ Reducing the number of users who have access to the build process means those
21
+ users would lose their ability to make direct changes to that process.
22
+ audit: |
23
+ Verify each build environment is accessible only to known and authorized users.
24
+ In GitLab, viewing environments in private projects is limited to Reporter roles at least and you must have at least the Developer role to create a new environment
25
+ • On the left sidebar, select Search or go to and find your project.
26
+ • Select Manage > Members.
27
+ • At the top of the member list, from the dropdown list, select Max role the members have in the group and descending order.
28
+ • If there are minimum number of members with Reporter/Developer role or above in the list, you are compliant.
29
+ remediation: |
30
+ Restrict access to the build environment to trusted and qualified users.
31
+
32
+ In GitLab, viewing environments in private projects is limited to Reporter roles at least and you must have at least the Developer role to create a new environment
33
+ • On the left sidebar, select Search or go to and find your project.
34
+ • Select Manage > Members.
35
+ • At the top of the member list, from the dropdown list, select Max role the members have in the group and descending order.
36
+ • Next to the project member you want to remove, select Remove member
37
+ default_value:
38
+ references:
39
+ - https://docs.gitlab.com/ee/ci/environments/#environment-permissions
40
+ cis_controls:
41
+ - id: 3.3
42
+ version: 8
43
+ name: Configure Data Access Control Lists
44
+ description: >-
45
+ Configure data access control lists based on a user's need to know. Apply data
46
+ access control lists, also known as access permissions, to local and remote file
47
+ systems, databases, and applications.
48
+ implementation_groups:
49
+ - IG1
50
+ - IG2
51
+ - IG3
52
+ - id: 14.6
53
+ version: 7
54
+ name: Protect Information through Access Control Lists
55
+ description: >-
56
+ Protect all information stored on systems with file system, network share, claims,
57
+ application, or database specific access control lists. These controls will enforce the
58
+ principle that only authorized individuals should have access to the information
59
+ based on their need to access the information as a part of their responsibilities.
60
+ implementation_groups:
61
+ - IG1
62
+ - IG2
63
+ - IG3
64
+ additional_info: >-
@@ -0,0 +1,56 @@
1
+ ---
2
+ id: 2.1.7
3
+ name: limit_build_secrets_scope
4
+ title: Ensure build secrets are limited to the minimal necessary scope
5
+ profile: 2
6
+ category: build_pipelines
7
+ sub_category: build_environment
8
+ description: >-
9
+ Build tools providers offer a secure way to store secrets that should be used during the
10
+ build process. These secrets will often be credentials used to access other tools, for
11
+ example for pulling code or for uploading artifacts. Access to these secrets can be
12
+ defined on various scopes. To protect these critical assets it is important to choose the
13
+ most restrictive scope necessary.
14
+ rationale: >-
15
+ Allowing over permissive access to these secrets may affect on their exposure. For
16
+ example if a secret is defined in an organization level, and users can create new
17
+ repositories, there is a scenario where a user can create a new repo and run a
18
+ controlled build just to exfiltrate these secrets.
19
+ impact: >-
20
+ Increased risk of exposure of build related secrets.
21
+ audit: |
22
+ In the gitlab-ci.yml file, review the secrets permission scope defined in either a file or in
23
+ an external secrets manager.
24
+ remediation: >-
25
+ In the gitlab-ci.yml file, review the secrets defined in either a file or in an external secrets
26
+ manager and change over permissive scopes to more restrictive ones based on the
27
+ required access.
28
+ default_value:
29
+ references:
30
+ - https://docs.gitlab.com/ee/ci/yaml/index.html#secrets
31
+ - https://docs.gitlab.com/ee/ci/secrets/index.html
32
+ cis_controls:
33
+ - id: 5.4
34
+ version: 8
35
+ name: Restrict Administrator Privileges to Dedicated Administrator Accounts
36
+ description: >-
37
+ Restrict administrator privileges to dedicated administrator accounts on
38
+ enterprise assets. Conduct general computing activities, such as internet
39
+ browsing, email, and productivity suite use, from the user's primary, non-privileged
40
+ account.
41
+ implementation_groups:
42
+ - IG1
43
+ - IG2
44
+ - IG3
45
+ - id: 4.3
46
+ version: 7
47
+ name: Ensure the Use of Dedicated Administrative Accounts
48
+ description: >-
49
+ Ensure that all users with administrative account access use a dedicated or
50
+ secondary account for elevated activities. This account should only be used for
51
+ administrative activities and not internet browsing, email, or similar activities.
52
+ implementation_groups:
53
+ - IG1
54
+ - IG2
55
+ - IG3
56
+ additional_info: >-
@@ -0,0 +1,19 @@
1
+ # 2.1 Build Environment
2
+
3
+ This section consists of security recommendations for the build pipelines environment.
4
+
5
+ Build environment is everything related to the infrastructure of the organization's artifacts build - the orchestrator, the pipeline executer, where the build workers are running, while pipeline is a set of commands that runs in the build environment. Most of the build environment recommendations are relevant for self-hosted build platforms only. For example, instance of CircleCi that is self-hosted.
6
+
7
+ ## Recommendations
8
+
9
+ * [2.1.1 - single_responsibility_pipeline.yml](./single_responsibility_pipeline.yml)
10
+ * [2.1.2 - immutable_pipeline_infrastructure.yml](./immutable_pipeline_infrastructure.yml)
11
+ * [2.1.3 - build_logging.yml](./build_logging.yml)
12
+ * [2.1.4 - build_automation.yml](./build_automation.yml)
13
+ * [2.1.5 - limit_build_access.yml](./limit_build_access.yml)
14
+ * [2.1.6 - authenticate_build_access.yml](./authenticate_build_access.yml)
15
+ * [2.1.7 - limit_build_secrets_scope.yml](./limit_build_secrets_scope.yml)
16
+ * [2.1.8 - vuln_scanning.yml](./vuln_scanning.yml)
17
+ * [2.1.9 - disable_build_tools_default_passwords.yml](./disable_build_tools_default_passwords.yml)
18
+ * [2.1.10 - secure_build_env_webhooks.yml](./secure_build_env_webhooks.yml)
19
+ * [2.1.11 - build_env_admins.yml](./build_env_admins.yml)