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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 2.4 Pipeline Integrity
|
|
2
|
+
|
|
3
|
+
This section consists of security recommendations for keeping pipeline integrity.
|
|
4
|
+
|
|
5
|
+
Integrity means ensuring that the pipelines, the dependencies they use, and their artifacts are all authentic and what they intended to be. Securing the pipeline integrity is to verify that every change and process running during the build pipeline run is what it is supposed to be. One way to do that for example is to lock each dependency to a certain secured version. It is important to insist on securing that because this is the way to set trust with the customer.
|
|
6
|
+
|
|
7
|
+
## Recommendations
|
|
8
|
+
|
|
9
|
+
* [2.4.1 - sign_artifacts.yml](./sign_artifacts.yml)
|
|
10
|
+
* [2.4.2 - lock_dependencies.yml](./lock_dependencies.yml)
|
|
11
|
+
* [2.4.3 - validate_dependencies.yml](./validate_dependencies.yml)
|
|
12
|
+
* [2.4.4 - create_reproducible_artifacts.yml](./create_reproducible_artifacts.yml)
|
|
13
|
+
* [2.4.5 - pipeline_produces_sbom.yml](./pipeline_produces_sbom.yml)
|
|
14
|
+
* [2.4.6 - pipeline_sign_sbom.yml](./pipeline_signs_sbom.yml)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.4.1
|
|
3
|
+
name: sign_artifacts
|
|
4
|
+
title: Ensure all artifacts on all releases are signed
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: pipeline_integrity
|
|
8
|
+
description: >-
|
|
9
|
+
Sign all artifacts in all releases with user or organization keys.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Signing artifacts is used to validate both their integrity and security. Organizations signal
|
|
12
|
+
that artifacts may be trusted and they themselves produced them by ensuring that every
|
|
13
|
+
artifact is properly signed. The presence of this signature also makes potentially
|
|
14
|
+
malicious activity far more difficult.
|
|
15
|
+
impact: >-
|
|
16
|
+
audit: >-
|
|
17
|
+
Ensure every artifact in every release is signed.
|
|
18
|
+
remediation: >-
|
|
19
|
+
For every artifact in every release, verify that all are properly signed.
|
|
20
|
+
default_value:
|
|
21
|
+
references:
|
|
22
|
+
cis_controls:
|
|
23
|
+
- id: 0.0
|
|
24
|
+
version: 8
|
|
25
|
+
name: Explicitly Not Mapped
|
|
26
|
+
description: >-
|
|
27
|
+
Explicitly Not Mapped
|
|
28
|
+
implementation_groups:
|
|
29
|
+
- id: 0.0
|
|
30
|
+
version: 7
|
|
31
|
+
name: Explicitly Not Mapped
|
|
32
|
+
description: >-
|
|
33
|
+
Explicitly Not Mapped
|
|
34
|
+
implementation_groups:
|
|
35
|
+
additional_info: >-
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 2.4.3
|
|
3
|
+
name: validate_dependencies
|
|
4
|
+
title: Ensure dependencies are validated before being used
|
|
5
|
+
profile: 1
|
|
6
|
+
category: build_pipelines
|
|
7
|
+
sub_category: pipeline_integrity
|
|
8
|
+
description: >-
|
|
9
|
+
Validate every dependency of the pipeline before use.
|
|
10
|
+
rationale: >-
|
|
11
|
+
To ensure that a dependency used in a pipeline is trusted and has not been infected by
|
|
12
|
+
malicious actor (for example, the codecov incident), validate dependencies before using
|
|
13
|
+
them. This can be accomplished by comparing the checksum of the dependency to its
|
|
14
|
+
checksum in a trusted source. If a difference arises, this is a sign that an unknown actor
|
|
15
|
+
has interfered and may have added malevolent code. If this dependency is used, it will
|
|
16
|
+
infect the environment, which could end in a massive breach and leave the organization
|
|
17
|
+
exposed to data leaks, etc.
|
|
18
|
+
impact: >-
|
|
19
|
+
audit: |
|
|
20
|
+
For every dependency used in every pipeline, ensure it has been validated.
|
|
21
|
+
• On the left sidebar, select Code > Repository.
|
|
22
|
+
• Check if a .gitlab-ci.yml file is at the root of your repository
|
|
23
|
+
• Verify the following job is included in your .gitlab-ci.yml file:
|
|
24
|
+
include:
|
|
25
|
+
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
|
|
26
|
+
• Go to Build > Pipelines and confirm that the latest pipeline completed successfully.
|
|
27
|
+
remediation: >-
|
|
28
|
+
For every dependency used in every pipeline, validate each one.
|
|
29
|
+
• On the left sidebar, select Code > Repository.
|
|
30
|
+
• Check if a .gitlab-ci.yml file is at the root of your repository
|
|
31
|
+
• Include the following job is included in your .gitlab-ci.yml file:
|
|
32
|
+
include:
|
|
33
|
+
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
|
|
34
|
+
• Go to Build > Pipelines and confirm that the latest pipeline completed successfully. In the pipeline, dependency scanning runs and the vulnerabilities are detected automatically.
|
|
35
|
+
• Go to Secure > Vulnerability report.
|
|
36
|
+
• Select each of the vulnerabilities by selecting the checkbox in each row.
|
|
37
|
+
• Review the recommended solution for each vulnerability and investigate further if needed.
|
|
38
|
+
• From the Set status dropdown list select the relevant option and select Change status.
|
|
39
|
+
default_value:
|
|
40
|
+
references:
|
|
41
|
+
- https://docs.gitlab.com/ee/tutorials/dependency_scanning.html
|
|
42
|
+
cis_controls:
|
|
43
|
+
- id: 16.5
|
|
44
|
+
version: 8
|
|
45
|
+
name: Use Up-to-Date and Trusted Third-Party Software Components
|
|
46
|
+
description: >-
|
|
47
|
+
Use up-to-date and trusted third-party software components. When possible,
|
|
48
|
+
choose established and proven frameworks and libraries that provide adequate
|
|
49
|
+
security. Acquire these components from trusted sources or evaluate the software
|
|
50
|
+
for vulnerabilities before use.
|
|
51
|
+
implementation_groups:
|
|
52
|
+
- IG2
|
|
53
|
+
- IG3
|
|
54
|
+
- id: 18.4
|
|
55
|
+
version: 7
|
|
56
|
+
name: Only Use Up-to-date And Trusted Third-Party Components
|
|
57
|
+
description: >-
|
|
58
|
+
Only use up-to-date and trusted third-party components for the software
|
|
59
|
+
developed by the organization.
|
|
60
|
+
implementation_groups:
|
|
61
|
+
- IG2
|
|
62
|
+
- IG3
|
|
63
|
+
additional_info: >-
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 2 Build Pipelines
|
|
2
|
+
|
|
3
|
+
This section consists of security recommendations for the management of application build pipelines developed by an organization.
|
|
4
|
+
|
|
5
|
+
Build pipelines are a set of instructions dedicated to taking raw files of source code and running a series of tasks on them to achieve some final artifact as output. This artifact represents the final form of the recent version of software, which is subsequently packaged for convenient storing, handling, and deploying. Build pipelines are a general name for the environment in which this compilation process takes place, the pipeline files that orchestrate the process, and all sets of instructions related to them.
|
|
6
|
+
|
|
7
|
+
## Sections
|
|
8
|
+
|
|
9
|
+
- [2.1 - Build Environment](./build_environment_2_1)
|
|
10
|
+
- [2.2 - Build Worker](./build_worker_2_2)
|
|
11
|
+
- [2.3 - Pipeline Instructions](./pipeline_instructions_2_3)
|
|
12
|
+
- [2.4 - Pipeline Integrity](./pipeline_integrity_2_4)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# 3 Dependencies
|
|
2
|
+
|
|
3
|
+
This section consists of security recommendations for the management of various dependencies introduced as part of the software build and release process. These are comprised of anything that goes into application code or is used by build pipelines themselves.
|
|
4
|
+
|
|
5
|
+
Dependencies are a huge part of the software supply chain, as they are integrated in a lot of important phases. They are often written by third-party developers and might be vulnerable to certain attacks, for example the log4j attack. Because of that it is particularly important to secure them and their use in the supply chain.
|
|
6
|
+
|
|
7
|
+
## Sections
|
|
8
|
+
|
|
9
|
+
- [3.1 - Third-Party Packages](./third_party_packages_3_1/)
|
|
10
|
+
- [3.2 - Validate Packages](./validate_packages_3_2/)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 3.1.5
|
|
3
|
+
name: define_package_managers
|
|
4
|
+
title: Ensure trusted package managers and repositories are defined and prioritized
|
|
5
|
+
profile: 1
|
|
6
|
+
category: dependencies
|
|
7
|
+
sub_category: third_party_packages
|
|
8
|
+
description: >-
|
|
9
|
+
Prioritize trusted package registries over others when pulling a package.
|
|
10
|
+
rationale: >-
|
|
11
|
+
When pulling a package by name, the package manager might look for it in several
|
|
12
|
+
package registries, some of which may be untrusted or badly configured. If the package
|
|
13
|
+
is pulled from such a registry, there is a higher likelihood that it could prove malicious. In
|
|
14
|
+
order to avoid this, configure packages to be pulled from trusted package registries.
|
|
15
|
+
impact: >-
|
|
16
|
+
audit: >-
|
|
17
|
+
For each package registry in use, ensure it is trusted. The GitLab package registry is
|
|
18
|
+
enabled by default.
|
|
19
|
+
remediation: >-
|
|
20
|
+
For each package to be downloaded, configure it to be downloaded from a trusted
|
|
21
|
+
source. To view your GitLab package registry and its contents, click on "Deploy" -->
|
|
22
|
+
"Package Registry."
|
|
23
|
+
default_value:
|
|
24
|
+
references:
|
|
25
|
+
cis_controls:
|
|
26
|
+
- id: 2.5
|
|
27
|
+
version: 8
|
|
28
|
+
name: Allowlist Authorized Software
|
|
29
|
+
description: >-
|
|
30
|
+
Use technical controls, such as application allowlisting, to ensure that only
|
|
31
|
+
authorized software can execute or be accessed. Reassess bi-annually, or more
|
|
32
|
+
frequently.
|
|
33
|
+
implementation_groups:
|
|
34
|
+
- IG2
|
|
35
|
+
- IG3
|
|
36
|
+
- id: 2.6
|
|
37
|
+
version: 8
|
|
38
|
+
name: Allowlist Authorized Libraries
|
|
39
|
+
description: >-
|
|
40
|
+
Use technical controls to ensure that only authorized software libraries, such
|
|
41
|
+
as specific .dll, .ocx, .so, etc., files, are allowed to load into a system process.
|
|
42
|
+
Block unauthorized libraries from loading into a system process. Reassess bi-
|
|
43
|
+
annually, or more frequently.
|
|
44
|
+
implementation_groups:
|
|
45
|
+
- IG2
|
|
46
|
+
- IG3
|
|
47
|
+
- id: 2.7
|
|
48
|
+
version: 8
|
|
49
|
+
name: Allowlist Authorized Scripts
|
|
50
|
+
description: >-
|
|
51
|
+
Use technical controls, such as digital signatures and version control, to ensure
|
|
52
|
+
that only authorized scripts, such as specific .ps1, .py, etc., files, are allowed to
|
|
53
|
+
execute. Block unauthorized scripts from executing. Reassess bi-annually, or more
|
|
54
|
+
frequently.
|
|
55
|
+
implementation_groups:
|
|
56
|
+
- IG3
|
|
57
|
+
- id: 2.7
|
|
58
|
+
version: 7
|
|
59
|
+
name: Utilize Application Whitelisting
|
|
60
|
+
description: >-
|
|
61
|
+
Utilize application whitelisting technology on all assets to ensure that only
|
|
62
|
+
authorized software executes and all unauthorized software is blocked from
|
|
63
|
+
executing on assets.
|
|
64
|
+
implementation_groups:
|
|
65
|
+
- IG3
|
|
66
|
+
- id: 2.8
|
|
67
|
+
version: 7
|
|
68
|
+
name: Implement Application Whitelisting of Libraries
|
|
69
|
+
description: >-
|
|
70
|
+
The organization's application whitelisting software must ensure that only
|
|
71
|
+
authorized software libraries (such as *.dll, *.ocx, *.so, etc) are allowed to load into
|
|
72
|
+
a system process.
|
|
73
|
+
implementation_groups:
|
|
74
|
+
- IG3
|
|
75
|
+
- id: 2.9
|
|
76
|
+
version: 7
|
|
77
|
+
name: Implement Application Whitelisting of Scripts
|
|
78
|
+
description: >-
|
|
79
|
+
The organization's application whitelisting software must ensure that only
|
|
80
|
+
authorized, digitally signed scripts (such as *.ps1, *.py, macros, etc) are allowed to
|
|
81
|
+
run on a system.
|
|
82
|
+
implementation_groups:
|
|
83
|
+
- IG3
|
|
84
|
+
additional_info: >-
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 3.1.6
|
|
3
|
+
name: dependency_sbom
|
|
4
|
+
title: Ensure a signed Software Bill of Materials (SBOM) of the code is supplied
|
|
5
|
+
profile: 1
|
|
6
|
+
category: dependencies
|
|
7
|
+
sub_category: third_party_packages
|
|
8
|
+
description: >-
|
|
9
|
+
A Software Bill of Materials (SBOM) is a file that specifies each component of software
|
|
10
|
+
or a build process. When using a dependency, demand its SBOM and ensure it is
|
|
11
|
+
signed for validation purposes.
|
|
12
|
+
rationale: >-
|
|
13
|
+
A Software Bill of Materials (SBOM) creates trust between its provider and its users by
|
|
14
|
+
ensuring that the software supplied is the software described, without any potential
|
|
15
|
+
interference in between. Signing an SBOM creates a checksum for it, which will change
|
|
16
|
+
if the SBOM's content was changed. With that checksum, a software user can be
|
|
17
|
+
certain nothing had happened to it during the supply chain, engendering trust in the
|
|
18
|
+
software. When there is no such trust in the software, the risk surface is increased
|
|
19
|
+
because one cannot know if the software is potentially vulnerable. Demanding a signed
|
|
20
|
+
SBOM and validating it decreases that risk.
|
|
21
|
+
impact: >-
|
|
22
|
+
audit: >-
|
|
23
|
+
For every artifact supplied, ensure it has a validated, signed Software Bill of Materials.
|
|
24
|
+
To view the SBOMs associated with your projects, Navigate to
|
|
25
|
+
Secure --> Dependency list
|
|
26
|
+
You may export the SBOM in .json format
|
|
27
|
+
remediation: |
|
|
28
|
+
For every artifact supplied, require and verify a signed Software Bill of Materials from its supplier.
|
|
29
|
+
1. To create an SBOM, you must run a dependency scan.
|
|
30
|
+
2. Enable dependency scanning, and an SBOM will be automatically generated for your project.
|
|
31
|
+
default_value:
|
|
32
|
+
references:
|
|
33
|
+
cis_controls:
|
|
34
|
+
- id: 2.1
|
|
35
|
+
version: 8
|
|
36
|
+
name: Establish and Maintain a Software Inventory
|
|
37
|
+
description: >-
|
|
38
|
+
Establish and maintain a detailed inventory of all licensed software installed on
|
|
39
|
+
enterprise assets. The software inventory must document the title, publisher, initial
|
|
40
|
+
install/use date, and business purpose for each entry; where appropriate, include
|
|
41
|
+
the Uniform Resource Locator (URL), app store(s), version(s), deployment
|
|
42
|
+
mechanism, and decommission date. Review and update the software inventory bi-
|
|
43
|
+
annually, or more frequently.
|
|
44
|
+
implementation_groups:
|
|
45
|
+
- IG1
|
|
46
|
+
- IG2
|
|
47
|
+
- IG3
|
|
48
|
+
- id: 2.2
|
|
49
|
+
version: 8
|
|
50
|
+
name: Ensure Authorized Software is Currently Supported
|
|
51
|
+
description: >-
|
|
52
|
+
Ensure that only currently supported software is designated as authorized in the
|
|
53
|
+
software inventory for enterprise assets. If software is unsupported, yet necessary
|
|
54
|
+
for the fulfillment of the enterprise's mission, document an exception detailing
|
|
55
|
+
mitigating controls and residual risk acceptance. For any unsupported software
|
|
56
|
+
without an exception documentation, designate as unauthorized. Review the
|
|
57
|
+
software list to verify software support at least monthly, or more frequently.
|
|
58
|
+
implementation_groups:
|
|
59
|
+
- IG1
|
|
60
|
+
- IG2
|
|
61
|
+
- IG3
|
|
62
|
+
- id: 2.1
|
|
63
|
+
version: 7
|
|
64
|
+
name: Maintain Inventory of Authorized Software
|
|
65
|
+
description: >-
|
|
66
|
+
Maintain an up-to-date list of all authorized software that is required in the
|
|
67
|
+
enterprise for any business purpose on any business system.
|
|
68
|
+
implementation_groups:
|
|
69
|
+
- IG1
|
|
70
|
+
- IG2
|
|
71
|
+
- IG3
|
|
72
|
+
- id: 2.2
|
|
73
|
+
version: 7
|
|
74
|
+
name: Ensure Software is Supported by Vendor
|
|
75
|
+
description: >-
|
|
76
|
+
Ensure that only software applications or operating systems currently supported
|
|
77
|
+
by the software's vendor are added to the organization's authorized software
|
|
78
|
+
inventory. Unsupported software should be tagged as unsupported in the inventory
|
|
79
|
+
system.
|
|
80
|
+
implementation_groups:
|
|
81
|
+
- IG1
|
|
82
|
+
- IG2
|
|
83
|
+
- IG3
|
|
84
|
+
additional_info: >-
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 3.1.4
|
|
3
|
+
name: monitor_dependencies
|
|
4
|
+
title: Ensure dependencies are monitored between open-source components
|
|
5
|
+
profile: 1
|
|
6
|
+
category: dependencies
|
|
7
|
+
sub_category: third_party_packages
|
|
8
|
+
description: >-
|
|
9
|
+
Monitor, or ask software suppliers to monitor, dependencies between open-source components in use.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Monitoring dependencies between open-source components helps to detect if software
|
|
12
|
+
has fallen victim to attack on a common open-source component. Swift detection can
|
|
13
|
+
aid in quick application of a fix. It also helps find potential compliance problems with
|
|
14
|
+
components usage. Some dependencies might not be compatible with the
|
|
15
|
+
organization's policies, and other dependencies might have a license that is not
|
|
16
|
+
compatible with how the organization uses this specific dependency. If dependencies
|
|
17
|
+
are monitored, such situations can be detected and mitigated sooner, potentially
|
|
18
|
+
deterring malicious attacks.
|
|
19
|
+
impact: >-
|
|
20
|
+
audit: |
|
|
21
|
+
For each project, ensure that dependency scanning and container scanning are enabled in order to monitor dependencies.
|
|
22
|
+
1. On GitLab, navigate to the main page of the repository.
|
|
23
|
+
2. Review the CI pipeline configuration to verify that Dependency Scanning and that Container Scanning have been configured to run on this project.
|
|
24
|
+
remediation: |
|
|
25
|
+
For every repository that is in use, set a dependency scanning and container scanning tools to detect, prevent, and monitor vulnerabilities in project packages and container images by performing the following:
|
|
26
|
+
1. On GitLab, navigate to the main page of the repository.
|
|
27
|
+
2. Configure Dependency Scanning and Container Scanning to run on this project
|
|
28
|
+
default_value:
|
|
29
|
+
references:
|
|
30
|
+
- https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#configuration
|
|
31
|
+
- https://docs.gitlab.com/ee/user/application_security/container_scanning/#configuration
|
|
32
|
+
cis_controls:
|
|
33
|
+
- id: 2.4
|
|
34
|
+
version: 8
|
|
35
|
+
name: Utilize Automated Software Inventory Tools
|
|
36
|
+
description: >-
|
|
37
|
+
Utilize software inventory tools, when possible, throughout the enterprise to
|
|
38
|
+
automate the discovery and documentation of installed software.
|
|
39
|
+
implementation_groups:
|
|
40
|
+
- IG2
|
|
41
|
+
- IG3
|
|
42
|
+
- id: 2.3
|
|
43
|
+
version: 7
|
|
44
|
+
name: Utilize Software Inventory Tools
|
|
45
|
+
description: >-
|
|
46
|
+
Utilize software inventory tools throughout the organization to automate the
|
|
47
|
+
documentation of all software on business systems.
|
|
48
|
+
implementation_groups:
|
|
49
|
+
- IG2
|
|
50
|
+
- IG3
|
|
51
|
+
- id: 2.4
|
|
52
|
+
version: 7
|
|
53
|
+
name: Track Software Inventory Information
|
|
54
|
+
description: >-
|
|
55
|
+
The software inventory system should track the name, version, publisher, and
|
|
56
|
+
install date for all software, including operating systems authorized by the
|
|
57
|
+
organization.
|
|
58
|
+
implementation_groups:
|
|
59
|
+
- IG2
|
|
60
|
+
- IG3
|
|
61
|
+
additional_info: >-
|
gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/packages_over_60_days_old.yml
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 3.1.8
|
|
3
|
+
name: packages_over_60_days_old
|
|
4
|
+
title: Ensure all packages used are more than 60 days old
|
|
5
|
+
profile: 2
|
|
6
|
+
category: dependencies
|
|
7
|
+
sub_category: third_party_packages
|
|
8
|
+
description: >-
|
|
9
|
+
Use packages that are more than 60 days old.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Third-party packages are a major risk since an organization cannot control their source
|
|
12
|
+
code, and there is always the possibility these packages could be malicious. It is
|
|
13
|
+
therefore good practice to remain cautious with any third-party or open-source package,
|
|
14
|
+
especially new ones, until they can be verified that they are safe to use. Avoiding a new
|
|
15
|
+
package allows the organization to fully examine it, its maintainer, and its behavior, and
|
|
16
|
+
gives enough time to determine whether or not to use it.
|
|
17
|
+
impact: >-
|
|
18
|
+
Developers may not use packages that are less than 60 days old.
|
|
19
|
+
audit: >-
|
|
20
|
+
For every package used, ensure it is more than 60 days old.
|
|
21
|
+
remediation: >-
|
|
22
|
+
If a package used is less than 60 days old, stop using it and find another solution.
|
|
23
|
+
default_value:
|
|
24
|
+
references:
|
|
25
|
+
cis_controls:
|
|
26
|
+
- id: 2.5
|
|
27
|
+
version: 8
|
|
28
|
+
name: Allowlist Authorized Software
|
|
29
|
+
description: >-
|
|
30
|
+
Use technical controls, such as application allowlisting, to ensure that only
|
|
31
|
+
authorized software can execute or be accessed. Reassess bi-annually, or more
|
|
32
|
+
frequently.
|
|
33
|
+
implementation_groups:
|
|
34
|
+
- IG2
|
|
35
|
+
- IG3
|
|
36
|
+
- id: 2.6
|
|
37
|
+
version: 8
|
|
38
|
+
name: Allowlist Authorized Libraries
|
|
39
|
+
description: >-
|
|
40
|
+
Use technical controls to ensure that only authorized software libraries, such as
|
|
41
|
+
specific .dll, .ocx, .so, etc., files, are allowed to load into a system process. Block
|
|
42
|
+
unauthorized libraries from loading into a system process. Reassess bi-annually,
|
|
43
|
+
or more frequently.
|
|
44
|
+
implementation_groups:
|
|
45
|
+
- IG2
|
|
46
|
+
- IG3
|
|
47
|
+
- id: 2.7
|
|
48
|
+
version: 8
|
|
49
|
+
name: Allowlist Authorized Scripts
|
|
50
|
+
description: >-
|
|
51
|
+
Use technical controls, such as digital signatures and version control, to ensure
|
|
52
|
+
that only authorized scripts, such as specific .ps1, .py, etc., files, are allowed to
|
|
53
|
+
execute. Block unauthorized scripts from executing. Reassess bi-annually, or more
|
|
54
|
+
frequently.
|
|
55
|
+
implementation_groups:
|
|
56
|
+
- IG3
|
|
57
|
+
- id: 16.5
|
|
58
|
+
version: 8
|
|
59
|
+
name: Use Up-to-Date and Trusted Third-Party Software Components
|
|
60
|
+
description: >-
|
|
61
|
+
Use up-to-date and trusted third-party software components. When possible,
|
|
62
|
+
choose established and proven frameworks and libraries that provide adequate
|
|
63
|
+
security. Acquire these components from trusted sources or evaluate the software
|
|
64
|
+
for vulnerabilities before use.
|
|
65
|
+
implementation_groups:
|
|
66
|
+
- IG2
|
|
67
|
+
- IG3
|
|
68
|
+
- id: 2.7
|
|
69
|
+
version: 7
|
|
70
|
+
name: Utilize Application Whitelisting
|
|
71
|
+
description: >-
|
|
72
|
+
Utilize application whitelisting technology on all assets to ensure that only
|
|
73
|
+
authorized software executes and all unauthorized software is blocked from
|
|
74
|
+
executing on assets.
|
|
75
|
+
implementation_groups:
|
|
76
|
+
- IG3
|
|
77
|
+
- id: 2.8
|
|
78
|
+
version: 7
|
|
79
|
+
name: Implement Application Whitelisting of Libraries
|
|
80
|
+
description: >-
|
|
81
|
+
The organization's application whitelisting software must ensure that only
|
|
82
|
+
authorized software libraries (such as *.dll, *.ocx, *.so, etc) are allowed to load into
|
|
83
|
+
a system process.
|
|
84
|
+
implementation_groups:
|
|
85
|
+
- IG3
|
|
86
|
+
- id: 2.9
|
|
87
|
+
version: 7
|
|
88
|
+
name: Implement Application Whitelisting of Scripts
|
|
89
|
+
description: >-
|
|
90
|
+
The organization's application whitelisting software must ensure that only
|
|
91
|
+
authorized, digitally signed scripts (such as *.ps1, *.py, macros, etc) are allowed to
|
|
92
|
+
run on a system.
|
|
93
|
+
implementation_groups:
|
|
94
|
+
- IG3
|
|
95
|
+
additional_info: >-
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 3.1.7
|
|
3
|
+
name: pin_dependency_version
|
|
4
|
+
title: Ensure dependencies are pinned to a specific, verified version
|
|
5
|
+
profile: 1
|
|
6
|
+
category: dependencies
|
|
7
|
+
sub_category: third_party_packages
|
|
8
|
+
description: >-
|
|
9
|
+
Pin dependencies to a specific version. Avoid using the "latest" tag or broad version.
|
|
10
|
+
rationale: >-
|
|
11
|
+
When using a wildcard version of a package, or the "latest" tag, the risk of encountering
|
|
12
|
+
a new, potentially malicious package increases. The "latest" tag pulls the last package
|
|
13
|
+
pushed to the registry. This means that if an attacker pushes a new, malicious package
|
|
14
|
+
successfully to the registry, the next user who pulls the "latest" will pull it and risk attack.
|
|
15
|
+
This same rule applies to a wildcard version - assuming one is using version v1.*, it will
|
|
16
|
+
install the latest version of the major version 1, meaning that if an attacker can push a
|
|
17
|
+
malicious package with that same version, those using it will be subject to possible
|
|
18
|
+
attack. By using a secure, verified version, use is restricted to this version only and no
|
|
19
|
+
other may be pulled, decreasing the risk for any malicious package.
|
|
20
|
+
impact: >-
|
|
21
|
+
audit: >-
|
|
22
|
+
For every dependency in use, ensure it is pinned to a specific version.
|
|
23
|
+
remediation: >-
|
|
24
|
+
For every dependency in use, pin to a specific version.
|
|
25
|
+
default_value:
|
|
26
|
+
references:
|
|
27
|
+
cis_controls:
|
|
28
|
+
- id: 16.5
|
|
29
|
+
version: 8
|
|
30
|
+
name: Use Up-to-Date and Trusted Third-Party Software Components
|
|
31
|
+
description: >-
|
|
32
|
+
Use up-to-date and trusted third-party software components. When possible,
|
|
33
|
+
choose established and proven frameworks and libraries that provide adequate
|
|
34
|
+
security. Acquire these components from trusted sources or evaluate the software
|
|
35
|
+
for vulnerabilities before use.
|
|
36
|
+
implementation_groups:
|
|
37
|
+
- IG2
|
|
38
|
+
- IG3
|
|
39
|
+
- id: 18.4
|
|
40
|
+
version: 7
|
|
41
|
+
name: Only Use Up-to-date And Trusted Third-Party Components
|
|
42
|
+
description: >-
|
|
43
|
+
Only use up-to-date and trusted third-party components for the software
|
|
44
|
+
developed by the organization.
|
|
45
|
+
implementation_groups:
|
|
46
|
+
- IG2
|
|
47
|
+
- IG3
|
|
48
|
+
additional_info: >-
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 3.1 Third-Party Packages
|
|
2
|
+
|
|
3
|
+
This section consists of security recommendations for the use and management of third-party dependencies and packages. As a consumer of various third-party packages, you need to ensure certain conditions exist to trust them and use them safely. Using third-party packages affects not only the software, but also its costumers, so it is important to carefully examine each one of these packages.
|
|
4
|
+
|
|
5
|
+
## Recommendations
|
|
6
|
+
|
|
7
|
+
* [3.1.1 - verify_artifacts.yml](./verify_artifacts.yml)
|
|
8
|
+
* [3.1.2 - third_party_sbom_required.yml](./third_party_sbom_required.yml)
|
|
9
|
+
* [3.1.3 - verify_signed_metadata.yml](./verify_signed_metadata.yml)
|
|
10
|
+
* [3.1.4 - monitor_dependencies.yml](./monitor_dependencies.yml)
|
|
11
|
+
* [3.1.5 - define_package_managers.yml](./define_package_managers.yml)
|
|
12
|
+
* [3.1.6 - dependency_sbom.yml](./dependency_sbom.yml)
|
|
13
|
+
* [3.1.7 - pin_dependency_version.yml](./pin_dependency_version.yml)
|
|
14
|
+
* [3.1.8 - packages_over_60_days_old.yml](./packages_over_60_days_old.yml)
|
gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/third_party_sbom_required.yml
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 3.1.2
|
|
3
|
+
name: third_party_sbom_required
|
|
4
|
+
title: Ensure Software Bill of Materials (SBOM) is required from all third-party suppliers
|
|
5
|
+
profile: 1
|
|
6
|
+
category: dependencies
|
|
7
|
+
sub_category: third_party_packages
|
|
8
|
+
description: >-
|
|
9
|
+
A Software Bill Of Materials (SBOM) is a file that specifies each component of software
|
|
10
|
+
or a build process. Require an SBOM from every third-party provider.
|
|
11
|
+
rationale: >-
|
|
12
|
+
A Software Bill of Materials (SBOM) for every third-party artifact helps to ensure an
|
|
13
|
+
artifact is safe to use and fully compliant. This file lists all important metadata, especially
|
|
14
|
+
all the dependencies of an artifact, and allows for verification of each dependency. If
|
|
15
|
+
one of the dependencies/artifacts are attacked or has a new vulnerability (for example,
|
|
16
|
+
the "SolarWinds" or even "log4j" attacks), it is easier to detect what has been affected
|
|
17
|
+
by this incident because dependencies in use are listed in the SBOM file.
|
|
18
|
+
impact: >-
|
|
19
|
+
audit: >-
|
|
20
|
+
For every third-party dependency in use, ensure it has a Software Bill of Materials.
|
|
21
|
+
remediation: >-
|
|
22
|
+
For every third-party dependency in use, require a Software Bill of Materials from its supplier.
|
|
23
|
+
default_value:
|
|
24
|
+
references:
|
|
25
|
+
cis_controls:
|
|
26
|
+
- id: 2.1
|
|
27
|
+
version: 8
|
|
28
|
+
name: Establish and Maintain a Software Inventory
|
|
29
|
+
description: >-
|
|
30
|
+
Establish and maintain a detailed inventory of all licensed software installed on
|
|
31
|
+
enterprise assets. The software inventory must document the title, publisher, initial
|
|
32
|
+
install/use date, and business purpose for each entry; where appropriate, include
|
|
33
|
+
the Uniform Resource Locator (URL), app store(s), version(s), deployment
|
|
34
|
+
mechanism, and decommission date. Review and update the software inventory bi-
|
|
35
|
+
annually, or more frequently.
|
|
36
|
+
implementation_groups:
|
|
37
|
+
- IG1
|
|
38
|
+
- IG2
|
|
39
|
+
- IG3
|
|
40
|
+
- id: 16.5
|
|
41
|
+
version: 8
|
|
42
|
+
name: Use Up-to-Date and Trusted Third-Party Software Components
|
|
43
|
+
description: >-
|
|
44
|
+
Use up-to-date and trusted third-party software components. When possible,
|
|
45
|
+
choose established and proven frameworks and libraries that provide adequate
|
|
46
|
+
security. Acquire these components from trusted sources or evaluate the software
|
|
47
|
+
for vulnerabilities before use.
|
|
48
|
+
implementation_groups:
|
|
49
|
+
- IG2
|
|
50
|
+
- IG3
|
|
51
|
+
- id: 2.4
|
|
52
|
+
version: 7
|
|
53
|
+
name: Track Software Inventory Information
|
|
54
|
+
description: >-
|
|
55
|
+
The software inventory system should track the name, version, publisher, and
|
|
56
|
+
install date for all software, including operating systems authorized by the
|
|
57
|
+
organization.
|
|
58
|
+
implementation_groups:
|
|
59
|
+
- IG2
|
|
60
|
+
- IG3
|
|
61
|
+
- id: 18.4
|
|
62
|
+
version: 7
|
|
63
|
+
name: Only Use Up-to-date And Trusted Third-Party Components
|
|
64
|
+
description: >-
|
|
65
|
+
Only use up-to-date and trusted third-party components for the software
|
|
66
|
+
developed by the organization.
|
|
67
|
+
implementation_groups:
|
|
68
|
+
- IG2
|
|
69
|
+
- IG3
|
|
70
|
+
additional_info: >-
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 3.1.1
|
|
3
|
+
name: verify_artifacts
|
|
4
|
+
title: Ensure third-party artifacts and open-source libraries are verified
|
|
5
|
+
profile: 1
|
|
6
|
+
category: dependencies
|
|
7
|
+
sub_category: third_party_packages
|
|
8
|
+
description: >-
|
|
9
|
+
Ensure third-party artifacts and open-source libraries in use are trusted and verified.
|
|
10
|
+
rationale: >-
|
|
11
|
+
Verify third-party artifacts used in code are trusted and have not been infected by a
|
|
12
|
+
malicious actor before use. This can be accomplished, for example, by comparing the
|
|
13
|
+
checksum of the dependency to its checksum in a trusted source. If a difference arises,
|
|
14
|
+
this may be a sign that someone interfered and added malicious code. If this
|
|
15
|
+
dependency is used, it will infect the environment and could end in a massive breach,
|
|
16
|
+
leaving the organization exposed to data leaks and more.
|
|
17
|
+
impact: >-
|
|
18
|
+
audit: >-
|
|
19
|
+
Ensure third-party artifacts and open-source libraries are verified.
|
|
20
|
+
remediation: >-
|
|
21
|
+
Set third-party artifacts and open-source libraries to be verified.
|
|
22
|
+
default_value:
|
|
23
|
+
references:
|
|
24
|
+
cis_controls:
|
|
25
|
+
- id: 16.5
|
|
26
|
+
version: 8
|
|
27
|
+
name: Use Up-to-Date and Trusted Third-Party Software Components
|
|
28
|
+
description: >-
|
|
29
|
+
Use up-to-date and trusted third-party software components. When possible,
|
|
30
|
+
choose established and proven frameworks and libraries that provide adequate
|
|
31
|
+
security. Acquire these components from trusted sources or evaluate the software
|
|
32
|
+
for vulnerabilities before use.
|
|
33
|
+
implementation_groups:
|
|
34
|
+
- IG2
|
|
35
|
+
- IG3
|
|
36
|
+
- id: 18.4
|
|
37
|
+
version: 7
|
|
38
|
+
name: Only Use Up-to-date And Trusted Third-Party Components
|
|
39
|
+
description: >-
|
|
40
|
+
Only use up-to-date and trusted third-party components for the software
|
|
41
|
+
developed by the organization.
|
|
42
|
+
implementation_groups:
|
|
43
|
+
- IG2
|
|
44
|
+
- IG3
|
|
45
|
+
additional_info: >-
|