gitlabcis 1.3.2__tar.gz
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-1.3.2/.commitlintrc +10 -0
- gitlabcis-1.3.2/.gitignore +67 -0
- gitlabcis-1.3.2/.gitlab/.gitlab-ci.yml +247 -0
- gitlabcis-1.3.2/.gitlab/CODEOWNERS +5 -0
- gitlabcis-1.3.2/.gitlab/issue_templates/bug.md +14 -0
- gitlabcis-1.3.2/.gitlab/issue_templates/feature.md +11 -0
- gitlabcis-1.3.2/.gitlab/issue_templates/vuln.md +29 -0
- gitlabcis-1.3.2/.gitlab/merge_request_templates/default.md +91 -0
- gitlabcis-1.3.2/.markdownlint.yaml +16 -0
- gitlabcis-1.3.2/.markdownlintignore +4 -0
- gitlabcis-1.3.2/.pre-commit-config.yaml +37 -0
- gitlabcis-1.3.2/.pypirc +14 -0
- gitlabcis-1.3.2/.yamllint.yml +6 -0
- gitlabcis-1.3.2/CHANGELOG.md +687 -0
- gitlabcis-1.3.2/LICENSE +21 -0
- gitlabcis-1.3.2/MANIFEST.in +1 -0
- gitlabcis-1.3.2/Makefile +28 -0
- gitlabcis-1.3.2/PKG-INFO +241 -0
- gitlabcis-1.3.2/README.md +161 -0
- gitlabcis-1.3.2/docs/CONTRIBUTING.md +95 -0
- gitlabcis-1.3.2/docs/SECURITY.md +27 -0
- gitlabcis-1.3.2/docs/img/results.png +0 -0
- gitlabcis-1.3.2/docs/limitations.md +95 -0
- gitlabcis-1.3.2/docs/readme.md +483 -0
- gitlabcis-1.3.2/gitlabcis/__init__.py +12 -0
- gitlabcis-1.3.2/gitlabcis/__main__.py +7 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/__init__.py +8 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/artifacts_4/__init__.py +4 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/artifacts_4/access_to_artifacts_4_2.py +139 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/artifacts_4/origin_traceability_4_4.py +11 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/artifacts_4/package_registries_4_3.py +105 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/artifacts_4/verification_4_1.py +83 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/build_pipelines_2/__init__.py +4 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/build_pipelines_2/build_environment_2_1.py +268 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/build_pipelines_2/build_worker_2_2.py +129 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/build_pipelines_2/pipeline_instructions_2_3.py +444 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/build_pipelines_2/pipeline_integrity_2_4.py +146 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/dependencies_3/__init__.py +2 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/dependencies_3/third_party_packages_3_1.py +171 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/dependencies_3/validate_packages_3_2.py +182 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/deployment_5/__init__.py +2 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/deployment_5/deployment_configuration_5_1.py +165 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/deployment_5/deployment_environment_5_2.py +66 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/source_code_1/__init__.py +6 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/source_code_1/code_changes_1_1.py +665 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/source_code_1/code_risks_1_5.py +506 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/source_code_1/contribution_access_1_3.py +334 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/source_code_1/repository_management_1_2.py +168 -0
- gitlabcis-1.3.2/gitlabcis/benchmarks/source_code_1/third_party_1_4.py +139 -0
- gitlabcis-1.3.2/gitlabcis/cli/__init__.py +0 -0
- gitlabcis-1.3.2/gitlabcis/cli/log.py +30 -0
- gitlabcis-1.3.2/gitlabcis/cli/main.py +541 -0
- gitlabcis-1.3.2/gitlabcis/cli/output.py +151 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/external_auth_server.yml +51 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/limit_artifact_uploaders.yml +57 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/limit_certifying_artifacts.yml +53 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/minimum_package_registry_admins.yml +54 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/readme.md +14 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/require_mfa_to_package_registry.yml +52 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/access_to_artifacts_4_2/restrict_anonymous_access.yml +67 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/origin_traceability_4_4/artifact_origin_info.yml +56 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/origin_traceability_4_4/readme.md +7 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/package_registries_4_3/all_artifact_versions_signed.yml +70 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/package_registries_4_3/audit_package_registry_config.yml +46 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/package_registries_4_3/readme.md +12 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/package_registries_4_3/secure_repo_webhooks.yml +50 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/package_registries_4_3/validate_signed_artifacts_on_upload.yml +72 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/readme.md +12 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/verification_4_1/encrypt_artifacts_before_distribution.yml +47 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/verification_4_1/only_authorized_platforms_can_decrypt_artifacts.yml +59 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/verification_4_1/readme.md +11 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/artifacts_4/verification_4_1/sign_artifacts_in_build_pipeline.yml +40 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/authenticate_build_access.yml +55 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/build_automation.yml +54 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/build_env_admins.yml +55 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/build_logging.yml +49 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/disable_build_tools_default_passwords.yml +54 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/immutable_pipeline_infrastructure.yml +60 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/limit_build_access.yml +64 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/limit_build_secrets_scope.yml +56 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/readme.md +19 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/secure_build_env_webhooks.yml +43 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/single_responsibility_pipeline.yml +58 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_environment_2_1/vuln_scanning.yml +64 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/build_worker_vuln_scanning.yml +58 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/monitor_worker_resource_consumption.yml +59 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/pass_worker_envs_and_commands.yml +48 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/readme.md +16 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/restrict_worker_connectivity.yml +61 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/segregate_worker_duties.yml +78 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/single_use_workers.yml +47 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/store_worker_config.yml +62 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/build_worker_2_2/worker_runtime_security.yml +37 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/build_stage_io.yml +49 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/build_steps_as_code.yml +42 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/limit_pipeline_triggers.yml +76 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/pipeline_misconfiguration_scanning.yml +48 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/pipeline_secret_scanning.yml +56 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/pipeline_vuln_scanning.yml +44 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/readme.md +16 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/secure_pipeline_output.yml +52 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_instructions_2_3/track_pipeline_files.yml +48 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/create_reproducible_artifacts.yml +52 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/lock_dependencies.yml +59 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/pipeline_produces_sbom.yml +81 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/pipeline_signs_sbom.yml +38 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/readme.md +14 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/sign_artifacts.yml +35 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/pipeline_integrity_2_4/validate_dependencies.yml +63 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/build_pipelines_2/readme.md +12 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/readme.md +10 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/define_package_managers.yml +84 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/dependency_sbom.yml +84 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/monitor_dependencies.yml +61 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/packages_over_60_days_old.yml +95 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/pin_dependency_version.yml +48 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/readme.md +14 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/third_party_sbom_required.yml +70 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/verify_artifacts.yml +45 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/third_party_packages_3_1/verify_signed_metadata.yml +41 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/validate_packages_3_2/org_wide_dependency_policy.yml +47 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/validate_packages_3_2/package_license_scanning.yml +47 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/validate_packages_3_2/package_ownership_change.yml +42 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/validate_packages_3_2/package_vuln_scanning.yml +62 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/dependencies_3/validate_packages_3_2/readme.md +10 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/audit_deployment_config.yml +46 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/limit_deployment_config_access.yml +51 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/pin_deployment_config_manifests.yml +59 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/readme.md +13 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/scan_iac.yml +72 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/secret_scan_deployment_config.yml +45 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/separate_deployment_config.yml +50 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_configuration_5_1/verify_deployment_config.yml +49 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_environment_5_2/automate_deployment.yml +47 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_environment_5_2/disable_default_passwords.yml +63 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_environment_5_2/limit_prod_access.yml +45 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_environment_5_2/readme.md +12 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/deployment_environment_5_2/reproducible_deployment.yml +50 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/deployment_5/readme.md +10 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/readme.md +24 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/audit_branch_protections.yml +56 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/auto_risk_scan_merges.yml +62 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/branch_protections_for_admins.yml +60 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/branches_updated_before_merging.yml +56 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/checks_pass_before_merging.yml +57 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/code_approval_dismissals.yml +62 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/code_approvals.yml +65 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/code_changes_require_code_owners.yml +68 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/code_dismissal_restrictions.yml +69 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/code_owners.yml +61 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/code_tracing.yml +52 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/comments_resolved_before_merging.yml +59 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/commits_must_be_signed_before_merging.yml +63 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/default_branch_protected.yml +85 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/deny_branch_deletions.yml +76 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/ensure_force_push_is_denied.yml +59 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/linear_history_required.yml +56 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/merging_restrictions.yml +65 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/readme.md +26 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/stale_branch_reviews.yml +72 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_changes_1_1/version_control.yml +45 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_risks_1_5/dast_api_scanning.yml +50 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_risks_1_5/dast_web_scanning.yml +51 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_risks_1_5/dependency_scanning.yml +84 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_risks_1_5/enable_secret_detection.yml +45 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_risks_1_5/license_scanning.yml +47 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_risks_1_5/readme.md +14 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_risks_1_5/secure_iac_instructions.yml +81 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_risks_1_5/secure_pipeline_instructions.yml +62 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/code_risks_1_5/vulnerability_scanning.yml +48 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/domain_verification.yml +65 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/ensure_2_admins_per_repo.yml +56 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/limit_top_level_group_creation.yml +61 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/limit_user_registration_domain.yml +58 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/minimum_number_of_admins.yml +56 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/org_provided_ssh_certs.yml +70 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/readme.md +21 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/require_mfa_at_org_level.yml +89 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/require_mfa_for_contributors.yml +76 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/restrict_ip_addresses.yml +84 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/review_and_remove_inactive_users.yml +62 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/scm_notification_restriction.yml +46 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/strict_permissions_for_repo.yml +62 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/contribution_access_1_3/track_code_anomalies.yml +43 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/readme.md +13 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/repository_management_1_2/limit_issue_deletions.yml +57 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/repository_management_1_2/limit_repo_creations.yml +64 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/repository_management_1_2/limit_repo_deletions.yml +57 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/repository_management_1_2/public_repos_have_security_file.yml +59 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/repository_management_1_2/readme.md +15 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/repository_management_1_2/review_and_archive_stale_repos.yml +65 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/repository_management_1_2/track_forks.yml +74 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/repository_management_1_2/track_project_visibility_status.yml +74 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/third_party_1_4/README.md +12 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/third_party_1_4/admin_approval_for_app_installs.yml +83 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/third_party_1_4/least_privilge_app_permissions.yml +103 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/third_party_1_4/secure_webhooks.yml +73 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/source_code_1/third_party_1_4/stale_app_reviews.yml +66 -0
- gitlabcis-1.3.2/gitlabcis/recommendations/template.yml +30 -0
- gitlabcis-1.3.2/gitlabcis/tests/__init__.py +0 -0
- gitlabcis-1.3.2/gitlabcis/tests/input/__init__.py +0 -0
- gitlabcis-1.3.2/gitlabcis/tests/input/conftest.py +29 -0
- gitlabcis-1.3.2/gitlabcis/tests/input/no_input_test.py +82 -0
- gitlabcis-1.3.2/gitlabcis/tests/input/switch_test.py +19 -0
- gitlabcis-1.3.2/gitlabcis/tests/input/version_test.py +7 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/__init__.py +0 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/artifacts_4/access_to_artifacts_4_2_test.py +131 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/artifacts_4/origin_traceability_4_4_test.py +15 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/artifacts_4/package_registries_4_3_test.py +102 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/artifacts_4/verification_4_1_test.py +78 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/build_pipelines_2/build_environment_2_1_test.py +239 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/build_pipelines_2/build_worker_2_2_test.py +105 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/build_pipelines_2/pipeline_instructions_2_3_test.py +340 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/build_pipelines_2/pipeline_integrity_2_4_test.py +115 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/conftest.py +47 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/dependencies_3/third_party_packages_3_1_test.py +135 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/dependencies_3/validate_packages_3_2_test.py +171 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/deployment_5/deployment_configuration_5_1_test.py +140 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/deployment_5/deployment_environment_5_2_test.py +60 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/function_test.py +24 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/source_code_1/code_changes_1_1_test.py +565 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/source_code_1/code_risks_1_5_test.py +419 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/source_code_1/contribution_access_1_3_test.py +265 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/source_code_1/repository_management_1_2_test.py +142 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/benchmarks/source_code_1/third_party_1_4_test.py +119 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/conftest.py +94 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/log/log_test.py +23 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/utils/argfilters_test.py +9 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/utils/ci_test.py +156 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/utils/output_test.py +95 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/utils/utils_general_test.py +149 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/utils/version_test.py +11 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/yaml/bad_file_test.py +15 -0
- gitlabcis-1.3.2/gitlabcis/tests/unit/yaml/recommendation_test.py +123 -0
- gitlabcis-1.3.2/gitlabcis/utils/__init__.py +146 -0
- gitlabcis-1.3.2/gitlabcis/utils/ci.py +132 -0
- gitlabcis-1.3.2/gitlabcis.egg-info/PKG-INFO +241 -0
- gitlabcis-1.3.2/gitlabcis.egg-info/SOURCES.txt +243 -0
- gitlabcis-1.3.2/gitlabcis.egg-info/dependency_links.txt +1 -0
- gitlabcis-1.3.2/gitlabcis.egg-info/entry_points.txt +2 -0
- gitlabcis-1.3.2/gitlabcis.egg-info/requires.txt +25 -0
- gitlabcis-1.3.2/gitlabcis.egg-info/top_level.txt +1 -0
- gitlabcis-1.3.2/pyproject.toml +213 -0
- gitlabcis-1.3.2/requirements.txt +7 -0
- gitlabcis-1.3.2/setup.cfg +4 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["@commitlint/config-angular"],
|
|
3
|
+
"rules": {
|
|
4
|
+
"type-enum": [2, "always", [
|
|
5
|
+
"build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "style", "test"
|
|
6
|
+
]],
|
|
7
|
+
"subject-case": [2, "never", ["start-case", "pascal-case", "upper-case"]],
|
|
8
|
+
"header-max-length": [2, "always", 72]
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Files that might appear in the root of a volume
|
|
2
|
+
.DocumentRevisions-V100
|
|
3
|
+
.fseventsd
|
|
4
|
+
.Spotlight-V100
|
|
5
|
+
.TemporaryItems
|
|
6
|
+
.Trashes
|
|
7
|
+
.VolumeIcon.icns
|
|
8
|
+
.com.apple.timemachine.donotpresent
|
|
9
|
+
|
|
10
|
+
# Directories potentially created on remote AFP share
|
|
11
|
+
.AppleDB
|
|
12
|
+
.AppleDesktop
|
|
13
|
+
Network Trash Folder
|
|
14
|
+
Temporary Items
|
|
15
|
+
.apdisk
|
|
16
|
+
|
|
17
|
+
# Apple stuff
|
|
18
|
+
.DS_Store
|
|
19
|
+
.AppleDouble
|
|
20
|
+
.LSOverride
|
|
21
|
+
|
|
22
|
+
# Environments
|
|
23
|
+
.env
|
|
24
|
+
.venv
|
|
25
|
+
env/
|
|
26
|
+
venv/
|
|
27
|
+
ENV/
|
|
28
|
+
env.bak/
|
|
29
|
+
venv.bak/
|
|
30
|
+
|
|
31
|
+
# Distribution / packaging
|
|
32
|
+
.Python
|
|
33
|
+
build/
|
|
34
|
+
develop-eggs/
|
|
35
|
+
dist/
|
|
36
|
+
downloads/
|
|
37
|
+
eggs/
|
|
38
|
+
.eggs/
|
|
39
|
+
lib/
|
|
40
|
+
lib64/
|
|
41
|
+
parts/
|
|
42
|
+
sdist/
|
|
43
|
+
var/
|
|
44
|
+
wheels/
|
|
45
|
+
share/python-wheels/
|
|
46
|
+
*.egg-info/
|
|
47
|
+
.installed.cfg
|
|
48
|
+
*.egg
|
|
49
|
+
|
|
50
|
+
# Byte-compiled / optimized / DLL files
|
|
51
|
+
__pycache__/
|
|
52
|
+
*.py[cod]
|
|
53
|
+
*$py.class
|
|
54
|
+
|
|
55
|
+
# Tests
|
|
56
|
+
.pytest_cache
|
|
57
|
+
coverage.xml
|
|
58
|
+
results.csv
|
|
59
|
+
results.json
|
|
60
|
+
results.txt
|
|
61
|
+
results.xml
|
|
62
|
+
results.yaml
|
|
63
|
+
htmlcov/*
|
|
64
|
+
.coverage
|
|
65
|
+
.coverage.*
|
|
66
|
+
.tox
|
|
67
|
+
pytestdebug.log
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# -----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
image: python:3.12
|
|
4
|
+
|
|
5
|
+
# -----------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
stages:
|
|
8
|
+
- lint
|
|
9
|
+
- test
|
|
10
|
+
- build
|
|
11
|
+
- compatibility
|
|
12
|
+
- release
|
|
13
|
+
|
|
14
|
+
# -----------------------------------------------------------------------------
|
|
15
|
+
# Security Scanning:
|
|
16
|
+
# -----------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
include:
|
|
19
|
+
# Sec templates:
|
|
20
|
+
- template: Security/SAST.gitlab-ci.yml
|
|
21
|
+
- template: Security/Dependency-Scanning.gitlab-ci.yml
|
|
22
|
+
- template: Security/Secret-Detection.gitlab-ci.yml
|
|
23
|
+
|
|
24
|
+
sast:
|
|
25
|
+
stage: test
|
|
26
|
+
interruptible: true
|
|
27
|
+
needs: []
|
|
28
|
+
|
|
29
|
+
bandit:
|
|
30
|
+
stage: test
|
|
31
|
+
interruptible: true
|
|
32
|
+
script:
|
|
33
|
+
- make install
|
|
34
|
+
- tox -e bandit
|
|
35
|
+
rules:
|
|
36
|
+
- when: always
|
|
37
|
+
|
|
38
|
+
# -----------------------------------------------------------------------------
|
|
39
|
+
# Linting tests:
|
|
40
|
+
# -----------------------------------------------------------------------------
|
|
41
|
+
|
|
42
|
+
commit:
|
|
43
|
+
stage: lint
|
|
44
|
+
image: node:latest
|
|
45
|
+
script:
|
|
46
|
+
- npm install -g @commitlint/cli @commitlint/config-angular
|
|
47
|
+
# get a copy of main
|
|
48
|
+
- git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
|
49
|
+
# ensure that the angular commit msg type is followed
|
|
50
|
+
- git log --pretty=format:%s $CI_MERGE_REQUEST_DIFF_BASE_SHA..$CI_COMMIT_SHA | commitlint --config .commitlintrc
|
|
51
|
+
only:
|
|
52
|
+
- merge_requests
|
|
53
|
+
|
|
54
|
+
docs:
|
|
55
|
+
stage: lint
|
|
56
|
+
image: node:latest
|
|
57
|
+
script:
|
|
58
|
+
- npm install -g markdownlint-cli
|
|
59
|
+
- markdownlint **/*.md
|
|
60
|
+
rules:
|
|
61
|
+
- when: always
|
|
62
|
+
|
|
63
|
+
codebase:flake8:
|
|
64
|
+
stage: lint
|
|
65
|
+
interruptible: true
|
|
66
|
+
script:
|
|
67
|
+
- make install
|
|
68
|
+
- tox -e flake8
|
|
69
|
+
rules:
|
|
70
|
+
- when: always
|
|
71
|
+
|
|
72
|
+
benchmarks:baseline:
|
|
73
|
+
stage: lint
|
|
74
|
+
interruptible: true
|
|
75
|
+
script:
|
|
76
|
+
- make install
|
|
77
|
+
- tox -e baseline
|
|
78
|
+
rules:
|
|
79
|
+
- when: always
|
|
80
|
+
|
|
81
|
+
benchmarks:yamllint:
|
|
82
|
+
stage: lint
|
|
83
|
+
interruptible: true
|
|
84
|
+
script:
|
|
85
|
+
- make install
|
|
86
|
+
- tox -e yamllint
|
|
87
|
+
rules:
|
|
88
|
+
- when: always
|
|
89
|
+
|
|
90
|
+
codebase:benchmarks:
|
|
91
|
+
stage: lint
|
|
92
|
+
interruptible: true
|
|
93
|
+
script:
|
|
94
|
+
- make install
|
|
95
|
+
- tox -e benchmarks
|
|
96
|
+
rules:
|
|
97
|
+
- when: always
|
|
98
|
+
|
|
99
|
+
# -----------------------------------------------------------------------------
|
|
100
|
+
# Build:
|
|
101
|
+
# -----------------------------------------------------------------------------
|
|
102
|
+
|
|
103
|
+
build:
|
|
104
|
+
stage: build
|
|
105
|
+
interruptible: true
|
|
106
|
+
variables:
|
|
107
|
+
COSIGN_YES: true
|
|
108
|
+
COSIGN_VERSION: 2.4.1
|
|
109
|
+
id_tokens:
|
|
110
|
+
SIGSTORE_ID_TOKEN:
|
|
111
|
+
aud: sigstore
|
|
112
|
+
before_script:
|
|
113
|
+
- apt-get install wget
|
|
114
|
+
- wget -q https://github.com/sigstore/cosign/releases/download/v$COSIGN_VERSION/cosign-linux-amd64 -O /usr/local/bin/cosign
|
|
115
|
+
- chmod +x /usr/local/bin/cosign
|
|
116
|
+
script:
|
|
117
|
+
- make clean
|
|
118
|
+
- make install
|
|
119
|
+
- make build
|
|
120
|
+
- cosign sign-blob dist/gitlabcis-*.tar.gz --bundle cosign.bundle --output-signature gitlabcis.sig
|
|
121
|
+
- twine check dist/*
|
|
122
|
+
rules:
|
|
123
|
+
- when: always
|
|
124
|
+
artifacts:
|
|
125
|
+
untracked: false
|
|
126
|
+
when: on_success
|
|
127
|
+
access: all
|
|
128
|
+
expire_in: 7 days
|
|
129
|
+
paths:
|
|
130
|
+
- dist/*
|
|
131
|
+
- cosign.bundle
|
|
132
|
+
- gitlabcis.sig
|
|
133
|
+
|
|
134
|
+
# -----------------------------------------------------------------------------
|
|
135
|
+
# Code coverage:
|
|
136
|
+
# -----------------------------------------------------------------------------
|
|
137
|
+
|
|
138
|
+
coverage:
|
|
139
|
+
stage: test
|
|
140
|
+
interruptible: true
|
|
141
|
+
script:
|
|
142
|
+
- make install
|
|
143
|
+
- tox -e cover
|
|
144
|
+
coverage: '/TOTAL.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
|
|
145
|
+
rules:
|
|
146
|
+
- when: always
|
|
147
|
+
|
|
148
|
+
# -----------------------------------------------------------------------------
|
|
149
|
+
# Compatibility tests:
|
|
150
|
+
# -----------------------------------------------------------------------------
|
|
151
|
+
|
|
152
|
+
python:3.13:
|
|
153
|
+
stage: compatibility
|
|
154
|
+
image: python:3.13
|
|
155
|
+
script:
|
|
156
|
+
- make install
|
|
157
|
+
- tox -e py313
|
|
158
|
+
rules:
|
|
159
|
+
- when: always
|
|
160
|
+
|
|
161
|
+
python:3.12:
|
|
162
|
+
stage: compatibility
|
|
163
|
+
image: python:3.12
|
|
164
|
+
script:
|
|
165
|
+
- make install
|
|
166
|
+
- tox -e py312
|
|
167
|
+
rules:
|
|
168
|
+
- when: always
|
|
169
|
+
|
|
170
|
+
python:3.11:
|
|
171
|
+
stage: compatibility
|
|
172
|
+
image: python:3.11
|
|
173
|
+
script:
|
|
174
|
+
- make install
|
|
175
|
+
- tox -e py311
|
|
176
|
+
rules:
|
|
177
|
+
- when: always
|
|
178
|
+
|
|
179
|
+
python:3.10:
|
|
180
|
+
stage: compatibility
|
|
181
|
+
image: python:3.10
|
|
182
|
+
script:
|
|
183
|
+
- make install
|
|
184
|
+
- tox -e py310
|
|
185
|
+
rules:
|
|
186
|
+
- when: always
|
|
187
|
+
|
|
188
|
+
python:3.9:
|
|
189
|
+
stage: compatibility
|
|
190
|
+
image: python:3.9
|
|
191
|
+
script:
|
|
192
|
+
- make install
|
|
193
|
+
- tox -e py39
|
|
194
|
+
rules:
|
|
195
|
+
- when: always
|
|
196
|
+
|
|
197
|
+
python:3.8:
|
|
198
|
+
stage: compatibility
|
|
199
|
+
image: python:3.8
|
|
200
|
+
script:
|
|
201
|
+
- make install
|
|
202
|
+
- tox -e py38
|
|
203
|
+
rules:
|
|
204
|
+
- when: always
|
|
205
|
+
|
|
206
|
+
# -----------------------------------------------------------------------------
|
|
207
|
+
# GitLab & Pypi release using python-semantic-release
|
|
208
|
+
# -----------------------------------------------------------------------------
|
|
209
|
+
|
|
210
|
+
release:
|
|
211
|
+
variables:
|
|
212
|
+
GIT_DEPTH: 0
|
|
213
|
+
GIT_STRATEGY: "clone"
|
|
214
|
+
TWINE_USERNAME: __token__
|
|
215
|
+
TWINE_PASSWORD: $PYPI_TOKEN
|
|
216
|
+
stage: release
|
|
217
|
+
script:
|
|
218
|
+
# ensure we don't have a detatched head in the pipeline
|
|
219
|
+
# and that there is no untracked files in the dir
|
|
220
|
+
# remove previous build files as we will overwrite if there's a new version:
|
|
221
|
+
- git stash -u && git checkout main && git fetch --all && rm dist/**
|
|
222
|
+
|
|
223
|
+
# install release deps
|
|
224
|
+
- python3 -m pip install -q .[build]
|
|
225
|
+
|
|
226
|
+
# publish a new release (only if the commit msg matches)
|
|
227
|
+
- semantic-release version && semantic-release publish
|
|
228
|
+
|
|
229
|
+
# Check if there are files in the /dist folder
|
|
230
|
+
# this only will occur if semantic-release wants to publish a new version:
|
|
231
|
+
- if [ -z "$(ls -A dist)" ]; then
|
|
232
|
+
echo "No version to publish";
|
|
233
|
+
exit 0;
|
|
234
|
+
else
|
|
235
|
+
echo "Publishing new version";
|
|
236
|
+
twine upload --config-file .pypirc --repository pypi --verbose dist/*;
|
|
237
|
+
export TWINE_USERNAME="gitlab-ci-token" && export TWINE_PASSWORD="$CI_JOB_TOKEN";
|
|
238
|
+
twine upload --config-file .pypirc --repository gitlab --verbose dist/*;
|
|
239
|
+
fi
|
|
240
|
+
|
|
241
|
+
rules:
|
|
242
|
+
# only run on main branch
|
|
243
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
244
|
+
when: always
|
|
245
|
+
# skip the job if it's triggered by a release commit
|
|
246
|
+
- if: '$CI_COMMIT_MESSAGE =~ /^chore\(release\): bump version/'
|
|
247
|
+
when: never
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
### BUG
|
|
2
|
+
<!-- Thanks for taking the time to fill out this bug report! -->
|
|
3
|
+
|
|
4
|
+
#### What happened?
|
|
5
|
+
<!-- Also tell us what you expected to happen? -->
|
|
6
|
+
|
|
7
|
+
#### Version
|
|
8
|
+
<!-- What version of gitlabcis are you running? -->
|
|
9
|
+
|
|
10
|
+
#### Logs
|
|
11
|
+
<!-- Attach any relevant logs -->
|
|
12
|
+
|
|
13
|
+
/labels ~"bug" ~"priority::4"
|
|
14
|
+
cc: @nmcd
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
### Summary
|
|
2
|
+
|
|
3
|
+
<!-- Summarize the vuln encountered concisely. -->
|
|
4
|
+
|
|
5
|
+
### Steps to reproduce
|
|
6
|
+
|
|
7
|
+
<!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. -->
|
|
8
|
+
|
|
9
|
+
### What is the current *bug* behavior?
|
|
10
|
+
|
|
11
|
+
<!-- Describe what actually happens. -->
|
|
12
|
+
|
|
13
|
+
### Relevant logs and/or screenshots
|
|
14
|
+
|
|
15
|
+
<!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code
|
|
16
|
+
as it's tough to read otherwise. -->
|
|
17
|
+
|
|
18
|
+
### Possible fixes
|
|
19
|
+
|
|
20
|
+
<!-- If you can, link to the line of code that might be responsible for the problem. -->
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<!-- Do not edit past here unless you are certain of the impact -->
|
|
25
|
+
|
|
26
|
+
cc @nmcd
|
|
27
|
+
|
|
28
|
+
/label ~"type::bug" ~"bug::vulnerability"
|
|
29
|
+
/confidential
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
### Description
|
|
2
|
+
<!-- What changes are being introduced? -->
|
|
3
|
+
|
|
4
|
+
## Requester
|
|
5
|
+
<!-- Please ensure the checklist items are complete before requesting a review of this MR-->
|
|
6
|
+
|
|
7
|
+
<details><summary>Requester Checklist</summary>
|
|
8
|
+
|
|
9
|
+
- If this change modifies [benchmark functions](https://gitlab.com/gitlab-org/govern/compliance/engineering/cis/gitlabcis/-/tree/main/gitlabcis/benchmarks?ref_type=heads):
|
|
10
|
+
- The function:
|
|
11
|
+
- [ ] Name matches the `name` of the yaml recommendation
|
|
12
|
+
- [ ] Returns a `dict` containing:
|
|
13
|
+
- `True` or `False` (if the check passed/failed)
|
|
14
|
+
- `None` for skipped checks
|
|
15
|
+
- a `str` with the reason why (e.g. `{None: 'This check requires validation'}`)
|
|
16
|
+
- [ ] The `docstring` contains the id and title of the recommendation to check
|
|
17
|
+
- Limitations:
|
|
18
|
+
- [ ] Any limitations for the function are added to [docs/limitations.md](https://gitlab.com/gitlab-org/govern/compliance/engineering/cis/gitlabcis/-/tree/main/docs/limitations.md)
|
|
19
|
+
- If this change modifies [recommendations](https://gitlab.com/gitlab-org/govern/compliance/engineering/cis/gitlabcis/-/tree/main/gitlabcis/recommendations):
|
|
20
|
+
- [ ] Ensure approval from `CODEOWNERS` is obtained
|
|
21
|
+
- [ ] All unit tests pass before requesting review
|
|
22
|
+
- [ ] This merge request's title matches the prefixes allowed in `.commitlintrc`
|
|
23
|
+
- [ ] Remove _Draft_ phase from the MR
|
|
24
|
+
|
|
25
|
+
</details>
|
|
26
|
+
|
|
27
|
+
## Reviewer(s)
|
|
28
|
+
<!-- Please ensure this MR meets the requirements before approving & merging -->
|
|
29
|
+
|
|
30
|
+
<details><summary>Reviewer Checklist</summary>
|
|
31
|
+
|
|
32
|
+
- If this change modifies [benchmark functions](https://gitlab.com/gitlab-org/govern/compliance/engineering/cis/gitlabcis/-/tree/main/gitlabcis/benchmarks?ref_type=heads):
|
|
33
|
+
- [ ] The function(s) satisfy the recommendation _(see the `audit` section in the yaml file)_
|
|
34
|
+
- i.e. does this function address the recommendation benchmark check
|
|
35
|
+
- [ ] This merge request's title matches the prefixes allowed in `.commitlintrc`
|
|
36
|
+
- [ ] All tests have passed successfully
|
|
37
|
+
|
|
38
|
+
</details>
|
|
39
|
+
|
|
40
|
+
### Local validation
|
|
41
|
+
<!-- You can validate benchmark functions by following the below steps -->
|
|
42
|
+
|
|
43
|
+
To validate changes to benchmark functions for this merge request, follow the below:
|
|
44
|
+
|
|
45
|
+
<details><summary>validation steps</summary>
|
|
46
|
+
|
|
47
|
+
Clone the repo:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
git clone git@gitlab.com:gitlab-com/gl-security/security-operations/sirt/automation/cis-benchmark-scanner.git
|
|
51
|
+
cd cis-benchmark-scanner
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Checkout into the merge request branch:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
git checkout $branchRequestingToMerge
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Install the version in the merge request:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
make install
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Validate the function(s) against a project:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
gitlabcis https://gitlab.example.com/path/to/project
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
To test a single benchmark functon:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
gitlabcis https://gitlab.example.com/path/to/project \
|
|
76
|
+
-ids 1.1.1
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
</details>
|
|
80
|
+
|
|
81
|
+
<!-- Labels, assignee & tags -->
|
|
82
|
+
|
|
83
|
+
/label ~"SIRT_Tooling"
|
|
84
|
+
|
|
85
|
+
/label ~"SIRT_Automation::Maintenance"
|
|
86
|
+
|
|
87
|
+
/label ~"SIRT_Phase::Backlog"
|
|
88
|
+
|
|
89
|
+
/assign me
|
|
90
|
+
|
|
91
|
+
/draft
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Default state for all rules
|
|
2
|
+
default: true
|
|
3
|
+
|
|
4
|
+
# MD013/line-length - Ignore Line length
|
|
5
|
+
MD013: false
|
|
6
|
+
|
|
7
|
+
# MD033/no-inline-html - Allow lists in tables
|
|
8
|
+
MD033:
|
|
9
|
+
allowed_elements:
|
|
10
|
+
- "li"
|
|
11
|
+
- "ul"
|
|
12
|
+
- "summary"
|
|
13
|
+
- "details"
|
|
14
|
+
|
|
15
|
+
# This rule conflicts with issue templates
|
|
16
|
+
MD041: false
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
|
3
|
+
rev: v9.18.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: commitlint
|
|
6
|
+
stages: [commit-msg]
|
|
7
|
+
additional_dependencies: ['@commitlint/config-angular']
|
|
8
|
+
args: ['--config', '.commitlintrc', '--verbose']
|
|
9
|
+
|
|
10
|
+
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
11
|
+
rev: v0.41.0
|
|
12
|
+
hooks:
|
|
13
|
+
- id: markdownlint
|
|
14
|
+
args: ["**/*.md", "-c", ".markdownlint.yaml"]
|
|
15
|
+
|
|
16
|
+
- repo: https://github.com/gitleaks/gitleaks
|
|
17
|
+
rev: v8.19.2
|
|
18
|
+
hooks:
|
|
19
|
+
- id: gitleaks
|
|
20
|
+
stages: [commit, push]
|
|
21
|
+
args: ['detect', '--no-banner']
|
|
22
|
+
|
|
23
|
+
- repo: https://github.com/pycqa/isort
|
|
24
|
+
rev: 5.13.2
|
|
25
|
+
hooks:
|
|
26
|
+
- id: isort
|
|
27
|
+
|
|
28
|
+
- repo: https://github.com/psf/black
|
|
29
|
+
rev: 24.8.0
|
|
30
|
+
hooks:
|
|
31
|
+
- id: black
|
|
32
|
+
args: ['-S', '--line-length=79', '--diff']
|
|
33
|
+
|
|
34
|
+
- repo: https://github.com/pycqa/flake8
|
|
35
|
+
rev: 7.1.1
|
|
36
|
+
hooks:
|
|
37
|
+
- id: flake8
|
gitlabcis-1.3.2/.pypirc
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[distutils]
|
|
2
|
+
index-servers =
|
|
3
|
+
gitlab
|
|
4
|
+
testpypi
|
|
5
|
+
pypi
|
|
6
|
+
|
|
7
|
+
[gitlab]
|
|
8
|
+
repository = https://gitlab.com/api/v4/projects/57279821/packages/pypi
|
|
9
|
+
|
|
10
|
+
[testpypi]
|
|
11
|
+
repository = https://test.pypi.org/legacy/
|
|
12
|
+
|
|
13
|
+
[pypi]
|
|
14
|
+
repository = https://upload.pypi.org/legacy/
|