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.
- gitlabcis/__init__.py +12 -0
- gitlabcis/__main__.py +7 -0
- gitlabcis/benchmarks/__init__.py +8 -0
- gitlabcis/benchmarks/artifacts_4/__init__.py +4 -0
- gitlabcis/benchmarks/artifacts_4/access_to_artifacts_4_2.py +139 -0
- gitlabcis/benchmarks/artifacts_4/origin_traceability_4_4.py +11 -0
- gitlabcis/benchmarks/artifacts_4/package_registries_4_3.py +105 -0
- gitlabcis/benchmarks/artifacts_4/verification_4_1.py +83 -0
- gitlabcis/benchmarks/build_pipelines_2/__init__.py +4 -0
- gitlabcis/benchmarks/build_pipelines_2/build_environment_2_1.py +268 -0
- gitlabcis/benchmarks/build_pipelines_2/build_worker_2_2.py +129 -0
- gitlabcis/benchmarks/build_pipelines_2/pipeline_instructions_2_3.py +444 -0
- gitlabcis/benchmarks/build_pipelines_2/pipeline_integrity_2_4.py +146 -0
- gitlabcis/benchmarks/dependencies_3/__init__.py +2 -0
- gitlabcis/benchmarks/dependencies_3/third_party_packages_3_1.py +171 -0
- gitlabcis/benchmarks/dependencies_3/validate_packages_3_2.py +182 -0
- gitlabcis/benchmarks/deployment_5/__init__.py +2 -0
- gitlabcis/benchmarks/deployment_5/deployment_configuration_5_1.py +165 -0
- gitlabcis/benchmarks/deployment_5/deployment_environment_5_2.py +66 -0
- gitlabcis/benchmarks/source_code_1/__init__.py +6 -0
- gitlabcis/benchmarks/source_code_1/code_changes_1_1.py +665 -0
- gitlabcis/benchmarks/source_code_1/code_risks_1_5.py +506 -0
- gitlabcis/benchmarks/source_code_1/contribution_access_1_3.py +334 -0
- gitlabcis/benchmarks/source_code_1/repository_management_1_2.py +168 -0
- gitlabcis/benchmarks/source_code_1/third_party_1_4.py +139 -0
- gitlabcis/cli/__init__.py +0 -0
- gitlabcis/cli/log.py +30 -0
- gitlabcis/cli/main.py +541 -0
- gitlabcis/cli/output.py +151 -0
- gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/external_auth_server.yml +51 -0
- gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/limit_artifact_uploaders.yml +57 -0
- gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/limit_certifying_artifacts.yml +53 -0
- gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/minimum_package_registry_admins.yml +54 -0
- gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/readme.md +14 -0
- gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/require_mfa_to_package_registry.yml +52 -0
- gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/restrict_anonymous_access.yml +67 -0
- gitlabcis/recommendations/artifacts_4/origin_traceability_4_4/artifact_origin_info.yml +56 -0
- gitlabcis/recommendations/artifacts_4/origin_traceability_4_4/readme.md +7 -0
- gitlabcis/recommendations/artifacts_4/package_registries_4_3/all_artifact_versions_signed.yml +70 -0
- gitlabcis/recommendations/artifacts_4/package_registries_4_3/audit_package_registry_config.yml +46 -0
- gitlabcis/recommendations/artifacts_4/package_registries_4_3/readme.md +12 -0
- gitlabcis/recommendations/artifacts_4/package_registries_4_3/secure_repo_webhooks.yml +50 -0
- gitlabcis/recommendations/artifacts_4/package_registries_4_3/validate_signed_artifacts_on_upload.yml +72 -0
- gitlabcis/recommendations/artifacts_4/readme.md +12 -0
- gitlabcis/recommendations/artifacts_4/verification_4_1/encrypt_artifacts_before_distribution.yml +47 -0
- gitlabcis/recommendations/artifacts_4/verification_4_1/only_authorized_platforms_can_decrypt_artifacts.yml +59 -0
- gitlabcis/recommendations/artifacts_4/verification_4_1/readme.md +11 -0
- gitlabcis/recommendations/artifacts_4/verification_4_1/sign_artifacts_in_build_pipeline.yml +40 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/authenticate_build_access.yml +55 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/build_automation.yml +54 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/build_env_admins.yml +55 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/build_logging.yml +49 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/disable_build_tools_default_passwords.yml +54 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/immutable_pipeline_infrastructure.yml +60 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/limit_build_access.yml +64 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/limit_build_secrets_scope.yml +56 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/readme.md +19 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/secure_build_env_webhooks.yml +43 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/single_responsibility_pipeline.yml +58 -0
- gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/vuln_scanning.yml +64 -0
- gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/build_worker_vuln_scanning.yml +58 -0
- gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/monitor_worker_resource_consumption.yml +59 -0
- gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/pass_worker_envs_and_commands.yml +48 -0
- gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/readme.md +16 -0
- gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/restrict_worker_connectivity.yml +61 -0
- gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/segregate_worker_duties.yml +78 -0
- gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/single_use_workers.yml +47 -0
- gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/store_worker_config.yml +62 -0
- gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/worker_runtime_security.yml +37 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/build_stage_io.yml +49 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/build_steps_as_code.yml +42 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/limit_pipeline_triggers.yml +76 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/pipeline_misconfiguration_scanning.yml +48 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/pipeline_secret_scanning.yml +56 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/pipeline_vuln_scanning.yml +44 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/readme.md +16 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/secure_pipeline_output.yml +52 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/track_pipeline_files.yml +48 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/create_reproducible_artifacts.yml +52 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/lock_dependencies.yml +59 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/pipeline_produces_sbom.yml +81 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/pipeline_signs_sbom.yml +38 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/readme.md +14 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/sign_artifacts.yml +35 -0
- gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/validate_dependencies.yml +63 -0
- gitlabcis/recommendations/build_pipelines_2/readme.md +12 -0
- gitlabcis/recommendations/dependencies_3/readme.md +10 -0
- gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/define_package_managers.yml +84 -0
- gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/dependency_sbom.yml +84 -0
- gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/monitor_dependencies.yml +61 -0
- gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/packages_over_60_days_old.yml +95 -0
- gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/pin_dependency_version.yml +48 -0
- gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/readme.md +14 -0
- gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/third_party_sbom_required.yml +70 -0
- gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/verify_artifacts.yml +45 -0
- gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/verify_signed_metadata.yml +41 -0
- gitlabcis/recommendations/dependencies_3/validate_packages_3_2/org_wide_dependency_policy.yml +47 -0
- gitlabcis/recommendations/dependencies_3/validate_packages_3_2/package_license_scanning.yml +47 -0
- gitlabcis/recommendations/dependencies_3/validate_packages_3_2/package_ownership_change.yml +42 -0
- gitlabcis/recommendations/dependencies_3/validate_packages_3_2/package_vuln_scanning.yml +62 -0
- gitlabcis/recommendations/dependencies_3/validate_packages_3_2/readme.md +10 -0
- gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/audit_deployment_config.yml +46 -0
- gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/limit_deployment_config_access.yml +51 -0
- gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/pin_deployment_config_manifests.yml +59 -0
- gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/readme.md +13 -0
- gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/scan_iac.yml +72 -0
- gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/secret_scan_deployment_config.yml +45 -0
- gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/separate_deployment_config.yml +50 -0
- gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/verify_deployment_config.yml +49 -0
- gitlabcis/recommendations/deployment_5/deployment_environment_5_2/automate_deployment.yml +47 -0
- gitlabcis/recommendations/deployment_5/deployment_environment_5_2/disable_default_passwords.yml +63 -0
- gitlabcis/recommendations/deployment_5/deployment_environment_5_2/limit_prod_access.yml +45 -0
- gitlabcis/recommendations/deployment_5/deployment_environment_5_2/readme.md +12 -0
- gitlabcis/recommendations/deployment_5/deployment_environment_5_2/reproducible_deployment.yml +50 -0
- gitlabcis/recommendations/deployment_5/readme.md +10 -0
- gitlabcis/recommendations/readme.md +24 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/audit_branch_protections.yml +56 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/auto_risk_scan_merges.yml +62 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/branch_protections_for_admins.yml +60 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/branches_updated_before_merging.yml +56 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/checks_pass_before_merging.yml +57 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/code_approval_dismissals.yml +62 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/code_approvals.yml +65 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/code_changes_require_code_owners.yml +68 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/code_dismissal_restrictions.yml +69 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/code_owners.yml +61 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/code_tracing.yml +52 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/comments_resolved_before_merging.yml +59 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/commits_must_be_signed_before_merging.yml +63 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/default_branch_protected.yml +85 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/deny_branch_deletions.yml +76 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/ensure_force_push_is_denied.yml +59 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/linear_history_required.yml +56 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/merging_restrictions.yml +65 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/readme.md +26 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/stale_branch_reviews.yml +72 -0
- gitlabcis/recommendations/source_code_1/code_changes_1_1/version_control.yml +45 -0
- gitlabcis/recommendations/source_code_1/code_risks_1_5/dast_api_scanning.yml +50 -0
- gitlabcis/recommendations/source_code_1/code_risks_1_5/dast_web_scanning.yml +51 -0
- gitlabcis/recommendations/source_code_1/code_risks_1_5/dependency_scanning.yml +84 -0
- gitlabcis/recommendations/source_code_1/code_risks_1_5/enable_secret_detection.yml +45 -0
- gitlabcis/recommendations/source_code_1/code_risks_1_5/license_scanning.yml +47 -0
- gitlabcis/recommendations/source_code_1/code_risks_1_5/readme.md +14 -0
- gitlabcis/recommendations/source_code_1/code_risks_1_5/secure_iac_instructions.yml +81 -0
- gitlabcis/recommendations/source_code_1/code_risks_1_5/secure_pipeline_instructions.yml +62 -0
- gitlabcis/recommendations/source_code_1/code_risks_1_5/vulnerability_scanning.yml +48 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/domain_verification.yml +65 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/ensure_2_admins_per_repo.yml +56 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/limit_top_level_group_creation.yml +61 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/limit_user_registration_domain.yml +58 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/minimum_number_of_admins.yml +56 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/org_provided_ssh_certs.yml +70 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/readme.md +21 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/require_mfa_at_org_level.yml +89 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/require_mfa_for_contributors.yml +76 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/restrict_ip_addresses.yml +84 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/review_and_remove_inactive_users.yml +62 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/scm_notification_restriction.yml +46 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/strict_permissions_for_repo.yml +62 -0
- gitlabcis/recommendations/source_code_1/contribution_access_1_3/track_code_anomalies.yml +43 -0
- gitlabcis/recommendations/source_code_1/readme.md +13 -0
- gitlabcis/recommendations/source_code_1/repository_management_1_2/limit_issue_deletions.yml +57 -0
- gitlabcis/recommendations/source_code_1/repository_management_1_2/limit_repo_creations.yml +64 -0
- gitlabcis/recommendations/source_code_1/repository_management_1_2/limit_repo_deletions.yml +57 -0
- gitlabcis/recommendations/source_code_1/repository_management_1_2/public_repos_have_security_file.yml +59 -0
- gitlabcis/recommendations/source_code_1/repository_management_1_2/readme.md +15 -0
- gitlabcis/recommendations/source_code_1/repository_management_1_2/review_and_archive_stale_repos.yml +65 -0
- gitlabcis/recommendations/source_code_1/repository_management_1_2/track_forks.yml +74 -0
- gitlabcis/recommendations/source_code_1/repository_management_1_2/track_project_visibility_status.yml +74 -0
- gitlabcis/recommendations/source_code_1/third_party_1_4/README.md +12 -0
- gitlabcis/recommendations/source_code_1/third_party_1_4/admin_approval_for_app_installs.yml +83 -0
- gitlabcis/recommendations/source_code_1/third_party_1_4/least_privilge_app_permissions.yml +103 -0
- gitlabcis/recommendations/source_code_1/third_party_1_4/secure_webhooks.yml +73 -0
- gitlabcis/recommendations/source_code_1/third_party_1_4/stale_app_reviews.yml +66 -0
- gitlabcis/recommendations/template.yml +30 -0
- gitlabcis/tests/__init__.py +0 -0
- gitlabcis/tests/input/__init__.py +0 -0
- gitlabcis/tests/input/conftest.py +29 -0
- gitlabcis/tests/input/no_input_test.py +82 -0
- gitlabcis/tests/input/switch_test.py +19 -0
- gitlabcis/tests/input/version_test.py +7 -0
- gitlabcis/tests/unit/__init__.py +0 -0
- gitlabcis/tests/unit/benchmarks/artifacts_4/access_to_artifacts_4_2_test.py +131 -0
- gitlabcis/tests/unit/benchmarks/artifacts_4/origin_traceability_4_4_test.py +15 -0
- gitlabcis/tests/unit/benchmarks/artifacts_4/package_registries_4_3_test.py +102 -0
- gitlabcis/tests/unit/benchmarks/artifacts_4/verification_4_1_test.py +78 -0
- gitlabcis/tests/unit/benchmarks/build_pipelines_2/build_environment_2_1_test.py +239 -0
- gitlabcis/tests/unit/benchmarks/build_pipelines_2/build_worker_2_2_test.py +105 -0
- gitlabcis/tests/unit/benchmarks/build_pipelines_2/pipeline_instructions_2_3_test.py +340 -0
- gitlabcis/tests/unit/benchmarks/build_pipelines_2/pipeline_integrity_2_4_test.py +115 -0
- gitlabcis/tests/unit/benchmarks/conftest.py +47 -0
- gitlabcis/tests/unit/benchmarks/dependencies_3/third_party_packages_3_1_test.py +135 -0
- gitlabcis/tests/unit/benchmarks/dependencies_3/validate_packages_3_2_test.py +171 -0
- gitlabcis/tests/unit/benchmarks/deployment_5/deployment_configuration_5_1_test.py +140 -0
- gitlabcis/tests/unit/benchmarks/deployment_5/deployment_environment_5_2_test.py +60 -0
- gitlabcis/tests/unit/benchmarks/function_test.py +24 -0
- gitlabcis/tests/unit/benchmarks/source_code_1/code_changes_1_1_test.py +565 -0
- gitlabcis/tests/unit/benchmarks/source_code_1/code_risks_1_5_test.py +419 -0
- gitlabcis/tests/unit/benchmarks/source_code_1/contribution_access_1_3_test.py +265 -0
- gitlabcis/tests/unit/benchmarks/source_code_1/repository_management_1_2_test.py +142 -0
- gitlabcis/tests/unit/benchmarks/source_code_1/third_party_1_4_test.py +119 -0
- gitlabcis/tests/unit/conftest.py +94 -0
- gitlabcis/tests/unit/log/log_test.py +23 -0
- gitlabcis/tests/unit/utils/argfilters_test.py +9 -0
- gitlabcis/tests/unit/utils/ci_test.py +156 -0
- gitlabcis/tests/unit/utils/output_test.py +95 -0
- gitlabcis/tests/unit/utils/utils_general_test.py +149 -0
- gitlabcis/tests/unit/utils/version_test.py +11 -0
- gitlabcis/tests/unit/yaml/bad_file_test.py +15 -0
- gitlabcis/tests/unit/yaml/recommendation_test.py +123 -0
- gitlabcis/utils/__init__.py +146 -0
- gitlabcis/utils/ci.py +132 -0
- gitlabcis-1.3.2.dist-info/LICENSE +21 -0
- gitlabcis-1.3.2.dist-info/METADATA +241 -0
- gitlabcis-1.3.2.dist-info/RECORD +218 -0
- gitlabcis-1.3.2.dist-info/WHEEL +5 -0
- gitlabcis-1.3.2.dist-info/entry_points.txt +2 -0
- gitlabcis-1.3.2.dist-info/top_level.txt +1 -0
gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/secure_build_env_webhooks.yml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.1.10
|
|
3
|
+
name: secure_build_env_webhooks
|
|
4
|
+
title: Ensure webhooks of the build environment are secured
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_environment
|
|
8
|
+
description: >-
|
|
9
|
+
Use secured webhooks of the build environment.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Webhooks are used for triggering an HTTP request based on an action made in the
|
|
12
|
+
platform. Typically, build environment feature webhooks for a pipeline trigger based on
|
|
13
|
+
source code event. Since webhooks are an HTTP POST request, they can be
|
|
14
|
+
malformed if not secured over SSL. To prevent a potential hack and compromise of the
|
|
15
|
+
webhook or to the environment or web server excepting the request, use only secured
|
|
16
|
+
webhooks.
|
|
17
|
+
impact: >-
|
|
18
|
+
audit: |
|
|
19
|
+
For each webhook in use, ensure it is secured (HTTPS) via the following process:
|
|
20
|
+
• In your project or group, on the left sidebar, select Settings > Webhooks.
|
|
21
|
+
• For each webhook, click Edit.
|
|
22
|
+
• Verify if the Enable SSL verification checkbox is checked.
|
|
23
|
+
• Select Add webhook.
|
|
24
|
+
remediation: |
|
|
25
|
+
For each webhook in use, change it to secured (over HTTPS).
|
|
26
|
+
• In your project or group, on the left sidebar, select Settings > Webhooks.
|
|
27
|
+
• For each webhook, click Edit.
|
|
28
|
+
• Ensure the Enable SSL verification checkbox is checked.
|
|
29
|
+
• Select Save.
|
|
30
|
+
default_value:
|
|
31
|
+
references:
|
|
32
|
+
- https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#configure-a-webhook-in-gitlab
|
|
33
|
+
cis_controls:
|
|
34
|
+
- id: 12.6
|
|
35
|
+
version: 8
|
|
36
|
+
name: Use of Secure Network Management and Communication Protocols
|
|
37
|
+
description: >-
|
|
38
|
+
Use secure network management and communication protocols (e.g.,
|
|
39
|
+
802.1X, Wi-Fi Protected Access 2 (WPA2) Enterprise or greater).
|
|
40
|
+
implementation_groups:
|
|
41
|
+
- IG2
|
|
42
|
+
- IG3
|
|
43
|
+
additional_info: >-
|
gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/single_responsibility_pipeline.yml
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.1.1
|
|
3
|
+
name: single_responsibility_pipeline
|
|
4
|
+
title: Ensure each pipeline has a single responsibility
|
|
5
|
+
profile: 2
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_environment
|
|
8
|
+
description: >-
|
|
9
|
+
Ensure each pipeline has a single responsibility in the build process.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Build pipelines generally have access to multiple secrets depending on their purposes.
|
|
12
|
+
There are, for example, secrets of the test environment for the test phase, repository
|
|
13
|
+
and artifact credentials for the build phase, etc. Limiting access to these
|
|
14
|
+
credentials/secrets is therefore recommended by dividing pipeline responsibilities, as
|
|
15
|
+
well as having a dedicated pipeline for each phase with the lowest privilege instead of a
|
|
16
|
+
single pipeline for all. This will ensure that any potential damage caused by attacks on a
|
|
17
|
+
workflow will be limited.
|
|
18
|
+
impact: >-
|
|
19
|
+
audit: >-
|
|
20
|
+
For each pipeline, ensure it has only one responsibility in the build process.
|
|
21
|
+
remediation: >-
|
|
22
|
+
Divide each multi-responsibility pipeline into multiple pipelines, each having a single
|
|
23
|
+
responsibility with the least privilege. Additionally, create all new pipelines with a sole
|
|
24
|
+
purpose going forward.
|
|
25
|
+
default_value:
|
|
26
|
+
references:
|
|
27
|
+
- https://docs.gitlab.com/ee/user/permissions.html#job-permissions
|
|
28
|
+
cis_controls:
|
|
29
|
+
- id: 4.6
|
|
30
|
+
version: 8
|
|
31
|
+
name: Securely Manage Enterprise Assets and Software
|
|
32
|
+
description: >-
|
|
33
|
+
Securely manage enterprise assets and software. Example implementations
|
|
34
|
+
include managing configuration through version-controlled-infrastructure-as-code
|
|
35
|
+
and accessing administrative interfaces over secure network protocols, such as
|
|
36
|
+
Secure Shell (SSH) and Hypertext Transfer Protocol Secure (HTTPS). Do not use
|
|
37
|
+
insecure management protocols, such as Telnet (Teletype Network) and HTTP,
|
|
38
|
+
unless operationally essential.
|
|
39
|
+
implementation_groups:
|
|
40
|
+
- IG1
|
|
41
|
+
- IG2
|
|
42
|
+
- IG3
|
|
43
|
+
- id: 16.10
|
|
44
|
+
version: 8
|
|
45
|
+
name: Apply Secure Design Principles in Application Architectures
|
|
46
|
+
description: >-
|
|
47
|
+
Apply secure design principles in application architectures. Secure design
|
|
48
|
+
principles include the concept of least privilege and enforcing mediation to validate
|
|
49
|
+
every operation that the user makes, promoting the concept of "never trust user
|
|
50
|
+
input." Examples include ensuring that explicit error checking is performed and
|
|
51
|
+
documented for all input, including for size, data type, and acceptable ranges or
|
|
52
|
+
formats. Secure design also means minimizing the application infrastructure attack
|
|
53
|
+
surface, such as turning off unprotected ports and services, removing unnecessary
|
|
54
|
+
programs and files, and renaming or removing default accounts.
|
|
55
|
+
implementation_groups:
|
|
56
|
+
- IG2
|
|
57
|
+
- IG3
|
|
58
|
+
additional_info: >-
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.1.8
|
|
3
|
+
name: vuln_scanning
|
|
4
|
+
title: Ensure the build infrastructure is automatically scanned for vulnerabilities
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_environment
|
|
8
|
+
description: >-
|
|
9
|
+
Scan the build infrastructure and its dependencies for vulnerabilities. It is recommended that this be done automatically.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Automatic scanning for vulnerabilities detects known vulnerabilities in the tooling used
|
|
12
|
+
by the build infrastructure and its dependencies. These vulnerabilities can lead to a
|
|
13
|
+
potentially massive breach if not handled as fast as possible, as attackers might also be
|
|
14
|
+
aware of such vulnerabilities.
|
|
15
|
+
impact: >-
|
|
16
|
+
audit: >-
|
|
17
|
+
Verify that your build infrastructure is reviewed for vulnerabilities.
|
|
18
|
+
GitLab Runner is designed to run user-controlled scripts. To reduce the attack surface if
|
|
19
|
+
a job is malicious, you can consider running them in their own network segment. This
|
|
20
|
+
would provide network separation from other infrastructure and services.
|
|
21
|
+
remediation: |
|
|
22
|
+
Ensure security hardening for your build infrastructure.
|
|
23
|
+
For a cloud environment, this could include:
|
|
24
|
+
• Configuring runner virtual machines in their own network segment
|
|
25
|
+
• Blocking SSH access from the Internet to runner virtual machines
|
|
26
|
+
• Restricting traffic between runner virtual machines
|
|
27
|
+
• Filtering access to cloud provider metadata endpoints
|
|
28
|
+
For static host runner, whether bare-metal or virtual machine, you should implement security best practices for the host operating system:
|
|
29
|
+
Malicious code executed in the context of a CI job could compromise the host, so security protocols can help mitigate the impact. Other points to keep in mind include securing or removing files such as SSH keys from the host system that may enable an attacker to access other endpoints in the environment.
|
|
30
|
+
default_value:
|
|
31
|
+
references:
|
|
32
|
+
- https://docs.gitlab.com/runner/security/
|
|
33
|
+
cis_controls:
|
|
34
|
+
- id: 7.5
|
|
35
|
+
version: 8
|
|
36
|
+
name: Perform Automated Vulnerability Scans of Internal Enterprise Assets
|
|
37
|
+
description: >-
|
|
38
|
+
Perform automated vulnerability scans of internal enterprise assets on a
|
|
39
|
+
quarterly, or more frequent, basis. Conduct both authenticated and
|
|
40
|
+
unauthenticated scans, using a SCAP-compliant vulnerability scanning tool.
|
|
41
|
+
implementation_groups:
|
|
42
|
+
- IG2
|
|
43
|
+
- IG3
|
|
44
|
+
- id: 7.6
|
|
45
|
+
version: 8
|
|
46
|
+
name: Perform Automated Vulnerability Scans of Externally-Exposed Enterprise Assets
|
|
47
|
+
description: >-
|
|
48
|
+
Perform automated vulnerability scans of externally-exposed enterprise assets
|
|
49
|
+
using a SCAP-compliant vulnerability scanning tool. Perform scans on a monthly,
|
|
50
|
+
or more frequent, basis.
|
|
51
|
+
implementation_groups:
|
|
52
|
+
- IG2
|
|
53
|
+
- IG3
|
|
54
|
+
- id: 3.1
|
|
55
|
+
version: 7
|
|
56
|
+
name: Run Automated Vulnerability Scanning Tools
|
|
57
|
+
description: >-
|
|
58
|
+
Utilize an up-to-date SCAP-compliant vulnerability scanning tool to
|
|
59
|
+
automatically scan all systems on the network on a weekly or more frequent basis
|
|
60
|
+
to identify all potential vulnerabilities on the organization's systems.
|
|
61
|
+
implementation_groups:
|
|
62
|
+
- IG2
|
|
63
|
+
- IG3
|
|
64
|
+
additional_info: >-
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.2.6
|
|
3
|
+
name: build_worker_vuln_scanning
|
|
4
|
+
title: Ensure build workers are automatically scanned for vulnerabilities
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_worker
|
|
8
|
+
description: >-
|
|
9
|
+
Scan build workers for vulnerabilities. It is recommended that this be done
|
|
10
|
+
automatically.
|
|
11
|
+
rationale: >-
|
|
12
|
+
Automatic scanning for vulnerabilities detects known weaknesses in environmental
|
|
13
|
+
sources in use, such as docker images or kernel versions. Such vulnerabilities can lead
|
|
14
|
+
to a massive breach if these environments are not replaced as fast as possible, since
|
|
15
|
+
attackers also know about these vulnerabilities and often try to take advantage of them.
|
|
16
|
+
Setting automatic scanning which scans environmental sources ensures that if any new
|
|
17
|
+
vulnerability is revealed, it can be replaced quickly and easily. This protects the worker
|
|
18
|
+
from being exposed to attacks.
|
|
19
|
+
impact: >-
|
|
20
|
+
audit: >-
|
|
21
|
+
If you are using a static host for a runner, whether bare-metal or virtual machine, you
|
|
22
|
+
should implement security best practices for the host operating system.
|
|
23
|
+
Malicious code executed in the context of a CI job could compromise the host, so
|
|
24
|
+
security protocols can help mitigate the impact. Other points to keep in mind include
|
|
25
|
+
securing or removing files such as SSH keys from the host system that may enable an
|
|
26
|
+
attacker to access other endpoints in the environment.
|
|
27
|
+
remediation: |
|
|
28
|
+
For each build worker, automatically scan its environmental sources, such as docker image, for vulnerabilities.
|
|
29
|
+
• Create a new project.
|
|
30
|
+
• Add a Dockerfile file to the project. This Dockerfile contains minimal configuration required to create a Docker image.
|
|
31
|
+
• Create pipeline configuration for the new project to create a Docker image from the Dockerfile, build and push a Docker image to the container registry, and then scan the Docker image for vulnerabilities.
|
|
32
|
+
• Check for reported vulnerabilities.
|
|
33
|
+
• Update the Docker image and scan the updated image.
|
|
34
|
+
default_value:
|
|
35
|
+
references:
|
|
36
|
+
- https://docs.gitlab.com/ee/tutorials/container_scanning/
|
|
37
|
+
cis_controls:
|
|
38
|
+
- id: 7.5
|
|
39
|
+
version: 8
|
|
40
|
+
name: Perform Automated Vulnerability Scans of Internal Enterprise Assets
|
|
41
|
+
description: >-
|
|
42
|
+
Perform automated vulnerability scans of internal enterprise assets on a
|
|
43
|
+
quarterly, or more frequent, basis. Conduct both authenticated and
|
|
44
|
+
unauthenticated scans, using a SCAP-compliant vulnerability scanning tool.
|
|
45
|
+
implementation_groups:
|
|
46
|
+
- IG2
|
|
47
|
+
- IG3
|
|
48
|
+
- id: 3.2
|
|
49
|
+
version: 7
|
|
50
|
+
name: Perform Authenticated Vulnerability Scanning
|
|
51
|
+
description: >-
|
|
52
|
+
Perform authenticated vulnerability scanning with agents running locally on
|
|
53
|
+
each system or with remote scanners that are configured with elevated rights on
|
|
54
|
+
the system being tested.
|
|
55
|
+
implementation_groups:
|
|
56
|
+
- IG2
|
|
57
|
+
- IG3
|
|
58
|
+
additional_info: >-
|
gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/monitor_worker_resource_consumption.yml
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.2.8
|
|
3
|
+
name: monitor_worker_resource_consumption
|
|
4
|
+
title: Ensure resource consumption of build workers is monitored
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_worker
|
|
8
|
+
description: >-
|
|
9
|
+
Monitor the resource consumption of build workers and set alerts for high consumption
|
|
10
|
+
that can lead to resource exhaustion.
|
|
11
|
+
rationale: >-
|
|
12
|
+
Resource exhaustion is when machine resources or services are highly consumed until
|
|
13
|
+
exhausted. Resource exhaustion may lead to DOS (Denial of Service). When such a
|
|
14
|
+
situation happens to build workers, it slows down and even stops the build process,
|
|
15
|
+
which harms the production of artifacts and the organization's ability to deliver software
|
|
16
|
+
on schedule. To prevent that, it is recommended to monitor resources consumption in
|
|
17
|
+
the build workers and set alerts to notify when they are highly consumed. That way
|
|
18
|
+
resource exhaustion can be acknowledged and prevented at an early stage.
|
|
19
|
+
impact: >-
|
|
20
|
+
audit: |
|
|
21
|
+
Verify that there is monitoring of resources consumption for each build worker.
|
|
22
|
+
GitLab Runner is instrumented with native Prometheus metrics, which can be exposed via an embedded HTTP server on the /metrics path. The server - if enabled - can be scraped by the Prometheus monitoring system or accessed with any other HTTP client.
|
|
23
|
+
|
|
24
|
+
This is the list of available metrics:
|
|
25
|
+
• #HELP gitlab_runner_api_request_statuses_total The total number of api requests, partitioned by runner, endpoint and status.
|
|
26
|
+
• #HELP gitlab_runner_autoscaling_machine_creation_duration_seconds Histogram of machine creation time.
|
|
27
|
+
• #HELP gitlab_runner_autoscaling_machine_states The current number of machines per state in this provider.
|
|
28
|
+
• #HELP gitlab_runner_concurrent The current value of concurrent setting
|
|
29
|
+
• #HELP gitlab_runner_errors_total The number of caught errors.
|
|
30
|
+
• #HELP gitlab_runner_limit The current value of limit setting
|
|
31
|
+
• #HELP gitlab_runner_request_concurrency The current number of concurrent requests for a new job
|
|
32
|
+
• #HELP gitlab_runner_request_concurrency_exceeded_total Count of excess requests above the configured request_concurrency limit
|
|
33
|
+
• #HELP gitlab_runner_version_info A metric with a constant '1' value labeled by different build stats fields.
|
|
34
|
+
remediation: |
|
|
35
|
+
Set resources consumption monitoring for each build worker.
|
|
36
|
+
To learn how to set up a Prometheus server to scrape this HTTP endpoint and make use of the collected metrics, see Prometheus's Getting started guide. Once this is done, the following information will be exposed:
|
|
37
|
+
|
|
38
|
+
The exposed information includes:
|
|
39
|
+
• Runner business logic metrics (e.g., the number of currently running jobs)
|
|
40
|
+
• Go-specific process metrics (garbage collection stats, goroutines, memstats, etc.)
|
|
41
|
+
• general process metrics (memory usage, CPU usage, file descriptor usage, etc.)
|
|
42
|
+
• build version information
|
|
43
|
+
default_value:
|
|
44
|
+
references:
|
|
45
|
+
- https://docs.gitlab.com/runner/monitoring/index.html
|
|
46
|
+
cis_controls:
|
|
47
|
+
- id: 0.0
|
|
48
|
+
version: 8
|
|
49
|
+
name: Explicitly Not Mapped
|
|
50
|
+
description: >-
|
|
51
|
+
Explicitly Not Mapped
|
|
52
|
+
implementation_groups:
|
|
53
|
+
- id: 0.0
|
|
54
|
+
version: 7
|
|
55
|
+
name: Explicitly Not Mapped
|
|
56
|
+
description: >-
|
|
57
|
+
Explicitly Not Mapped
|
|
58
|
+
implementation_groups:
|
|
59
|
+
additional_info: >-
|
gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/pass_worker_envs_and_commands.yml
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.2.2
|
|
3
|
+
name: pass_worker_envs_and_commands
|
|
4
|
+
title: Ensure build worker environments and commands are passed and not pulled
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_worker
|
|
8
|
+
description: >-
|
|
9
|
+
A worker's environment can be passed (for example, a pod in a Kubernetes cluster in
|
|
10
|
+
which an environment variable is passed to it). It also can be pulled, like a virtual
|
|
11
|
+
machine that is installing a package. Ensure that the environment and commands are
|
|
12
|
+
passed to the workers and not pulled from it.
|
|
13
|
+
rationale: >-
|
|
14
|
+
Passing an environment means additional configuration happens in the build time phase
|
|
15
|
+
and not in run time. It will also pass locally and not remotely. Passing a worker
|
|
16
|
+
environment, instead of pulling it from an outer source, reduces the possibility for an
|
|
17
|
+
attacker to gain access and potentially pull malicious code into it. By passing locally and
|
|
18
|
+
not pulling from remote, there is also less chance of an attack based on the remote
|
|
19
|
+
connection, such as a man-in-the-middle or malicious scripts that can run from remote.
|
|
20
|
+
This therefore prevents possible infection of the build worker.
|
|
21
|
+
impact: >-
|
|
22
|
+
audit: |
|
|
23
|
+
For each build worker, ensure its environment and commands are passed and not pulled.
|
|
24
|
+
1. Review .gitlab-ci.yml and Runner Configurations: Check your project's .gitlab-ci.yml file and any associated Runner configurations to ensure that all necessary environment variables, commands, and configurations are explicitly defined and passed to the Runner. This involves reviewing the job definitions to confirm they do not rely on external sources for configuration at runtime.
|
|
25
|
+
2. Examine Runner Execution Environment: Verify that the execution environment of the Runner (whether it's a Docker container, a Kubernetes pod, or a virtual machine) receives its configuration from the .gitlab-ci.yml file or the GitLab project settings directly, without pulling from external sources during the job execution.
|
|
26
|
+
3. Check for External Dependencies: Ensure that any external dependencies, such as third-party libraries or tools, are explicitly defined and version-controlled within the project repository or through secure, trusted registries. Avoid configurations that allow the Runner to dynamically fetch or update these dependencies during the build process without strict version controls.
|
|
27
|
+
remediation: |
|
|
28
|
+
For each build worker, pass its environment and commands to it instead of pulling it.
|
|
29
|
+
1. Update .gitlab-ci.yml: Amend your .gitlab-ci.yml file to include all necessary environment variables and configurations directly within the file or through secure, project-level settings in GitLab. Avoid dynamic fetching of configurations from external sources during runtime.
|
|
30
|
+
2. Secure Runner Environment: Configure your GitLab Runner environments (Docker, Kubernetes, VMs, etc.) to use pre-defined images and configurations that do not require pulling additional settings or scripts during execution. Use trusted, version-controlled base images and scripts.
|
|
31
|
+
3. Utilize Secure Variables and Templates: Leverage GitLab's features for secure variables and include templates for common configurations to ensure that environment settings and commands are passed securely and consistently across all projects.
|
|
32
|
+
default_value:
|
|
33
|
+
references:
|
|
34
|
+
- https://docs.gitlab.com/ee/ci/#the-gitlab-ciyml-file
|
|
35
|
+
cis_controls:
|
|
36
|
+
- id: 0.0
|
|
37
|
+
version: 8
|
|
38
|
+
name: Explicitly Not Mapped
|
|
39
|
+
description: >-
|
|
40
|
+
Explicitly Not Mapped
|
|
41
|
+
implementation_groups:
|
|
42
|
+
- id: 0.0
|
|
43
|
+
version: 7
|
|
44
|
+
name: Explicitly Not Mapped
|
|
45
|
+
description: >-
|
|
46
|
+
Explicitly Not Mapped
|
|
47
|
+
implementation_groups:
|
|
48
|
+
additional_info: >-
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 2.2 Build Worker
|
|
2
|
+
|
|
3
|
+
This section consists of security recommendations for build workers management and use.
|
|
4
|
+
|
|
5
|
+
Build workers are often called Runners. They are the infrastructure on which the pipeline runs. Build workers are considered sensitive because usually they have access to multiple, if not all, software supply chain components. One worker can run code checkout with source code management access, run tests, and push to the registry which requires access to it. Also, some of the pipeline commands running in a build worker can be vulnerable to attack and enlarge the attack surface. Because of all of that, it is especially important to ensure that the build workers are protected.
|
|
6
|
+
|
|
7
|
+
## Recommendations
|
|
8
|
+
|
|
9
|
+
* [2.2.1 - single_use_workers.yml](./single_use_workers.yml)
|
|
10
|
+
* [2.2.2 - pass_worker_envs_and_commands.yml](./pass_worker_envs_and_commands.yml)
|
|
11
|
+
* [2.2.3 - segregate_worker_duties.yml](./segregate_worker_duties.yml)
|
|
12
|
+
* [2.2.4 - restrict_worker_connectivity.yml](./restrict_worker_connectivity.yml)
|
|
13
|
+
* [2.2.5 - worker_runtime_security.yml](./worker_runtime_security.yml)
|
|
14
|
+
* [2.2.6 - build_worker_vuln_scanning.yml](./build_worker_vuln_scanning.yml)
|
|
15
|
+
* [2.2.7 - store_worker_config.yml](./store_worker_config.yml)
|
|
16
|
+
* [2.2.8 - monitor_worker_resource_consumption.yml](./monitor_worker_resource_consumption.yml)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.2.4
|
|
3
|
+
name: restrict_worker_connectivity
|
|
4
|
+
title: Ensure build workers have minimal network connectivity
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_worker
|
|
8
|
+
description: >-
|
|
9
|
+
Ensure that build workers have minimal network connectivity.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Restricting the network connectivity of build workers decreases the possibility that an
|
|
12
|
+
attacker would be capable of entering the organization from the outside. If the build
|
|
13
|
+
workers are connected to the public internet without any restriction, it is far simpler for
|
|
14
|
+
attackers to compromise them. Limiting network connectivity between build workers
|
|
15
|
+
also protects the organization in case an attacker was successful and subsequently
|
|
16
|
+
attempts to spread the attack to other components of the environment.
|
|
17
|
+
impact: >-
|
|
18
|
+
Developers will not have connectivity to every resource they might need from the
|
|
19
|
+
outside. Workers will also only be able to exchange data through shareable storage.
|
|
20
|
+
audit: |
|
|
21
|
+
Verify that build workers, environment, and any other components have only the required minimum of network connectivity.
|
|
22
|
+
|
|
23
|
+
Review these configuration measures for your self-managed runners:
|
|
24
|
+
• Configuring runner virtual machines in their own network segment
|
|
25
|
+
• Blocking SSH access from the Internet to runner virtual machines
|
|
26
|
+
• Restricting traffic between runner virtual machines
|
|
27
|
+
• Filtering access to cloud provider metadata endpoints
|
|
28
|
+
remediation: |
|
|
29
|
+
Limit the network connectivity of build workers, environment, and any other components to the necessary minimum.
|
|
30
|
+
|
|
31
|
+
Ensure these configuration measures are in place for your self-managed runners:
|
|
32
|
+
• Configuring runner virtual machines in their own network segment
|
|
33
|
+
• Blocking SSH access from the Internet to runner virtual machines
|
|
34
|
+
• Restricting traffic between runner virtual machines
|
|
35
|
+
• Filtering access to cloud provider metadata endpoints
|
|
36
|
+
default_value:
|
|
37
|
+
references:
|
|
38
|
+
- https://docs.gitlab.com/runner/security/#network-segmentation
|
|
39
|
+
cis_controls:
|
|
40
|
+
- id: 13.5
|
|
41
|
+
version: 8
|
|
42
|
+
name: Manage Access Control for Remote Assets
|
|
43
|
+
description: >-
|
|
44
|
+
Manage access control for assets remotely connecting to enterprise resources.
|
|
45
|
+
Determine amount of access to enterprise resources based on: up-to-date anti-
|
|
46
|
+
malware software installed, configuration compliance with the enterprise's secure
|
|
47
|
+
configuration process, and ensuring the operating system and applications are up-
|
|
48
|
+
to-date.
|
|
49
|
+
implementation_groups:
|
|
50
|
+
- IG2
|
|
51
|
+
- IG3
|
|
52
|
+
- id: 12.12
|
|
53
|
+
version: 7
|
|
54
|
+
name: Manage All Devices Remotely Logging into Internal Network
|
|
55
|
+
description: >-
|
|
56
|
+
Scan all enterprise devices remotely logging into the organization's network
|
|
57
|
+
prior to accessing the network to ensure that each of the organization's security
|
|
58
|
+
policies has been enforced in the same manner as local network devices.
|
|
59
|
+
implementation_groups:
|
|
60
|
+
- IG3
|
|
61
|
+
additional_info: >-
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.2.3
|
|
3
|
+
name: segregate_worker_duties
|
|
4
|
+
title: Ensure the duties of each build worker are segregated
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_worker
|
|
8
|
+
description: >-
|
|
9
|
+
Separate responsibilities in the build workflow, such as testing, compiling, pushing
|
|
10
|
+
artifacts, etc., to different build workers so that each worker will have a single duty.
|
|
11
|
+
rationale: >-
|
|
12
|
+
Separating duties and allocating them to many workers makes it easier to verify each
|
|
13
|
+
step in the build process and ensure there is no corruption. It also limits the effect of an
|
|
14
|
+
attack on a build worker, as such an attack would be less critical if the worker has less
|
|
15
|
+
access and duties that are subject to harm.
|
|
16
|
+
impact: >-
|
|
17
|
+
audit: |
|
|
18
|
+
To ensure separation of duties, you can have runner only running jobs for a specific project or a specific group.
|
|
19
|
+
|
|
20
|
+
For a group:
|
|
21
|
+
• On the left sidebar, select Search or go to and find your group.
|
|
22
|
+
• Select Settings > CI/CD.
|
|
23
|
+
• Expand the Runners section.
|
|
24
|
+
• Review the Runners related to your specific group.
|
|
25
|
+
|
|
26
|
+
For a project:
|
|
27
|
+
• On the left sidebar, select Search or go to and find your project.
|
|
28
|
+
• Select Settings > CI/CD.
|
|
29
|
+
• Expand the Runners section.
|
|
30
|
+
• Review the Runners related to your specific project.
|
|
31
|
+
remediation: |
|
|
32
|
+
To ensure separation of duties, create runners dedicated to a single group or project.
|
|
33
|
+
|
|
34
|
+
For a group:
|
|
35
|
+
• On the left sidebar, select Search or go to and find your group.
|
|
36
|
+
• Select Build > Runners.
|
|
37
|
+
• Select New group runner.
|
|
38
|
+
• Select the operating system where GitLab Runner is installed.
|
|
39
|
+
• In the Tags section, in the Tags field, enter the job tags to specify jobs the runner can run. If there are no job tags for this runner, select Run untagged.
|
|
40
|
+
• Optional. In the Runner description field, add a runner description that displays in GitLab.
|
|
41
|
+
• Optional. In the Configuration section, add additional configurations.
|
|
42
|
+
• Select Create runner.
|
|
43
|
+
• Follow the on-screen instructions to register the runner from the command line.
|
|
44
|
+
• When prompted by the command line:
|
|
45
|
+
• For the GitLab instance URL, use the URL for your GitLab instance. For example, if your project is hosted on gitlab.example.com/yourname/yourproject, your GitLab instance URL is https://gitlab.example.com.
|
|
46
|
+
• For the executor, enter the type of executor. The executor is the environment where the runner executes the job.
|
|
47
|
+
|
|
48
|
+
For a project:
|
|
49
|
+
• On the left sidebar, select Search or go to and find your project.
|
|
50
|
+
• Select Settings > CI/CD.
|
|
51
|
+
• Expand the Runners section.
|
|
52
|
+
• Select New project runner.
|
|
53
|
+
• Select the operating system where GitLab Runner is installed.
|
|
54
|
+
• In the Tags section, in the Tags field, enter the job tags to specify jobs the runner can run. If there are no job tags for this runner, select Run untagged.
|
|
55
|
+
• Optional. In the Runner description field, add a description for the runner that displays in GitLab.
|
|
56
|
+
• Optional. In the Configuration section, add additional configurations.
|
|
57
|
+
• Select Create runner.
|
|
58
|
+
• Follow the on-screen instructions to register the runner from the command line.
|
|
59
|
+
• When prompted by the command line:
|
|
60
|
+
• For the GitLab instance URL, use the URL for your GitLab instance. For example, if your project is hosted on gitlab.example.com/yourname/yourproject, your GitLab instance URL is https://gitlab.example.com.
|
|
61
|
+
• For the executor, enter the type of executor. The executor is the environment where the runner executes the job.
|
|
62
|
+
default_value:
|
|
63
|
+
references:
|
|
64
|
+
- https://docs.gitlab.com/ee/ci/runners/runners_scope.html
|
|
65
|
+
cis_controls:
|
|
66
|
+
- id: 0.0
|
|
67
|
+
version: 8
|
|
68
|
+
name: Explicitly Not Mapped
|
|
69
|
+
description: >-
|
|
70
|
+
Explicitly Not Mapped
|
|
71
|
+
implementation_groups:
|
|
72
|
+
- id: 0.0
|
|
73
|
+
version: 7
|
|
74
|
+
name: Explicitly Not Mapped
|
|
75
|
+
description: >-
|
|
76
|
+
Explicitly Not Mapped
|
|
77
|
+
implementation_groups:
|
|
78
|
+
additional_info: >-
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.2.1
|
|
3
|
+
name: single_use_workers
|
|
4
|
+
title: Ensure build workers are single-used
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_worker
|
|
8
|
+
description: >-
|
|
9
|
+
Use a clean instance of build worker for every pipeline run.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Using a clean instance of build worker for every pipeline run eliminates the risks of data
|
|
12
|
+
theft, data integrity breaches, and unavailability. It limits the pipeline's access to data
|
|
13
|
+
stored on the file system from previous runs, and the cache is volatile. This prevents
|
|
14
|
+
malicious changes from affecting other pipelines or the Continuous
|
|
15
|
+
Integration/Continuous Delivery system itself.
|
|
16
|
+
impact: >-
|
|
17
|
+
Data and cache will not be saved in different pipeline runs.
|
|
18
|
+
audit: >-
|
|
19
|
+
Ensure that every pipeline that is being run has its own clean, new runner.
|
|
20
|
+
In GitLab, each of your jobs runs in a newly provisioned VM, which is dedicated to the
|
|
21
|
+
specific job.
|
|
22
|
+
The VM is active only for the duration of the job and immediately deleted.
|
|
23
|
+
This means that any changes that your job makes to the virtual machine will not be
|
|
24
|
+
available to a subsequent job.
|
|
25
|
+
The virtual machine where your job runs has sudo access with no password.
|
|
26
|
+
remediation: >-
|
|
27
|
+
Create a clean build worker for every pipeline that is being run, or use build platform-
|
|
28
|
+
hosted runners, as they typically offer a clean instance for every run.
|
|
29
|
+
In GitLab, use Runner SaaS to ensure all of these settings are available by default and
|
|
30
|
+
that each job runs in a dedicated VM.
|
|
31
|
+
default_value:
|
|
32
|
+
references:
|
|
33
|
+
- https://docs.gitlab.com/ee/ci/runners/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,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.2.7
|
|
3
|
+
name: store_worker_config
|
|
4
|
+
title: Ensure build workers' deployment configuration is stored in a version control platform
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_worker
|
|
8
|
+
description: >-
|
|
9
|
+
Store the deployment configuration of build workers in a version control platform, such
|
|
10
|
+
as GitLab.
|
|
11
|
+
rationale: >-
|
|
12
|
+
Build workers are a sensitive part of the build phase. They generally have access to the
|
|
13
|
+
code repository, the Continuous Integration platform, the deployment platform, etc. This
|
|
14
|
+
means that an attacker gaining access to a build worker may compromise other
|
|
15
|
+
platforms in the organization and cause a major incident. One thing that can protect
|
|
16
|
+
workers is to ensure that their deployment configuration is safe and well-configured.
|
|
17
|
+
Storing the deployment configuration in version control enables more observability of
|
|
18
|
+
these configurations because everything is catalogued in a single place. It adds another
|
|
19
|
+
layer of security, as every change will be reviewed and noticed, and thus malicious
|
|
20
|
+
changes will theoretically occur less. In the case of a mistake, bug, or security incident,
|
|
21
|
+
it also offers an easier way to "revert" back to a safe version or add a "hot fix" quickly.
|
|
22
|
+
impact: >-
|
|
23
|
+
Changes in deployment configuration may only be applied by declaration in the version
|
|
24
|
+
control platform. This could potentially slow down the development process.
|
|
25
|
+
audit: |
|
|
26
|
+
Verify that the deployment configuration of build workers is stored in a version control platform.
|
|
27
|
+
• On the left sidebar, select Code > Repository.
|
|
28
|
+
• Check if a .gitlab-ci.yml file is at the root of your repository.
|
|
29
|
+
remediation: |
|
|
30
|
+
Document and store every deployment configuration of build workers in a version control platform.
|
|
31
|
+
• On the left sidebar, select Code > Repository.
|
|
32
|
+
• Above the file list, select the branch you want to commit to. If you're not sure, leave master or main. Then select the plus icon () and New file:
|
|
33
|
+
• For the Filename, type .gitlab-ci.yml.
|
|
34
|
+
• Select Commit changes.
|
|
35
|
+
default_value:
|
|
36
|
+
references:
|
|
37
|
+
- https://docs.gitlab.com/ee/ci/quick_start/index.html
|
|
38
|
+
cis_controls:
|
|
39
|
+
- id: 4.1
|
|
40
|
+
version: 8
|
|
41
|
+
name: Establish and Maintain a Secure Configuration Process
|
|
42
|
+
description: >-
|
|
43
|
+
Establish and maintain a secure configuration process for enterprise assets
|
|
44
|
+
(end-user devices, including portable and mobile, non-computing/IoT devices, and
|
|
45
|
+
servers) and software (operating systems and applications). Review and update
|
|
46
|
+
documentation annually, or when significant enterprise changes occur that could
|
|
47
|
+
impact this Safeguard.
|
|
48
|
+
implementation_groups:
|
|
49
|
+
- IG1
|
|
50
|
+
- IG2
|
|
51
|
+
- IG3
|
|
52
|
+
- id: 5.1
|
|
53
|
+
version: 7
|
|
54
|
+
name: Establish Secure Configurations
|
|
55
|
+
description: >-
|
|
56
|
+
Maintain documented, standard security configuration standards for all
|
|
57
|
+
authorized operating systems and software.
|
|
58
|
+
implementation_groups:
|
|
59
|
+
- IG1
|
|
60
|
+
- IG2
|
|
61
|
+
- IG3
|
|
62
|
+
additional_info: >-
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.2.5
|
|
3
|
+
name: worker_runtime_security
|
|
4
|
+
title: Ensure run-time security is enforced for build workers
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: build_worker
|
|
8
|
+
description: >-
|
|
9
|
+
Add traces to build workers' operating systems and installed applications so that in run
|
|
10
|
+
time, collected events can be analyzed to detect suspicious behavior patterns and
|
|
11
|
+
malware.
|
|
12
|
+
rationale: >-
|
|
13
|
+
Build workers are exposed to data exfiltration attacks, code injection attacks, and more
|
|
14
|
+
while running. It is important to secure them from such attacks by enforcing run-time
|
|
15
|
+
security on the build worker itself. This will identify attempted attacks in real time and
|
|
16
|
+
prevent them.
|
|
17
|
+
impact: >-
|
|
18
|
+
audit: >-
|
|
19
|
+
Verify that a run-time security solution is enforced on every active build worker.
|
|
20
|
+
remediation: >-
|
|
21
|
+
Deploy and enforce a run-time security solution on build workers.
|
|
22
|
+
default_value:
|
|
23
|
+
references:
|
|
24
|
+
cis_controls:
|
|
25
|
+
- id: 0.0
|
|
26
|
+
version: 8
|
|
27
|
+
name: Explicitly Not Mapped
|
|
28
|
+
description: >-
|
|
29
|
+
Explicitly Not Mapped
|
|
30
|
+
implementation_groups:
|
|
31
|
+
- id: 0.0
|
|
32
|
+
version: 7
|
|
33
|
+
name: Explicitly Not Mapped
|
|
34
|
+
description: >-
|
|
35
|
+
Explicitly Not Mapped
|
|
36
|
+
implementation_groups:
|
|
37
|
+
additional_info: >-
|