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,56 @@
1
+ ---
2
+ id: 1.1.13
3
+ name: linear_history_required
4
+ title: Ensure linear history is required
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Linear history is the name for Git history where all commits are listed in chronological
10
+ order, one after another. Such history exists if a merge request is merged either by rebase
11
+ merge (re-order the commits history) or squash merge (squashes all commits to one).
12
+ Ensure that linear history is required by requiring the use of rebase or squash merge
13
+ when merging a merge request.
14
+ rationale: >-
15
+ Enforcing linear history produces a clear record of activity, and as such it offers specific
16
+ advantages: it is easier to follow, easier to revert a change, and bugs can be found
17
+ more easily.
18
+ impact: >-
19
+ Merge requests cannot be merged except squash or rebase merge.
20
+ audit: |
21
+ For every project, perform the following steps:
22
+ • Navigate to your project
23
+ • In the sidebar, select Settings > Merge Requests
24
+ • Under 'Merge method', if 'Merge Commit' or 'Merge commit with semi-linear history' is selected then the project is not-compliant.
25
+ remediation: |
26
+ For every project, perform the following steps:
27
+ • Navigate to your project
28
+ • In the sidebar, select Settings > Repository
29
+ • Under 'Merge method', select 'Fast-forward merge'.
30
+ default_value:
31
+ references:
32
+ - https://docs.gitlab.com/ee/user/project/merge_requests/methods/
33
+ cis_controls:
34
+ - id: 16.1
35
+ version: 8
36
+ name: Establish and Maintain a Secure Application Development Process
37
+ description: >-
38
+ Establish and maintain a secure application development process. In the
39
+ process, address such items as: secure application design standards, secure coding
40
+ practices, developer training, vulnerability management, security of third-party code,
41
+ and application security testing procedures. Review and update documentation
42
+ annually, or when significant enterprise changes occur that could impact this
43
+ Safeguard.
44
+ implementation_groups:
45
+ - IG2
46
+ - IG3
47
+ - id: 18.1
48
+ version: 7
49
+ name: Establish Secure Coding Practices
50
+ description: >-
51
+ Establish secure coding practices appropriate to the programming language and
52
+ development environment being used.
53
+ implementation_groups:
54
+ - IG2
55
+ - IG3
56
+ additional_info: >-
@@ -0,0 +1,65 @@
1
+ ---
2
+ id: 1.1.15
3
+ name: merging_restrictions
4
+ title: Ensure pushing or merging of new code is restricted to specific individuals or teams
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Ensure that only trusted users can push or merge new code to protected branches.
10
+ rationale: >-
11
+ Requiring that only trusted users may push or merge new changes reduces the risk of
12
+ unverified code, especially malicious code, to a protected branch by reducing the
13
+ number of trusted users who are capable of doing such.
14
+ impact: >-
15
+ Only administrators and trusted users can push or merge to the protected branch.
16
+ audit: |
17
+ For every code repository in use, ensure only trusted and responsible users can push or merge new code by performing the following:
18
+ 1. On the left sidebar, select Search or go to and find your project.
19
+ 2. Select Settings > Repository.
20
+ 3. Expand Protected branches.
21
+ 4. If there are no protected branches, the repository is not compliant.
22
+ 5. For each protected branch, ensure:
23
+ 1. The role(s) and user(s) who are 'Allowed to merge' are trusted
24
+ 2. The role(s) and user(s) who are 'Allowed to push and merge' are trusted
25
+ 3. The 'Allowed to force push' toggle is not selected
26
+ remediation: |
27
+ Prerequisites:
28
+ You must have at least the Maintainer role in the group.
29
+
30
+ For every code repository in use, allow only trusted and responsible users to push or merge new code by performing the following:
31
+ 1. On the left sidebar, select Search or go to and find your project.
32
+ 2. Select Settings > Repository.
33
+ 3. Expand Protected branches.
34
+ 4. Select Add protected branch.
35
+ 5. From the Branch dropdown list, select the branch you want to protect.
36
+ 6. From the Allowed to merge list, select a role that can merge into this branch.
37
+ 7. From the Allowed to push and merge list, select a role that can push to this branch.
38
+ default_value:
39
+ references:
40
+ - https://docs.gitlab.com/ee/administration/merge_requests_approvals.html
41
+ cis_controls:
42
+ - id: 5.4
43
+ version: 8
44
+ name: Restrict Administrator Privileges to Dedicated Administrator Accounts
45
+ description: >-
46
+ Restrict administrator privileges to dedicated administrator accounts on
47
+ enterprise assets. Conduct general computing activities, such as internet
48
+ browsing, email, and productivity suite use, from the user's primary, non-privileged
49
+ account.
50
+ implementation_groups:
51
+ - IG1
52
+ - IG2
53
+ - IG3
54
+ - id: 4.3
55
+ version: 7
56
+ name: Ensure the Use of Dedicated Administrative Accounts
57
+ description: >-
58
+ Ensure that all users with administrative account access use a dedicated or
59
+ secondary account for elevated activities. This account should only be used for
60
+ administrative activities and not internet browsing, email, or similar activities.
61
+ implementation_groups:
62
+ - IG1
63
+ - IG2
64
+ - IG3
65
+ additional_info: >-
@@ -0,0 +1,26 @@
1
+ # 1.1 Code Changes
2
+
3
+ This section consists of security recommendations for code changes and how they should be done. It contains recommendations to protect the main branch of the application code. This branch is the most important one, because it contains the actual code that is being delivered to the costumer. It should be protected from any mistake or malicious deed in order to keep the software secured.
4
+
5
+ ## Recommendations
6
+
7
+ * [1.1.1 - version_control.yml](./version_control.yml)
8
+ * [1.1.2 - code_tracing.yml](./code_tracing.yml)
9
+ * [1.1.3 - code_approvals.yml](./code_approvals.yml)
10
+ * [1.1.4 - code_approval_dismissals.yml](./code_approval_dismissals.yml)
11
+ * [1.1.5 - code_dismissal_restrictions.yml](./code_dismissal_restrictions.yml)
12
+ * [1.1.6 - code_owners.yml](./code_owners.yml)
13
+ * [1.1.7 - code_changes_require_code_owners.yml](./code_changes_require_code_owners.yml)
14
+ * [1.1.8 - stale_branch_reviews.yml](./stale_branch_reviews.yml)
15
+ * [1.1.9 - checks_pass_before_merging.yml](./checks_pass_before_merging.yml)
16
+ * [1.1.10 - branches_updated_before_merging.yml](./branches_updated_before_merging.yml)
17
+ * [1.1.11 - comments_resolved_before_merging.yml](./comments_resolved_before_merging.yml)
18
+ * [1.1.12 - commits_must_be_signed_before_merging.yml](./commits_must_be_signed_before_merging.yml)
19
+ * [1.1.13 - linear_history_required.yml](./linear_history_required.yml)
20
+ * [1.1.14 - branch_protections_for_admins.yml](./branch_protections_for_admins.yml)
21
+ * [1.1.15 - merging_restrictions.yml](./merging_restrictions.yml)
22
+ * [1.1.16 - ensure_force_push_is_denied.yml](./ensure_force_push_is_denied.yml)
23
+ * [1.1.17 - deny_branch_deletions.yml](./deny_branch_deletions.yml)
24
+ * [1.1.18 - auto_risk_scan_merges.yml](./auto_risk_scan_merges.yml)
25
+ * [1.1.19 - audit_branch_protections.yml](./audit_branch_protections.yml)
26
+ * [1.1.20 - default_branch_protected.yml](./default_branch_protected.yml)
@@ -0,0 +1,72 @@
1
+ ---
2
+ id: 1.1.8
3
+ name: stale_branch_reviews
4
+ title: Ensure inactive branches are periodically reviewed and removed
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: >-
9
+ Keep track of code branches that are inactive for a lengthy period of time and
10
+ periodically remove them.
11
+ rationale: >-
12
+ Git branches that have been inactive (i.e., no new changes introduced) for a long period
13
+ of time are enlarging the surface of attack for malicious code injection, sensitive data
14
+ leaks, and CI pipeline exploitation. They potentially contain outdated dependencies
15
+ which may leave them highly vulnerable. They are more likely to be improperly
16
+ managed, and could possibly be accessed by a large number of members of the
17
+ organization.
18
+ impact: >-
19
+ Removing inactive Git branches means that any code changes they contain would be
20
+ removed along with them, thus work done in the past might not be accessible after
21
+ auditing for inactivity.
22
+ audit: |
23
+ For each project, verify that all existing Git branches are active or have yet to be checked for inactivity by performing the next steps:
24
+ • Navigate to the main page of the project.
25
+ • In the sidebar select Code > Branches
26
+ • Use the navigation at the top of the page to view the Stale branches. The Stale view shows all branches that no one has committed to in the last three months, ordered by the branches with the oldest commits first.
27
+ • If the list is empty, you are compliant. If the list is not empty, but there is a valid reason the branches listed are not deleted, you are compliant.
28
+
29
+ You can perform the next steps to verify that merge request branches are prevented from becoming stale branches by default:
30
+ • Navigate to the main page of the project.
31
+ • In the left sidebar select Settings > Merge requests
32
+ • Verify if 'Enable "Delete source branch" option by default' is selected. If it is not selected, you are more likely to become non-compliant.
33
+ remediation: |
34
+ For each project, review existing Git branches and remove those which were identified during the audit as being non-compliant by performing the following:
35
+ • Navigate to the main page of the project.
36
+ • In the sidebar select Code > Branches
37
+ • Next to each non-compliant branch select the vertical ellipsis
38
+ • Select 'Delete branch'
39
+ • Read the warning
40
+ • Select 'Yes, delete branch'
41
+
42
+ You can perform the next steps to reduce the likelihood of a stale branches remaining after a merge request:
43
+ • Navigate to the main page of the project.
44
+ • In the left sidebar select Settings > Merge requests
45
+ • Select 'Enable "Delete source branch" option by default'.
46
+ default_value: By default, newly opened Git branches would never be removed, regardless of activity or inactivity.
47
+ references:
48
+ - https://docs.gitlab.com/ee/user/project/repository/branches/
49
+ cis_controls:
50
+ - id: 16.1
51
+ version: 8
52
+ name: Establish and Maintain a Secure Application Development Process
53
+ description: >-
54
+ Establish and maintain a secure application development process. In the
55
+ process, address such items as: secure application design standards, secure coding
56
+ practices, developer training, vulnerability management, security of third-party code,
57
+ and application security testing procedures. Review and update documentation
58
+ annually, or when significant enterprise changes occur that could impact this
59
+ Safeguard.
60
+ implementation_groups:
61
+ - IG2
62
+ - IG3
63
+ - id: 18.1
64
+ version: 7
65
+ name: Establish Secure Coding Practices
66
+ description: >-
67
+ Establish secure coding practices appropriate to the programming language and
68
+ development environment being used.
69
+ implementation_groups:
70
+ - IG2
71
+ - IG3
72
+ additional_info: >-
@@ -0,0 +1,45 @@
1
+ ---
2
+ id: 1.1.1
3
+ name: version_control
4
+ title: Ensure any changes to code are tracked in a version control platform
5
+ profile: 1
6
+ category: source_code
7
+ sub_category: code_changes
8
+ description: |
9
+ Manage all code projects in a version control platform.
10
+ rationale: |
11
+ Version control platforms keep track of every modification to code. They represent the
12
+ cornerstone of code security, as well as allowing for better code collaboration within
13
+ engineering teams. With granular access management, change tracking, and key
14
+ signing of code edits, version control platforms are the first step in securing the software
15
+ supply chain.
16
+ audit: |
17
+ Ensure that all code activity is managed in a GitLab repository for every micro-
18
+ service or application developed by your organization.
19
+ impact: |
20
+ remediation: |
21
+ Upload existing code projects to a Gitlab group or instance and create an identity for
22
+ each active team member who might contribute or need access to it.
23
+ default_value:
24
+ references:
25
+ cis_controls:
26
+ - id: 2.4
27
+ version: 8
28
+ name: Utilize Automated Software Inventory Tools
29
+ description: >-
30
+ Utilize software inventory tools, when possible, throughout the enterprise to
31
+ automate the discovery and documentation of installed software.
32
+ implementation_groups:
33
+ - IG2
34
+ - IG3
35
+ - id: 2.4
36
+ version: 7
37
+ name: Track Software Inventory Information
38
+ description: >-
39
+ The software inventory system should track the name, version, publisher, and
40
+ install date for all software, including operating systems authorized by the
41
+ organization.
42
+ implementation_groups:
43
+ - IG2
44
+ - IG3
45
+ additional_info: >-
@@ -0,0 +1,50 @@
1
+ ---
2
+ id: 1.5.8
3
+ name: dast_api_scanning
4
+ title: Ensure scanners are in place for API runtime security weaknesses
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_risks
8
+ description: >-
9
+ Dynamic Application Security Testing (DAST) runs automated penetration tests to find
10
+ vulnerabilities in your APIs as they are running. DAST automates a hacker's approach
11
+ and simulates real-world attacks for critical threats such as cross-site scripting (XSS),
12
+ SQL injection (SQLi), and cross-site request forgery (CSRF) to uncover vulnerabilities
13
+ and misconfigurations that other security tools cannot detect.
14
+ rationale: >-
15
+ impact: >-
16
+ audit: |
17
+ Ensure a dynamic API scanning tool is set up to identify API-specific
18
+ vulnerabilities and that every project that contains an APi is scanned by it.
19
+ • The DAST-API template must be configured for your project.
20
+ • A successful pipeline was run on the default branch. You should not change the default behavior of allowing the application security jobs to fail.
21
+ • Review the output from the scan in Secure > Vulnerability Report
22
+ remediation: |
23
+ 1. Include the DAST-API.gitlab-ci.yml template in your .gitlab-ci.yml file.
24
+ 2. The configuration file has several testing profiles defined with different checks enabled. Select a profile and provide it by adding the DAST_API_PROFILE CI/CD variable to your .gitlab-ci.yml file.
25
+ 3. Provide the location of the OpenAPI Specification as either a file or URL. Specify the location by adding the DAST_API_OPENAPI variable.
26
+ 4. The target API instance's base URL is also required. Provide it by using the DAST_API_TARGET_URL variable or an environment_url.txt file.
27
+ 5. After configuration, the analyzer will run in your pipeline.
28
+ 6. View the results in the Vulnerability report and remediate the vulnerabilities.
29
+ default_value:
30
+ references:
31
+ - https://docs.gitlab.com/ee/user/application_security/dast_api/
32
+ cis_controls:
33
+ - id: 16.12
34
+ version: 8
35
+ name: Implement Code-Level Security Checks
36
+ description: >-
37
+ Apply static and dynamic analysis tools within the application life cycle to
38
+ verify that secure coding practices are being followed.
39
+ implementation_groups:
40
+ - IG3
41
+ - id: 18.7
42
+ version: 7
43
+ name: Apply Static and Dynamic Code Analysis Tools
44
+ description: >-
45
+ Apply static and dynamic analysis tools to verify that secure coding
46
+ practices are being adhered to for internally developed software.
47
+ implementation_groups:
48
+ - IG2
49
+ - IG3
50
+ additional_info: >-
@@ -0,0 +1,51 @@
1
+ ---
2
+ id: 1.5.7
3
+ name: dast_web_scanning
4
+ title: Ensure scanners are in place for web application runtime security weaknesses
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_risks
8
+ description: >-
9
+ Dynamic Application Security Testing (DAST) runs automated penetration tests to find
10
+ vulnerabilities in your web applications as they are running. DAST automates a hacker's
11
+ approach and simulates real-world attacks for critical threats such as cross-site scripting
12
+ (XSS), SQL injection (SQLi), and cross-site request forgery (CSRF) to uncover
13
+ vulnerabilities and misconfigurations that other security tools cannot detect.
14
+ rationale: >-
15
+ impact: >-
16
+ audit: |
17
+ Ensure Browser-based DAST is set up to identify dynamic vulnerabilities in web
18
+ applications that cannot be detected by other tools earlier in the SDLC. Ensure that
19
+ every project that contains a web application is scanned by DAST.
20
+ • The DAST template must be configured for your project.
21
+ • Review the output from the previous scan on your default branch in Secure >
22
+ Vulnerability Report.
23
+ remediation: |
24
+ 1. Include the DAST.gitlab-ci.yml template in your .gitlab-ci.yml file.
25
+ 2. Add a dast stage to your GitLab CI/CD stages configuration.
26
+ 3. Define the URL to be scanned by DAST by setting the DAST_WEBSITE CI/CD variable.
27
+ 4. Add any additionally desired CI variables to customize the test.
28
+ 5. After configuration, the analyzer will run in your pipeline.
29
+ 6. View the results in the Vulnerability report and remediate the vulnerabilities.
30
+ default_value:
31
+ references:
32
+ - https://docs.gitlab.com/ee/user/application_security/dast/browser/configuration/customize_settings.html
33
+ cis_controls:
34
+ - id: 16.12
35
+ version: 8
36
+ name: Implement Code-Level Security Checks
37
+ description: >-
38
+ Apply static and dynamic analysis tools within the application life cycle to
39
+ verify that secure coding practices are being followed.
40
+ implementation_groups:
41
+ - IG3
42
+ - id: 18.7
43
+ version: 7
44
+ name: Apply Static and Dynamic Code Analysis Tools
45
+ description: >-
46
+ Apply static and dynamic analysis tools to verify that secure coding
47
+ practices are being adhered to for internally developed software.
48
+ implementation_groups:
49
+ - IG2
50
+ - IG3
51
+ additional_info: >-
@@ -0,0 +1,84 @@
1
+ ---
2
+ id: 1.5.5
3
+ name: dependency_scanning
4
+ title: Ensure scanners are in place for open-source vulnerabilities in used packages
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_risks
8
+ description: >-
9
+ Detect, prevent and monitor known open-source vulnerabilities in packages that are
10
+ being used.
11
+ rationale: >-
12
+ Open-source vulnerabilities might exist before one starts to use a package, but they are
13
+ also discovered over time. New attacks and vulnerabilities are announced every now
14
+ and then. It is important to keep track of these and to monitor whether the dependencies
15
+ used are affected by the recent vulnerability. Detecting and fixing those packages'
16
+ vulnerabilities decreases the attack surface within deployed and running applications
17
+ that use such packages. It prevents security flaws from reaching the production
18
+ environment which could eventually lead to a security breach.
19
+ impact: >-
20
+ audit: |
21
+ For every repository that is in use, verify that a dependency scanning tool is set to detect, prevent, and monitor vulnerabilities in project dependencies by performing the following:
22
+ 1. On GitLab, navigate to the main page of the repository.
23
+ 2. Review the CI pipeline configuration to verify that Dependency Scanning has been configured to run on this project.
24
+ remediation: |
25
+ For every repository that is in use, set a dependency scanning tool to detect, prevent, and monitor vulnerabilities in project packages by performing the following:
26
+ 1. On GitLab, navigate to the main page of the repository.
27
+ 2. Configure Dependency Scanning to run on this project.
28
+ default_value:
29
+ references:
30
+ cis_controls:
31
+ - id: 7.5
32
+ version: 8
33
+ name: Perform Automated Vulnerability Scans of Internal Enterprise Assets
34
+ description: >-
35
+ Perform automated vulnerability scans of internal enterprise assets on a
36
+ quarterly, or more frequent, basis. Conduct both authenticated and
37
+ unauthenticated scans, using a SCAP-compliant vulnerability scanning tool.
38
+ implementation_groups:
39
+ - IG2
40
+ - IG3
41
+ - id: 7.6
42
+ version: 8
43
+ name: Perform Automated Vulnerability Scans of Externally-Exposed Enterprise Assets
44
+ description: >-
45
+ Perform automated vulnerability scans of externally-exposed enterprise assets
46
+ using a SCAP-compliant vulnerability scanning tool. Perform scans on a monthly,
47
+ or more frequent, basis.
48
+ implementation_groups:
49
+ - IG2
50
+ - IG3
51
+ - id: 16.5
52
+ version: 8
53
+ name: Use Up-to-Date and Trusted Third-Party Software Components
54
+ description: >-
55
+ Use up-to-date and trusted third-party software components. When possible,
56
+ choose established and proven frameworks and libraries that provide adequate
57
+ security. Acquire these components from trusted sources or evaluate the software
58
+ for vulnerabilities before use.
59
+ implementation_groups:
60
+ - IG2
61
+ - IG3
62
+ - id: 3.1
63
+ version: 7
64
+ name: Run Automated Vulnerability Scanning Tools
65
+ description: >-
66
+ Utilize an up-to-date SCAP-compliant vulnerability scanning tool to
67
+ automatically scan all systems on the network on a weekly or more frequent basis
68
+ to identify all potential vulnerabilities on the organization's systems.
69
+ implementation_groups:
70
+ - IG2
71
+ - IG3
72
+ - id: 18.4
73
+ version: 7
74
+ name: Only Use Up-to-date And Trusted Third-Party Components
75
+ description: >-
76
+ Only use up-to-date and trusted third-party components for the software
77
+ developed by the organization.
78
+ implementation_groups:
79
+ - IG2
80
+ - IG3
81
+ additional_info: >-
82
+ GitLab Dependency Scanning is only available in GitLab Ultimate. If you're not
83
+ using GitLab Ultimate, consider using a free open-source dependency scanner as part
84
+ of your CI pipeline.
@@ -0,0 +1,45 @@
1
+ ---
2
+ id: 1.5.1
3
+ name: enable_secret_detection
4
+ title: Ensure scanners are in place to identify and prevent sensitive data in code
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_risks
8
+ description: >-
9
+ Detect and prevent sensitive data in code, such as confidential ID numbers, passwords, etc.
10
+ rationale: >-
11
+ Having sensitive data in the source code makes it easier for attackers to maliciously use
12
+ such information. In order to avoid this, designate scanners to identify and prevent the
13
+ existence of sensitive data in the code.
14
+ impact: >-
15
+ audit: |
16
+ For every repository in use, verify that scanners are set to identify and prevent the existence of sensitive data in code by performing the following:
17
+ 1. On GitLab, navigate to the main page of the repository.
18
+ 2. Review the CI pipeline configuration to verify that Secret Detection has been enabled on this project.
19
+ remediation: |
20
+ For every repository in use, designate scanners to identify and prevent sensitive data in code by performing the following:
21
+ 1. On GitLab, navigate to the main page of the repository.
22
+ 2. Enable secret detection for this project.
23
+ default_value:
24
+ references:
25
+ cis_controls:
26
+ - id: 16.12
27
+ version: 8
28
+ name: Implement Code-Level Security Checks
29
+ description: >-
30
+ Apply static and dynamic analysis tools within the application life cycle to
31
+ verify that secure coding practices are being followed.
32
+ implementation_groups:
33
+ - IG3
34
+ - id: 18.7
35
+ version: 8
36
+ name: Apply Static and Dynamic Code Analysis Tools
37
+ description: >-
38
+ Apply static and dynamic analysis tools to verify that secure coding
39
+ practices are being adhered to for internally developed software.
40
+ implementation_groups:
41
+ - IG2
42
+ - IG3
43
+ additional_info: >-
44
+ By January 2023, this feature is supposed to be open to all plans. Until then it is only for
45
+ enterprise users.
@@ -0,0 +1,47 @@
1
+ ---
2
+ id: 1.5.6
3
+ name: license_scanning
4
+ title: Ensure scanners are in place for open-source license issues in used packages
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_risks
8
+ description: >-
9
+ Detect open-source license problems in used dependencies and fix them.
10
+ rationale: >-
11
+ A software license is a legal document that establishes several key conditions between
12
+ a software company or developer and a user in order to allow the use of software.
13
+ Software licenses have the potential to create code dependencies. Not following the
14
+ conditions in the software license can also lead to lawsuits. When using packages with
15
+ a software license, especially commercial ones (which are the most permissive), it is
16
+ important to verify what is allowed by that license in order to be protected against
17
+ lawsuits.
18
+ impact: >-
19
+ audit: |
20
+ Ensure a license scanning tool is set up to identify open-source license problems and that every package you use is scanned by it.
21
+ • The Dependency Scanning or Container Scanning CI job must be configured for your project.
22
+ • Your project uses at least one of the languages and package managers supported by Gemnasium.
23
+ • A successful pipeline was run on the default branch. You should not change the default behavior of allowing the application security jobs to fail.
24
+ • Review the output from the scan in Secure > Dependency list.
25
+ remediation: |
26
+ The Dependency Scanning or Container Scanning CI job must be configured for your project.
27
+ • Your project uses at least one of the languages and package managers supported by Gemnasium.
28
+ • A successful pipeline was run on the default branch. You should not change the default behavior of allowing the application security jobs to fail.
29
+ • Take necessary actions based on the outcome of the scan in Secure > Dependency list.
30
+ default_value:
31
+ references:
32
+ - https://docs.gitlab.com/ee/user/compliance/license_scanning_of_cyclonedx_files/index.html
33
+ - https://docs.gitlab.com/ee/user/application_security/dependency_list/index.html
34
+ cis_controls:
35
+ - id: 0.0
36
+ version: 8
37
+ name: Explicitly Not Mapped
38
+ description: >-
39
+ Explicitly Not Mapped
40
+ implementation_groups:
41
+ - id: 0.0
42
+ version: 7
43
+ name: Explicitly Not Mapped
44
+ description: >-
45
+ Explicitly Not Mapped
46
+ implementation_groups:
47
+ additional_info: >-
@@ -0,0 +1,14 @@
1
+ # 1.5 Code Risks
2
+
3
+ This section consists of recommendations for many security code scanners. This includes for example, looking for hardcoded secrets, common misconfigurations that are vulnerable to attack or restrictive licenses. Because an application code has a lot of components, it is important to scan each part that can lead to attack - from secrets to licenses.
4
+
5
+ ## Recommendations
6
+
7
+ * [1.5.1 - enable_secret_detection.yml](./enable_secret_detection.yml)
8
+ * [1.5.2 - secure_pipeline_instructions.yml](./secure_pipeline_instructions.yml)
9
+ * [1.5.3 - secure_iac_instructions.yml](./secure_iac_instructions.yml)
10
+ * [1.5.4 - vulnerability_scanning.yml](./vulnerability_scanning.yml)
11
+ * [1.5.5 - dependency_scanning.yml](./dependency_scanning.yml)
12
+ * [1.5.6 - license_scanning.yml](./license_scanning.yml)
13
+ * [1.5.7 - dast_web_scanning.yml](./dast_web_scanning.yml)
14
+ * [1.5.8 - dast_api_scanning.yml](./dast_api_scanning.yml)
@@ -0,0 +1,81 @@
1
+ ---
2
+ id: 1.5.3
3
+ name: secure_iac_instructions
4
+ title: Ensure scanners are in place to secure Infrastructure as Code (IaC) instructions
5
+ profile: 2
6
+ category: source_code
7
+ sub_category: code_risks
8
+ description: >-
9
+ Detect and prevent misconfigurations or insecure instructions in Infrastructure as Code (IaC) files, such as Terraform files.
10
+ rationale: >-
11
+ Detecting and fixing misconfigurations and/or insecure instructions in IaC (Infrastructure
12
+ as Code) files decreases the risk for data leak or data theft. It is important to secure IaC
13
+ instructions in order to prevent further problems of deployment, exposed assets, or
14
+ improper configurations, which can ultimately lead to easier ways to attack and steal
15
+ organization data.
16
+ impact: >-
17
+ audit: |
18
+ For every repository that holds IaC instructions files, verify that a scanning tool such as GitLab's Infrastructure as Code scanning is configured to identify and prevent misconfigurations and insecure instructions.
19
+ 1. On GitLab, navigate to the main page of the repository.
20
+ 2. Review the CI pipeline configuration to verify that IaC scanning has been enabled on this project.
21
+ remediation: |
22
+ For every repository that holds IaC instructions files, configure GitLab's Infrastructure as Code scanning (or another IaC scanning tool) to identify and prevent misconfigurations and insecure instructions.
23
+ 1. On GitLab, navigate to the main page of the repository.
24
+ 2. Enable IaC scanning for this project.
25
+ default_value:
26
+ references:
27
+ - https://docs.gitlab.com/ee/user/application_security/iac_scanning/#enable-the-scanner
28
+ cis_controls:
29
+ - id: 7.5
30
+ version: 8
31
+ name: Perform Automated Vulnerability Scans of Internal Enterprise Assets
32
+ description: >-
33
+ Perform automated vulnerability scans of internal enterprise assets on a
34
+ quarterly, or more frequent, basis. Conduct both authenticated and
35
+ unauthenticated scans, using a SCAP-compliant vulnerability scanning tool.
36
+ implementation_groups:
37
+ - IG2
38
+ - IG3
39
+ - id: 7.6
40
+ version: 8
41
+ name: Perform Automated Vulnerability Scans of Externally-Exposed Enterprise Assets
42
+ description: >-
43
+ Perform automated vulnerability scans of externally-exposed enterprise assets
44
+ using a SCAP-compliant vulnerability scanning tool. Perform scans on a monthly,
45
+ or more frequent, basis.
46
+ implementation_groups:
47
+ - IG2
48
+ - IG3
49
+ - id: 16.7
50
+ version: 8
51
+ name: Use Standard Hardening Configuration Templates for Application Infrastructure
52
+ description: >-
53
+ Use standard, industry-recommended hardening configuration templates for
54
+ application infrastructure components. This includes underlying servers, databases,
55
+ and web servers, and applies to cloud containers, Platform as a Service (PaaS)
56
+ components, and SaaS components. Do not allow in-house developed software to
57
+ weaken configuration hardening.
58
+ implementation_groups:
59
+ - IG2
60
+ - IG3
61
+ - id: 3.1
62
+ version: 7
63
+ name: Run Automated Vulnerability Scanning Tools
64
+ description: >-
65
+ Utilize an up-to-date SCAP-compliant vulnerability scanning tool to
66
+ automatically scan all systems on the network on a weekly or more frequent basis
67
+ to identify all potential vulnerabilities on the organization's systems.
68
+ implementation_groups:
69
+ - IG2
70
+ - IG3
71
+ - id: 18.11
72
+ version: 7
73
+ name: Use Standard Hardening Configuration Templates for Databases
74
+ description: >-
75
+ For applications that rely on a database, use standard hardening configuration
76
+ templates. All systems that are part of critical business processes should also be
77
+ tested.
78
+ implementation_groups:
79
+ - IG2
80
+ - IG3
81
+ additional_info: >-