diff --git a/docs/configuration/initiatives/index.md b/docs/configuration/initiatives/index.md index 1cd37712..0092bf62 100644 --- a/docs/configuration/initiatives/index.md +++ b/docs/configuration/initiatives/index.md @@ -7,6 +7,7 @@ |------|-------------| | [NIST Application Container Security Initiative](/docs/configuration/initiatives/sp-800-190.md) | This initiative enforces container security controls as outlined in NIST SP 800-190. It ensures that containerized applications follow security best practices, including vulnerability scanning, trusted image sources, registry security, and proper configuration to minimize risk. The initiative enables policy-driven enforcement of security controls throughout the software development lifecycle (SDLC), providing real-time feedback to developers and enforcement in CI/CD pipelines. | | [NIST Supply Chain Integrity Initiative](/docs/configuration/initiatives/sp-800-53.md) | This initiative enforces key supply chain requirements from NIST SP 800-53. It mandates that container builds include: - A Software Bill of Materials (SBOM) to ensure component inventory and traceability, addressing requirements from SR-4 and CM-8. - Provenance data to support architectural traceability, as outlined in SA-8. Both the SBOM and the provenance artifacts must be cryptographically signed to meet integrity requirements specified in SA-12. | +| [OWASP Top 10 CI/CD Security Controls](/docs/configuration/initiatives/owasp-top10-cicd-gh.md) | OWASP Top 10 CI/CD Security Controls - GitHub | | [SLSA L1 Framework](/docs/configuration/initiatives/slsa.l1.md) | Evaluate SLSA Level 1 | | [SLSA L2 Framework](/docs/configuration/initiatives/slsa.l2.md) | Evaluate SLSA Level 2 | | [SSDF Client Initiative](/docs/configuration/initiatives/ssdf.md) | Evaluate PS rules from the SSDF initiative | @@ -68,6 +69,21 @@ | [Disallow Commits to Main Branch](/docs/configuration/initiatives/rules/git/no-commit-to-main.md) | Verify commits made directly to the main branch are disallowed. | | [Disallow Unsigned Commits](/docs/configuration/initiatives/rules/git/no-unsigned-commits.md) | Verify all commits are signed. | +### SLSA Provenance +**Evidence Type:** [SLSA Provenance](/docs/valint/help/valint_slsa) + +| Rule Name | Description | +|-----------|-------------| +| [SLSA External Parameters Match in Provenance Document](/docs/configuration/initiatives/rules/slsa/verify-external-parameters.md) | Verify the specified external parameters value match in the provenance document. | +| [Verify that provenance is authenticated](/docs/configuration/initiatives/rules/slsa/l2-provenance-authenticated.md) | Verify the artifact is signed. | +| [SLSA Field Exists in Provenance Document](/docs/configuration/initiatives/rules/slsa/field-exists.md) | Verify the specified field exists in the provenance document. | +| [Verify Provenance Document Exists](/docs/configuration/initiatives/rules/slsa/l1-provenance-exists.md) | Verify that the Provenance document evidence exists. | +| [Disallow dependencies in SLSA Provenance Document](/docs/configuration/initiatives/rules/slsa/banned-builder-deps.md) | Verify that dependencies in the block list do not appear in the SLSA Proveance document. | +| [Verify build time](/docs/configuration/initiatives/rules/slsa/build-time.md) | Verify the artifact was created within the specified time window. | +| [Verify that artifact was created by the specified builder](/docs/configuration/initiatives/rules/slsa/verify-builder.md) | Verify the artifact was created by the specified builder. | +| [Verify that artifact has no disallowed builder dependencies](/docs/configuration/initiatives/rules/slsa/verify-byproducts.md) | Verify the artifact has no disallowed builder dependencies. | +| [SLSA Field Value Matches in Provenance Document](/docs/configuration/initiatives/rules/slsa/verify-custom-fields.md) | Verify the specified field value matches in the provenance document. | + ### SARIF Evidence **Evidence Type:** [SARIF Evidence](/docs/valint/sarif) @@ -146,6 +162,7 @@ | [Verify secret_scanning setting](/docs/configuration/initiatives/rules/github/repository/secret-scanning.md) | Verify `secret_scanning` is configured in the GitHub repository. | | [Verify No Cache Usage Exists in Repository](/docs/configuration/initiatives/rules/github/repository/no-cache-usage.md) | Verify the GitHub repository has no cache usage. | | [Verify All Commits Are Signed in Repository](/docs/configuration/initiatives/rules/github/repository/check-signed-commits.md) | Verify all commits in the GitHub repository are signed. | +| [Repo Workflows and Pipelines Discovered](/docs/configuration/initiatives/rules/github/repository/workflows-discovered.md) | Ensure that repository pipelines discovery was not skipped. | | [Verify Only Ephemeral Runners Exist in Repository](/docs/configuration/initiatives/rules/github/repository/ephemeral-runners-only.md) | Verify self-hosted runners are disallowed in the GitHub repository. | | [Allowed Public Repositories](/docs/configuration/initiatives/rules/github/repository/visibility.md) | Verify only GitHub repositories in the Allowed List are public. | | [Verify Push Protection Setting](/docs/configuration/initiatives/rules/github/repository/push-protection.md) | Verify `secret_scanning_push_protection` is configured in the GitHub repository. | @@ -156,6 +173,7 @@ | Rule Name | Description | |-----------|-------------| | [Limit Admins in GitLab Organization](/docs/configuration/initiatives/rules/gitlab/org/max-admins.md) | Verify the maximum number of admins for the GitLab project is restricted. | +| [Require Gitlab Organization Discovery Evidence](/docs/configuration/initiatives/rules/gitlab/org/evidence-exists.md) | Verify the Gitlab Organization exists as evidence. | | [Ensure Active Projects in GitLab Organization](/docs/configuration/initiatives/rules/gitlab/org/inactive-projects.md) | Verify no GitLab organization projects are inactive. | | [Restrict Public Visibility in GitLab Organization](/docs/configuration/initiatives/rules/gitlab/org/projects-visibility.md) | Verify only allowed projects in the GitLab organization have public visibility. | | [Allowed Admins in GitLab Organization](/docs/configuration/initiatives/rules/gitlab/org/allow-admins.md) | Verify only users in the Allowed List have admin privileges in the GitLab organization. | @@ -187,6 +205,7 @@ | [Restrict Selective Code Owner Removals in GitLab](/docs/configuration/initiatives/rules/gitlab/project/selective-code-owner-removals.md) | Verify `selective_code_owner_removals` is set for the GitLab project. | | [Run Secrets Scanning in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/secrets-scanning.md) | Verify secrets scanning is performed for the GitLab project. | | [Reset Approvals on Push in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/reset-pprovals-on-push.md) | Verify `reset_approvals_on_push` is set for the GitLab project. | +| [Require Gitlab Project Discovery Evidence](/docs/configuration/initiatives/rules/gitlab/project/evidence-exists.md) | Verify the Gitlab Project exists as evidence. | | [Reject Unsigned Commits in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/reject-unsigned-commits.md) | Verify `reject_unsigned_commits` is enabled for the GitLab project. | | [Enable Commit Committer Check in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/commit-committer-check.md) | Verify `commit_committer_check` is enabled for the GitLab project. | | [Protect CI Secrets in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/protect-ci-secrets.md) | Verify secrets in the GitLab project are not shared. | @@ -289,21 +308,6 @@ | [Disallow Unused Users](/docs/configuration/initiatives/rules/jenkins/instance/unused-users.md) | Verify there are no users with zero activity. | | [Verify Inactive Users](/docs/configuration/initiatives/rules/jenkins/instance/inactive-users.md) | Verify there are no inactive users. | -### SLSA Provenance -**Evidence Type:** [SLSA Provenance](/docs/valint/help/valint_slsa) - -| Rule Name | Description | -|-----------|-------------| -| [SLSA External Parameters Match in Provenance Document](/docs/configuration/initiatives/rules/slsa/verify-external-parameters.md) | Verify the specified external parameters value match in the provenance document. | -| [Verify that provenance is authenticated](/docs/configuration/initiatives/rules/slsa/l2-provenance-authenticated.md) | Verify the artifact is signed. | -| [SLSA Field Exists in Provenance Document](/docs/configuration/initiatives/rules/slsa/field-exists.md) | Verify the specified field exists in the provenance document. | -| [Verify Provenance Document Exists](/docs/configuration/initiatives/rules/slsa/l1-provenance-exists.md) | Verify that the Provenance document evidence exists. | -| [Disallow dependencies in SLSA Provenance Document](/docs/configuration/initiatives/rules/slsa/banned-builder-deps.md) | Verify that dependencies in the block list do not appear in the SLSA Proveance document. | -| [Verify build time](/docs/configuration/initiatives/rules/slsa/build-time.md) | Verify the artifact was created within the specified time window. | -| [Verify that artifact was created by the specified builder](/docs/configuration/initiatives/rules/slsa/verify-builder.md) | Verify the artifact was created by the specified builder. | -| [Verify that artifact has no disallowed builder dependencies](/docs/configuration/initiatives/rules/slsa/verify-byproducts.md) | Verify the artifact has no disallowed builder dependencies. | -| [SLSA Field Value Matches in Provenance Document](/docs/configuration/initiatives/rules/slsa/verify-custom-fields.md) | Verify the specified field value matches in the provenance document. | - ### Statement **Evidence Type:** [Statement](/docs/valint/generic) diff --git a/docs/configuration/initiatives/owasp-top10-cicd-gh.md b/docs/configuration/initiatives/owasp-top10-cicd-gh.md new file mode 100644 index 00000000..71675559 --- /dev/null +++ b/docs/configuration/initiatives/owasp-top10-cicd-gh.md @@ -0,0 +1,243 @@ +--- +sidebar_label: OWASP Top 10 CI/CD Security Controls for GitHub +title: OWASP Top 10 CI/CD Security Controls +--- +# OWASP Top 10 CI/CD Security Controls +**Type:** Initiative +**ID:** `OWASP-TOP10-CICD-SC-GH` +**Version:** `` +**Bundle-Version:** `v2` +**Source:** [v2/initiatives/owasp-top10-cicd-gh.yaml](https://github.com/scribe-public/sample-policies/blob/main/v2/initiatives/owasp-top10-cicd-gh.yaml) +**Help:** https://owasp.org/www-project-top-10-ci-cd-security-risks/ + +OWASP Top 10 CI/CD Security Controls - GitHub + +## **Description** + +This initiative provides a set of security controls for CI/CD pipelines implementing the OWASP Top 10 CI/CD Security Risks framework. + +## Required Evidence + +This initiative requires the following evidence types: + +- [Signed SBOM](/docs/valint/sbom) +- [Image SBOM](/docs/valint/sbom) +- [Git SBOM](/docs/valint/sbom) +- [Signed Git SBOM](/docs/valint/sbom) +- [Signed SLSA Provenance](/docs/valint/help/valint_slsa) +- [SARIF Evidence](/docs/valint/sarif) +- [Github Organization Discovery Evidence](/docs/platforms/discover#github-discovery) +- [Github Repository Discovery Evidence](/docs/platforms/discover#github-discovery) + +## Evidence Defaults + +| Field | Value | +|-------|-------| +| signed | False | + +## Rule Parameters +To configure this initiative for your organization needs, the following parameters should be specified: + +- **[CICD-SEC-1] Insufficient Flow Control Mechanisms** + - **Require Branch Protection** + - **`branches`**: `array` - List of branches to be protected. + *Default:* `['main', 'master']`. + - **Pull request approval policy check** + - **`approvals_required_min`**: `number` - Minimum number of approvals required for pull requests. + *Default:* `1`. +- **[CICD-SEC-2] Inadequate Identity and Access Management** + - **Limit Admin Number** + - **`max_admins`**: `integer` - Maximum number of admins allowed. + *Default:* `4`. + - **Allowed GitHub Organization Admins** + - **`allowed_admins`**: `array` - List of allowed GitHub organization admins. + - **Allowed GitHub Organization Users** + - **`allowed_users`**: `array` - List of allowed users. + - **'Create repositories' permissions check** + - **Limit Public Repositories** + - **`allowed_repo_names`**: `array` - List of repository pattern allowed to be visible. +- **[CICD-SEC-3] Dependency Chain Abuse** + - **Ensure that base images are from an approved source** + - **`approved_sources`**: `array` - A list of approved base image registry URL prefixes. + *Default:* `['index.docker.io/library/.*', 'gcr.io/.*']`. + - **Verify NPM Packages Origin** + - **`allowed_registries`**: `array` - A list of allowed NPM registries. + *Default:* `['https://registry.npmjs.org/']`. +- **[CICD-SEC-4] Poisoned Pipeline Execution** + - **Restrict Pipeline Script Modification** + - **`files`**: `array` - The list of files that are allowed to be committed to the repository. + *Default:* `['.github/workflow/*.yml', '.github/workflow/*.yaml']`. + - **`ids`**: `array` - The list of user (commit.author) IDs allowed to commit to the repository. + - **Require Branch Protection** + - **`branches`**: `array` - List of branches to be protected. + *Default:* `['main', 'master']`. +- **[CICD-SEC-6] Insufficient Credential Hygiene** + - **Verify No Old Secrets Exist in Organization** + - **`max_secret_age`**: `integer` - Maximum age of secrets in months. + *Default:* `6`. + - **Verify No Old Secrets Exist in Repository** + - **`max_secret_age`**: `integer` - Maximum age of secrets in months. + *Default:* `6`. + - **Verify Trivy Secret Scan Report** + - **`rule_names`**: `array` - List of rule names to check for in the Trivy SARIF report. + *Default:* `['Secret']`. + - **`max_allowed`**: `integer` - The maximum number of allowed violations. + +## Controls Overview + +| Control Name | Control Description | Mitigation | +|--------------|---------------------|------------| +| [[CICD-SEC-1] Insufficient Flow Control Mechanisms](#cicd-sec-1-insufficient-flow-control-mechanisms) | Ensure that the CI/CD pipeline has sufficient flow control mechanisms to prevent unauthorized pushing of malicious code into artifacts. | Implement branch protection rules to prevent unauthorized changes. Require signed commits to maintain code integrity. | +| [[CICD-SEC-2] Inadequate Identity and Access Management](#cicd-sec-2-inadequate-identity-and-access-management) | Ensure that the CI/CD pipeline has adequate identity and access management to prevent unauthorized access to the pipeline and artifacts. | Implement strong identity and access management practices. Enforce multi-factor authentication (MFA) for all users. Limit the number of administrators to the minimum required. Ensure repositories are private to prevent unauthorized access. | +| [[CICD-SEC-3] Dependency Chain Abuse](#cicd-sec-3-dependency-chain-abuse) | Ensure that the CI/CD pipeline has mechanisms to prevent dependency chain abuse. | | +| [[CICD-SEC-4] Poisoned Pipeline Execution](#cicd-sec-4-poisoned-pipeline-execution) | Ensure that the pipeline script cannot be tampered with | Restrict access to the pipeline script to prevent unauthorized modifications. Implement strict permissions and review processes for any changes to the pipeline script. | +| [[CICD-SEC-5] Insufficient Pipeline Access Controls](#cicd-sec-5-insufficient-pipeline-access-controls) | Ensure that the CI/CD pipeline has sufficient access controls to prevent unauthorized access to the pipeline and artifacts. Implement strict access controls for the CI/CD pipeline to prevent unauthorized access. Use ephemeral runners to ensure a clean environment for each pipeline run. Ensure that secrets are not shared across pipelines and are scoped to the minimum required. | | +| [[CICD-SEC-6] Insufficient Credential Hygiene](#cicd-sec-6-insufficient-credential-hygiene) | Ensure that the CI/CD pipeline has sufficient credential hygiene to prevent unauthorized access to the pipeline and artifacts. | | +| [[CICD-SEC-7] Insecure System Configuration](#cicd-sec-7-insecure-system-configuration) | Ensure that the CI/CD pipeline has secure system configuration to prevent unauthorized access to the pipeline and artifacts. | | +| [[CICD-SEC-8] Ungoverned Usage of 3rd Party Services](#cicd-sec-8-ungoverned-usage-of-3rd-party-services) | Ensure that the CI/CD pipeline has mechanisms to prevent ungoverned usage of 3rd party services. | | +| [[CICD-SEC-9] Improper Artifact Integrity Validation](#cicd-sec-9-improper-artifact-integrity-validation) | Ensure that the CI/CD pipeline has mechanisms to validate the integrity of artifacts. | Implement processes and technologies to validate the integrity of resources all the way from development to production. | +| [[CICD-SEC-10] Insufficient Logging and Visibility](#cicd-sec-10-insufficient-logging-and-visibility) | Ensure that the CI/CD pipeline has sufficient logging and visibility to detect unauthorized access to the pipeline and artifacts. | Identify and build an inventory of all the systems in use within the organization, containing every instance of these systems. | + +--- + +# Detailed Controls + +## [CICD-SEC-1] Insufficient Flow Control Mechanisms + +Ensure that the CI/CD pipeline has sufficient flow control mechanisms to prevent unauthorized pushing of malicious code into artifacts. + + +### Mitigation +Implement branch protection rules to prevent unauthorized changes. Require signed commits to maintain code integrity. + +### Rules + +| Rule ID | Rule Name | Rule Description | +|---------|-----------|------------------| +| [github-repo-branch-protection](rules/github/repository/branch-protection.md) | [Require Branch Protection](rules/github/repository/branch-protection.md) | Configure branch protection rules on branches hosting code which is used in production and other sensitive systems. | +| [github-repo-pr-approval](rules/github/repository/approvals-policy-check.md) | [Pull request approval policy check](rules/github/repository/approvals-policy-check.md) | Ensure that the repository's PR approval policy requires a minimum number of approvals. | +| [github-repo-signed-commits](rules/github/repository/check-signed-commits.md) | [Accept Signed Commits](rules/github/repository/check-signed-commits.md) | Ensure all commits signing is required by branch protection, in order to maintain code integrity. | +| [github-repo-web-commit-signoff](rules/github/repository/web-commit-signoff.md) | [Require Signoff on Web Commits](rules/github/repository/web-commit-signoff.md) | Ensure that the GitHub repository requires signoff on web commits. | +| [sbom-signed](rules/sbom/artifact-signed.md) | [Require Image and Git SBOMs to be signed](rules/sbom/artifact-signed.md) | Verify images and git SBOMs are signed. | + +## [CICD-SEC-2] Inadequate Identity and Access Management + +Ensure that the CI/CD pipeline has adequate identity and access management to prevent unauthorized access to the pipeline and artifacts. + + +### Mitigation +Implement strong identity and access management practices. Enforce multi-factor authentication (MFA) for all users. Limit the number of administrators to the minimum required. Ensure repositories are private to prevent unauthorized access. + +### Rules + +| Rule ID | Rule Name | Rule Description | +|---------|-----------|------------------| +| [github-org-2fa](rules/github/org/2fa.md) | [Enforce MFA](rules/github/org/2fa.md) | Mandate multi-factor authentication. | +| [github-org-max-admins](rules/github/org/max-admins.md) | [Limit Admin Number](rules/github/org/max-admins.md) | Limit the number of admins to the minimum required. | +| [github-org-allowed-admins](rules/github/org/allow-admins.md) | [Allowed GitHub Organization Admins](rules/github/org/allow-admins.md) | Verify only users in the Allowed List have admin privileges. | +| [github-org-allowed-users](rules/github/org/allow-users.md) | [Allowed GitHub Organization Users](rules/github/org/allow-users.md) | Verify only users in the Allowed List have user access to the GitHub organization. | +| [github-org-create-repos](rules/github/org/create-repos.md) | ['Create repositories' permissions check](rules/github/org/create-repos.md) | Ensure only allowed users can create repositories in the GitHub organization. | +| [github-org-repo-visibility](rules/github/org/repo-visibility.md) | [Limit Public Repositories](rules/github/org/repo-visibility.md) | Verify only repositories in the Allowed List are public in the GitHub organization. | + +## [CICD-SEC-3] Dependency Chain Abuse + +Ensure that the CI/CD pipeline has mechanisms to prevent dependency chain abuse. + +### Rules + +| Rule ID | Rule Name | Rule Description | +|---------|-----------|------------------| +| [allowed-base-image](rules/images/allowed-base-image.md) | [Ensure that base images are from an approved source](rules/images/allowed-base-image.md) | Verify that every base image is from an approved source. | +| [allowed-npm-registries](rules/images/allowed-npm-registries.md) | [Verify NPM Packages Origin](rules/images/allowed-npm-registries.md) | Verify that NPM packages are pulled from an approved registry. | + +## [CICD-SEC-4] Poisoned Pipeline Execution + +Ensure that the pipeline script cannot be tampered with + + +### Mitigation +Restrict access to the pipeline script to prevent unauthorized modifications. Implement strict permissions and review processes for any changes to the pipeline script. + +### Rules + +| Rule ID | Rule Name | Rule Description | +|---------|-----------|------------------| +| [git-coding-permissions](rules/git/coding-permissions.md) | [Restrict Pipeline Script Modification](rules/git/coding-permissions.md) | Restrict access to the pipeline script to prevent tampering. | +| [github-repo-branch-protection](rules/github/repository/branch-protection.md) | [Require Branch Protection](rules/github/repository/branch-protection.md) | Implement branch protection rules to prevent unauthorized changes. | + +## [CICD-SEC-5] Insufficient Pipeline Access Controls + +Ensure that the CI/CD pipeline has sufficient access controls to prevent unauthorized access to the pipeline and artifacts. Implement strict access controls for the CI/CD pipeline to prevent unauthorized access. Use ephemeral runners to ensure a clean environment for each pipeline run. Ensure that secrets are not shared across pipelines and are scoped to the minimum required. + +### Rules + +| Rule ID | Rule Name | Rule Description | +|---------|-----------|------------------| +| [github-repo-ephemeral-runners-only](rules/github/repository/ephemeral-runners-only.md) | [Use Ephemeral GitHub Runner](rules/github/repository/ephemeral-runners-only.md) | Use ephemeral runners to ensure a clean environment for each pipeline run. | +| [github-repo-no-org-secrets](rules/github/repository/no-org-secrets.md) | [Separate Repo Secrets](rules/github/repository/no-org-secrets.md) | Avoid sharing the same set of credentials across multiple contexts. | + +## [CICD-SEC-6] Insufficient Credential Hygiene + +Ensure that the CI/CD pipeline has sufficient credential hygiene to prevent unauthorized access to the pipeline and artifacts. + +### Rules + +| Rule ID | Rule Name | Rule Description | +|---------|-----------|------------------| +| [github-org-old-secrets](rules/github/org/old-secrets.md) | [Verify No Old Secrets Exist in Organization](rules/github/org/old-secrets.md) | Verify secrets in the GitHub organization are not older than the specified threshold. | +| [github-repo-old-secrets](rules/github/repository/old-secrets.md) | [Verify No Old Secrets Exist in Repository](rules/github/repository/old-secrets.md) | Verify secrets in the GitHub repository are not older than the specified threshold. | +| [github-repo-no-org-secrets](rules/github/repository/no-org-secrets.md) | [Separate Repo Secrets](rules/github/repository/no-org-secrets.md) | Avoid sharing the same set of credentials across multiple contexts. | +| [github-repo-secret-scanning](rules/github/repository/secret-scanning.md) | [Verify secret_scanning setting](rules/github/repository/secret-scanning.md) | Detect secrets pushed to and stored on code repositories. | +| [trivy-secret-scan](rules/sarif/trivy/verify-trivy-report.md) | [Verify Trivy Secret Scan Report](rules/sarif/trivy/verify-trivy-report.md) | Verify the Trivy report for exposed secrets. | + +## [CICD-SEC-7] Insecure System Configuration + +Ensure that the CI/CD pipeline has secure system configuration to prevent unauthorized access to the pipeline and artifacts. + +### Rules + +| Rule ID | Rule Name | Rule Description | +|---------|-----------|------------------| +| [github-repo-ephemeral-runners-only](rules/github/repository/ephemeral-runners-only.md) | [Use Github Runner](rules/github/repository/ephemeral-runners-only.md) | Use ephemeral runners to ensure a clean environment for each pipeline run. | + +## [CICD-SEC-8] Ungoverned Usage of 3rd Party Services + +Ensure that the CI/CD pipeline has mechanisms to prevent ungoverned usage of 3rd party services. + +:::warning +This control not currently supported on this platform. +::: + +## [CICD-SEC-9] Improper Artifact Integrity Validation + +Ensure that the CI/CD pipeline has mechanisms to validate the integrity of artifacts. + + +### Mitigation +Implement processes and technologies to validate the integrity of resources all the way from development to production. + +### Rules + +| Rule ID | Rule Name | Rule Description | +|---------|-----------|------------------| +| [sbom-signed](rules/sbom/artifact-signed.md) | [Artifact verification software (Image SBOM)](rules/sbom/artifact-signed.md) | Verify image SBOMs are signed. | +| [git-sbom-signed](rules/git/artifact-signed.md) | [Artifact verification software (Git SBOM)](rules/git/artifact-signed.md) | Verify Git SBOMs are signed. | +| [SLSA.L2](rules/slsa/l2-provenance-authenticated.md) | [Artifact verification software (SLSA)](rules/slsa/l2-provenance-authenticated.md) | Verify SLSA Provenance attestations are signed. | +| [git-disallow-unsigned-commits](rules/git/no-unsigned-commits.md) | [Code signing (Git SBOM)](rules/git/no-unsigned-commits.md) | Verify all commits are signed. | +| [github-repo-signed-commits](rules/github/repository/check-signed-commits.md) | [Code signing (GitHub repo)](rules/github/repository/check-signed-commits.md) | Verify all commits are verified on GitHub. | +| [github-repo-web-commit-signoff](rules/github/repository/web-commit-signoff.md) | [Verify GitHub Repository Requires Signoff on Web Commits](rules/github/repository/web-commit-signoff.md) | Ensure that the GitHub repository requires signoff on web commits. | + +## [CICD-SEC-10] Insufficient Logging and Visibility + +Ensure that the CI/CD pipeline has sufficient logging and visibility to detect unauthorized access to the pipeline and artifacts. + + +### Mitigation +Identify and build an inventory of all the systems in use within the organization, containing every instance of these systems. + +### Rules + +| Rule ID | Rule Name | Rule Description | +|---------|-----------|------------------| +| [github-repo-exists](rules/github/repository/evidence-exists.md) | [GitHub repository evidence](rules/github/repository/evidence-exists.md) | Identify and build an inventory of all the systems in use within the organization, containing every instance of these systems. | +| [workflows-discovered](rules/github/repository/workflows-discovered.md) | [Repo Workflows and Pipelines Discovered](rules/github/repository/workflows-discovered.md) | Repository workflows scan helps to keep track of the repo workflows, pipeline runs, run reasons, authors and other relevant information. | diff --git a/docs/configuration/initiatives/rules/api/scribe-api-cve-product.md b/docs/configuration/initiatives/rules/api/scribe-api-cve-product.md index 13a51917..1a1a08f5 100644 --- a/docs/configuration/initiatives/rules/api/scribe-api-cve-product.md +++ b/docs/configuration/initiatives/rules/api/scribe-api-cve-product.md @@ -32,7 +32,7 @@ Ensure that all critical or high severity vulnerabilities are addressed before d This rule ensures that there are no critical or high severity vulnerabilities in any deliverable component of the product by verifying via the Scribe API. ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| cve | array | True | List of CVEs to check against the product components. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| cve | array | True | List of CVEs to check against the product components. | | diff --git a/docs/configuration/initiatives/rules/api/scribe-api-cve.md b/docs/configuration/initiatives/rules/api/scribe-api-cve.md index 84a5e004..b5db80e7 100644 --- a/docs/configuration/initiatives/rules/api/scribe-api-cve.md +++ b/docs/configuration/initiatives/rules/api/scribe-api-cve.md @@ -52,7 +52,7 @@ This rule ensures that there are no critical or high severity vulnerabilities in | content_body_type | cyclonedx-json | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| superset | object | False | The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| superset | object | False | The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. | `{'cve': {'max': 0, 'severity': 6}}` | diff --git a/docs/configuration/initiatives/rules/api/scribe-api-findings.md b/docs/configuration/initiatives/rules/api/scribe-api-findings.md index f0232b8b..86cfb8db 100644 --- a/docs/configuration/initiatives/rules/api/scribe-api-findings.md +++ b/docs/configuration/initiatives/rules/api/scribe-api-findings.md @@ -54,7 +54,7 @@ Ensure that all findings reported by 3rd party tools are addressed before delive This rule ensures that there are no findings, such as vulnerabilities, misconfigurations, or other issues reported by 3rd party tools, in any component of the product by verifying via the Scribe API. ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| superset | object | False | Filters for the findings. See usage example. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| superset | object | False | Filters for the findings. See usage example. | `{'findings': {'severities': [], 'tools': [], 'titles': [], 'cwes': [], 'descriptions': [], 'descriptions_to_ignore': []}}` | diff --git a/docs/configuration/initiatives/rules/bitbucket/project/allow-admins.md b/docs/configuration/initiatives/rules/bitbucket/project/allow-admins.md index cbf578cd..a3ec6ff3 100644 --- a/docs/configuration/initiatives/rules/bitbucket/project/allow-admins.md +++ b/docs/configuration/initiatives/rules/bitbucket/project/allow-admins.md @@ -67,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_admins | array | False | List of users allowed to have admin privileges in the Bitbucket project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_admins | array | False | List of users allowed to have admin privileges in the Bitbucket project. | [] | diff --git a/docs/configuration/initiatives/rules/bitbucket/project/allow-users.md b/docs/configuration/initiatives/rules/bitbucket/project/allow-users.md index 83826bea..6901edee 100644 --- a/docs/configuration/initiatives/rules/bitbucket/project/allow-users.md +++ b/docs/configuration/initiatives/rules/bitbucket/project/allow-users.md @@ -67,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_users | array | False | List of users allowed to have user access to the Bitbucket project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_users | array | False | List of users allowed to have user access to the Bitbucket project. | [] | diff --git a/docs/configuration/initiatives/rules/bitbucket/project/long-live-tokens.md b/docs/configuration/initiatives/rules/bitbucket/project/long-live-tokens.md index ddc631e8..26b9909d 100644 --- a/docs/configuration/initiatives/rules/bitbucket/project/long-live-tokens.md +++ b/docs/configuration/initiatives/rules/bitbucket/project/long-live-tokens.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_days | number | False | Maximum number of days a token can be valid. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_days | number | False | Maximum number of days a token can be valid. | 30 | diff --git a/docs/configuration/initiatives/rules/bitbucket/repository/allow-admins.md b/docs/configuration/initiatives/rules/bitbucket/repository/allow-admins.md index b4550781..df915a94 100644 --- a/docs/configuration/initiatives/rules/bitbucket/repository/allow-admins.md +++ b/docs/configuration/initiatives/rules/bitbucket/repository/allow-admins.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_admins | array | False | List of users allowed to have admin privileges in the Bitbucket repository. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_admins | array | False | List of users allowed to have admin privileges in the Bitbucket repository. | [] | diff --git a/docs/configuration/initiatives/rules/bitbucket/repository/allow-users.md b/docs/configuration/initiatives/rules/bitbucket/repository/allow-users.md index d63e8635..925ecf74 100644 --- a/docs/configuration/initiatives/rules/bitbucket/repository/allow-users.md +++ b/docs/configuration/initiatives/rules/bitbucket/repository/allow-users.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_users | array | False | List of users allowed to have user access to the Bitbucket repository. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_users | array | False | List of users allowed to have user access to the Bitbucket repository. | [] | diff --git a/docs/configuration/initiatives/rules/bitbucket/repository/branch-protection.md b/docs/configuration/initiatives/rules/bitbucket/repository/branch-protection.md index fb763faf..f16823e5 100644 --- a/docs/configuration/initiatives/rules/bitbucket/repository/branch-protection.md +++ b/docs/configuration/initiatives/rules/bitbucket/repository/branch-protection.md @@ -66,7 +66,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| branches | array | False | List of branches to verify default branch protection. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| branches | array | False | List of branches to verify default branch protection. | ['main'] | diff --git a/docs/configuration/initiatives/rules/bitbucket/workspace/allow-admins.md b/docs/configuration/initiatives/rules/bitbucket/workspace/allow-admins.md index b549e9fa..c27ed8b0 100644 --- a/docs/configuration/initiatives/rules/bitbucket/workspace/allow-admins.md +++ b/docs/configuration/initiatives/rules/bitbucket/workspace/allow-admins.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_admins | array | False | List of users allowed to have admin privileges in the Bitbucket workspace. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_admins | array | False | List of users allowed to have admin privileges in the Bitbucket workspace. | [] | diff --git a/docs/configuration/initiatives/rules/bitbucket/workspace/allow-users.md b/docs/configuration/initiatives/rules/bitbucket/workspace/allow-users.md index f3e8a56e..1bb78370 100644 --- a/docs/configuration/initiatives/rules/bitbucket/workspace/allow-users.md +++ b/docs/configuration/initiatives/rules/bitbucket/workspace/allow-users.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_users | array | False | List of users allowed to have user access to the Bitbucket workspace. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_users | array | False | List of users allowed to have user access to the Bitbucket workspace. | [] | diff --git a/docs/configuration/initiatives/rules/generic/3rd-pty.md b/docs/configuration/initiatives/rules/generic/3rd-pty.md index abd48462..dae9187a 100644 --- a/docs/configuration/initiatives/rules/generic/3rd-pty.md +++ b/docs/configuration/initiatives/rules/generic/3rd-pty.md @@ -68,12 +68,12 @@ Violations are recorded if any findings exceed the configured limits or match bl | predicate_type | http://scribesecurity.com/evidence/finding/v0.1 | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| severities | array | False | List of severities to filter by. | -| titles | array | False | List of titles to filter by. | -| cwes | array | False | List of CWE identifiers to filter by. | -| descriptions | array | False | List of descriptions to filter by. | -| descriptions_to_ignore | array | False | List of descriptions to ignore from findings. | -| component_names | array | False | List of component names to filter by. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| severities | array | False | List of severities to filter by. | [] | +| titles | array | False | List of titles to filter by. | [] | +| cwes | array | False | List of CWE identifiers to filter by. | [] | +| descriptions | array | False | List of descriptions to filter by. | [] | +| descriptions_to_ignore | array | False | List of descriptions to ignore from findings. | [] | +| component_names | array | False | List of component names to filter by. | [] | diff --git a/docs/configuration/initiatives/rules/git/artifact-signed.md b/docs/configuration/initiatives/rules/git/artifact-signed.md index 2fec2b81..5c9cf9a2 100644 --- a/docs/configuration/initiatives/rules/git/artifact-signed.md +++ b/docs/configuration/initiatives/rules/git/artifact-signed.md @@ -4,7 +4,7 @@ title: Git Artifact Signed --- # Git Artifact Signed **Type:** Rule -**ID:** `git-artifact-signed` +**ID:** `git-sbom-signed` **Source:** [v2/rules/git/artifact-signed.yaml](https://github.com/scribe-public/sample-policies/blob/main/v2/rules/git/artifact-signed.yaml) **Rego Source:** [artifact-signed.rego](https://github.com/scribe-public/sample-policies/blob/main/v2/rules/git/artifact-signed.rego) **Labels:** SBOM, Git @@ -46,9 +46,9 @@ Ensure that only Git artifacts with valid cryptographic signatures are deployed | Field | Value | |-------|-------| | filter-by | ['product', 'target'] | -| signed | True | | content_body_type | cyclonedx-json | | target_type | git | +| signed | True | ## Rule Parameters (`with`) | Parameter | Default | diff --git a/docs/configuration/initiatives/rules/git/coding-permissions.md b/docs/configuration/initiatives/rules/git/coding-permissions.md index c55d1936..f496ded2 100644 --- a/docs/configuration/initiatives/rules/git/coding-permissions.md +++ b/docs/configuration/initiatives/rules/git/coding-permissions.md @@ -56,8 +56,8 @@ It performs the following steps: | target_type | git | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| ids | array | False | The list of user (commit.author) IDs allowed to commit to the repository. | -| files | array | False | The list of files that are allowed to be committed to the repository. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| ids | array | False | The list of user (commit.author) IDs allowed to commit to the repository. | [] | +| files | array | False | The list of files that are allowed to be committed to the repository. | [] | diff --git a/docs/configuration/initiatives/rules/github/api/signed-commits-list.md b/docs/configuration/initiatives/rules/github/api/signed-commits-list.md index b4e835d2..381e7573 100644 --- a/docs/configuration/initiatives/rules/github/api/signed-commits-list.md +++ b/docs/configuration/initiatives/rules/github/api/signed-commits-list.md @@ -40,10 +40,10 @@ It performs the following steps: - Github API token must be provided to access the GitHub API. ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| commit_id_list | array | True | List of commit IDs to verify if they are signed. | -| access_token | string | True | GitHub API access token. | -| owner | string | True | GitHub repository owner. | -| repo | string | True | GitHub repository name. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| commit_id_list | array | True | List of commit IDs to verify if they are signed. | [] | +| access_token | string | True | GitHub API access token. | | +| owner | string | True | GitHub repository owner. | | +| repo | string | True | GitHub repository name. | | diff --git a/docs/configuration/initiatives/rules/github/api/signed-commits-range.md b/docs/configuration/initiatives/rules/github/api/signed-commits-range.md index 66010fe4..23f90475 100644 --- a/docs/configuration/initiatives/rules/github/api/signed-commits-range.md +++ b/docs/configuration/initiatives/rules/github/api/signed-commits-range.md @@ -43,12 +43,12 @@ It performs the following steps: - Github API token must be provided to access the GitHub API. ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| access_token | string | True | GitHub API access token. | -| owner | string | True | GitHub repository owner. | -| repo | string | True | GitHub repository name. | -| since | string | False | ISO 8601 date-time string. The beginning of the time range. | -| until | string | False | ISO 8601 date-time string. The end of the time range. | -| sha | string | False | The SHA of the commit to verify. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| access_token | string | True | GitHub API access token. | | +| owner | string | True | GitHub repository owner. | | +| repo | string | True | GitHub repository name. | | +| since | string | False | ISO 8601 date-time string. The beginning of the time range. | None | +| until | string | False | ISO 8601 date-time string. The end of the time range. | None | +| sha | string | False | The SHA of the commit to verify. | None | diff --git a/docs/configuration/initiatives/rules/github/org/advanced-security.md b/docs/configuration/initiatives/rules/github/org/advanced-security.md index 32cd77c2..53006081 100644 --- a/docs/configuration/initiatives/rules/github/org/advanced-security.md +++ b/docs/configuration/initiatives/rules/github/org/advanced-security.md @@ -67,7 +67,7 @@ introducing vulnerabilities or unapproved software. ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| desired_value | boolean | False | Desired value for the `advanced_security_enabled_for_new_repositories` setting. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| desired_value | boolean | False | Desired value for the `advanced_security_enabled_for_new_repositories` setting. | True | diff --git a/docs/configuration/initiatives/rules/github/org/allow-admins.md b/docs/configuration/initiatives/rules/github/org/allow-admins.md index 5ba2e3c7..c9d26691 100644 --- a/docs/configuration/initiatives/rules/github/org/allow-admins.md +++ b/docs/configuration/initiatives/rules/github/org/allow-admins.md @@ -69,7 +69,7 @@ the desired value, a violation is recorded. This ensures that only users in the ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_admins | array | False | List of allowed GitHub organization admins. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_admins | array | False | List of allowed GitHub organization admins. | [] | diff --git a/docs/configuration/initiatives/rules/github/org/allow-users.md b/docs/configuration/initiatives/rules/github/org/allow-users.md index 0ffd3e3c..43de8411 100644 --- a/docs/configuration/initiatives/rules/github/org/allow-users.md +++ b/docs/configuration/initiatives/rules/github/org/allow-users.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_users | array | False | List of allowed users. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_users | array | False | List of allowed users. | [] | diff --git a/docs/configuration/initiatives/rules/github/org/create-private-repos.md b/docs/configuration/initiatives/rules/github/org/create-private-repos.md index 83f83966..9e612778 100644 --- a/docs/configuration/initiatives/rules/github/org/create-private-repos.md +++ b/docs/configuration/initiatives/rules/github/org/create-private-repos.md @@ -69,7 +69,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_users | array | False | List of allowed users. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_users | array | False | List of allowed users. | | diff --git a/docs/configuration/initiatives/rules/github/org/create-repos.md b/docs/configuration/initiatives/rules/github/org/create-repos.md index ef622625..60ae404d 100644 --- a/docs/configuration/initiatives/rules/github/org/create-repos.md +++ b/docs/configuration/initiatives/rules/github/org/create-repos.md @@ -66,7 +66,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| desired_value | boolean | False | The desired value for the `members_can_create_repositories` setting. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| desired_value | boolean | False | The desired value for the `members_can_create_repositories` setting. | False | diff --git a/docs/configuration/initiatives/rules/github/org/dependabot-alerts.md b/docs/configuration/initiatives/rules/github/org/dependabot-alerts.md index e499bad7..c2bff600 100644 --- a/docs/configuration/initiatives/rules/github/org/dependabot-alerts.md +++ b/docs/configuration/initiatives/rules/github/org/dependabot-alerts.md @@ -66,7 +66,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| desired_value | boolean | False | Desired value for the dependabot_alerts_enabled_for_new_repositories setting. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| desired_value | boolean | False | Desired value for the dependabot_alerts_enabled_for_new_repositories setting. | True | diff --git a/docs/configuration/initiatives/rules/github/org/dependabot-security-updates.md b/docs/configuration/initiatives/rules/github/org/dependabot-security-updates.md index 649db827..6f6e15e5 100644 --- a/docs/configuration/initiatives/rules/github/org/dependabot-security-updates.md +++ b/docs/configuration/initiatives/rules/github/org/dependabot-security-updates.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| desired_value | boolean | False | Indicates if Dependabot security updates for new repositories are enabled. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| desired_value | boolean | False | Indicates if Dependabot security updates for new repositories are enabled. | True | diff --git a/docs/configuration/initiatives/rules/github/org/dependency-graph.md b/docs/configuration/initiatives/rules/github/org/dependency-graph.md index e6430aea..e2e5b464 100644 --- a/docs/configuration/initiatives/rules/github/org/dependency-graph.md +++ b/docs/configuration/initiatives/rules/github/org/dependency-graph.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| desired_value | boolean | False | Indicates if the dependency graph is enabled. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| desired_value | boolean | False | Indicates if the dependency graph is enabled. | True | diff --git a/docs/configuration/initiatives/rules/github/org/max-admins.md b/docs/configuration/initiatives/rules/github/org/max-admins.md index 8fce427b..79cf0fea 100644 --- a/docs/configuration/initiatives/rules/github/org/max-admins.md +++ b/docs/configuration/initiatives/rules/github/org/max-admins.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_admins | integer | False | Maximum number of admins allowed. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_admins | integer | False | Maximum number of admins allowed. | 0 | diff --git a/docs/configuration/initiatives/rules/github/org/old-secrets.md b/docs/configuration/initiatives/rules/github/org/old-secrets.md index 34c7c29c..aeabfa0e 100644 --- a/docs/configuration/initiatives/rules/github/org/old-secrets.md +++ b/docs/configuration/initiatives/rules/github/org/old-secrets.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_secret_age | integer | False | Maximum age of secrets in months. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_secret_age | integer | False | Maximum age of secrets in months. | 12 | diff --git a/docs/configuration/initiatives/rules/github/org/push-protection.md b/docs/configuration/initiatives/rules/github/org/push-protection.md index 19349ceb..d65587c7 100644 --- a/docs/configuration/initiatives/rules/github/org/push-protection.md +++ b/docs/configuration/initiatives/rules/github/org/push-protection.md @@ -66,7 +66,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| desired_value | boolean | False | Indicates if the secret scanning push protection is enabled for new repositories. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| desired_value | boolean | False | Indicates if the secret scanning push protection is enabled for new repositories. | True | diff --git a/docs/configuration/initiatives/rules/github/org/repo-visibility.md b/docs/configuration/initiatives/rules/github/org/repo-visibility.md index 48a92364..b506081c 100644 --- a/docs/configuration/initiatives/rules/github/org/repo-visibility.md +++ b/docs/configuration/initiatives/rules/github/org/repo-visibility.md @@ -67,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_repo_names | array | False | List of repository pattern allowed to be visible. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_repo_names | array | False | List of repository pattern allowed to be visible. | [] | diff --git a/docs/configuration/initiatives/rules/github/repository/approvals-policy-check.md b/docs/configuration/initiatives/rules/github/repository/approvals-policy-check.md index 2993d905..3abfdae6 100644 --- a/docs/configuration/initiatives/rules/github/repository/approvals-policy-check.md +++ b/docs/configuration/initiatives/rules/github/repository/approvals-policy-check.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| approvals_required_min | number | True | Minimum number of approvals required for pull requests. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| approvals_required_min | number | True | Minimum number of approvals required for pull requests. | 1 | diff --git a/docs/configuration/initiatives/rules/github/repository/branch-protection.md b/docs/configuration/initiatives/rules/github/repository/branch-protection.md index 5a98e7a5..eb800bc3 100644 --- a/docs/configuration/initiatives/rules/github/repository/branch-protection.md +++ b/docs/configuration/initiatives/rules/github/repository/branch-protection.md @@ -68,8 +68,8 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| desired_protected | boolean | False | Desired branch protection setting. | -| branches | array | False | List of branches to be protected. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| desired_protected | boolean | False | Desired branch protection setting. | True | +| branches | array | False | List of branches to be protected. | ['main', 'master'] | diff --git a/docs/configuration/initiatives/rules/github/repository/old-secrets.md b/docs/configuration/initiatives/rules/github/repository/old-secrets.md index 1337e07a..5004d337 100644 --- a/docs/configuration/initiatives/rules/github/repository/old-secrets.md +++ b/docs/configuration/initiatives/rules/github/repository/old-secrets.md @@ -62,8 +62,8 @@ It performs the following steps: {{- end -}} ``` -## Rule Parameters (`with`) -| Parameter | Default | -|-----------|---------| -| max_secret_age | 12 | +## Input Definitions +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_secret_age | integer | False | Maximum age of secrets in months. | 12 | diff --git a/docs/configuration/initiatives/rules/github/repository/visibility.md b/docs/configuration/initiatives/rules/github/repository/visibility.md index 10758380..17559b15 100644 --- a/docs/configuration/initiatives/rules/github/repository/visibility.md +++ b/docs/configuration/initiatives/rules/github/repository/visibility.md @@ -67,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_repo_names | string | False | List of allowed repository patterns. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_repo_names | string | False | List of allowed repository patterns. | [] | diff --git a/docs/configuration/initiatives/rules/github/repository/workflows-discovered.md b/docs/configuration/initiatives/rules/github/repository/workflows-discovered.md new file mode 100644 index 00000000..039abe02 --- /dev/null +++ b/docs/configuration/initiatives/rules/github/repository/workflows-discovered.md @@ -0,0 +1,58 @@ +--- +sidebar_label: Repo Workflows and Pipelines Discovered +title: Repo Workflows and Pipelines Discovered +--- +# Repo Workflows and Pipelines Discovered +**Type:** Rule +**ID:** `workflows-discovered` +**Source:** [v2/rules/github/repository/workflows-discovered.yaml](https://github.com/scribe-public/sample-policies/blob/main/v2/rules/github/repository/workflows-discovered.yaml) +**Rego Source:** [workflows-discovered.rego](https://github.com/scribe-public/sample-policies/blob/main/v2/rules/github/repository/workflows-discovered.rego) +**Labels:** GitHub, Repository + +Ensure that repository pipelines discovery was not skipped. + +:::note +This rule requires Github Repository Discovery Evidence. See [here](/docs/platforms/discover#github-discovery) for more details. +::: +:::tip +Signed Evidence for this rule **IS NOT** required by default but is recommended. +::: +:::warning +Rule requires evaluation with a target. Without one, it will be **disabled** unless the `--all-evidence` flag is provided. +::: + +## Usage example + +```yaml +uses: github/repository/workflows-discovered@v2 +``` + +## Mitigation +Ensure not to use the `--workflow.skip` flag when running the Scribe Platforms CLI tool for repository scans. + + +## Description +This rule checks that the repository pipelines discovery was not skipped by verifying Scribe Platforms CLI tool configuration +used for the repository scan. + +## Evidence Requirements +| Field | Value | +|-------|-------| +| signed | False | +| content_body_type | generic | +| target_type | data | +| predicate_type | http://scribesecurity.com/evidence/discovery/v0.1 | +| asset_platform | github | +| asset_type | repo | +| asset_name | Template value (see below) | + +**Template Value** (see [here](/docs/valint/initiatives#template-arguments) for more details) + +``` +{{- if eq .Context.asset_type "repo" -}} +{{- on_target .Context.asset_name -}} +{{- else -}} +{{- on_target nil -}} +{{- end -}} +``` + diff --git a/docs/configuration/initiatives/rules/gitlab/api/push-rules.md b/docs/configuration/initiatives/rules/gitlab/api/push-rules.md index 61a775b6..1042ae9a 100644 --- a/docs/configuration/initiatives/rules/gitlab/api/push-rules.md +++ b/docs/configuration/initiatives/rules/gitlab/api/push-rules.md @@ -56,9 +56,9 @@ It performs the following steps: - GitLab API token must be provided to access the GitLab API. ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| api_token | string | True | GitLab API access token. | -| project | string | True | GitLab project name. | -| push_rule | object | True | GitLab push rules. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| api_token | string | True | GitLab API access token. | `{{ .Args.Token }}` | +| project | string | True | GitLab project name. | `{{ .Args.Project }}` | +| push_rule | object | True | GitLab push rules. | `{'commit_message_regex': '', 'commit_message_negative_regex': None, 'branch_name_regex': None, 'deny_delete_tag': False, 'member_check': False, 'prevent_secrets': False, 'author_email_regex': '', 'file_name_regex': 'abc', 'max_file_size': 100, 'commit_committer_name_check': None, 'reject_unsigned_commits': None}` | diff --git a/docs/configuration/initiatives/rules/gitlab/api/signed-commits-range.md b/docs/configuration/initiatives/rules/gitlab/api/signed-commits-range.md index 9f526d4e..f0049c90 100644 --- a/docs/configuration/initiatives/rules/gitlab/api/signed-commits-range.md +++ b/docs/configuration/initiatives/rules/gitlab/api/signed-commits-range.md @@ -43,10 +43,10 @@ It performs the following steps: - GitLab API token must be provided to access the GitLab API. ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| since | string | False | ISO 8601 date-time string. The beginning of the time range. | -| until | string | False | ISO 8601 date-time string. The end of the time range. | -| project_id | string | True | GitLab project ID. | -| private_token | string | True | GitLab API access token. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| since | string | False | ISO 8601 date-time string. The beginning of the time range. | | +| until | string | False | ISO 8601 date-time string. The end of the time range. | | +| project_id | string | True | GitLab project ID. | | +| private_token | string | True | GitLab API access token. | | diff --git a/docs/configuration/initiatives/rules/gitlab/org/allow-admins.md b/docs/configuration/initiatives/rules/gitlab/org/allow-admins.md index f4c8a340..154d3641 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/allow-admins.md +++ b/docs/configuration/initiatives/rules/gitlab/org/allow-admins.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_admins | array | False | List of users allowed to have admin privileges in the GitLab organization. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_admins | array | False | List of users allowed to have admin privileges in the GitLab organization. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/org/allow-token-scopes.md b/docs/configuration/initiatives/rules/gitlab/org/allow-token-scopes.md index edcc4c73..c782eca4 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/allow-token-scopes.md +++ b/docs/configuration/initiatives/rules/gitlab/org/allow-token-scopes.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_token_scopes | array | False | List of allowed token scopes in the GitLab organization. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_token_scopes | array | False | List of allowed token scopes in the GitLab organization. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/org/allow-users.md b/docs/configuration/initiatives/rules/gitlab/org/allow-users.md index 2e496a65..abb2a2b7 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/allow-users.md +++ b/docs/configuration/initiatives/rules/gitlab/org/allow-users.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_users | array | False | List of users allowed to have access to the GitLab organization. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_users | array | False | List of users allowed to have access to the GitLab organization. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/org/blocked-users.md b/docs/configuration/initiatives/rules/gitlab/org/blocked-users.md index 7e57cc90..71115c20 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/blocked-users.md +++ b/docs/configuration/initiatives/rules/gitlab/org/blocked-users.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| blocked_users | array | False | List of users blocked in the GitLab organization. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| blocked_users | array | False | List of users blocked in the GitLab organization. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/org/evidence-exists.md b/docs/configuration/initiatives/rules/gitlab/org/evidence-exists.md new file mode 100644 index 00000000..4b53765a --- /dev/null +++ b/docs/configuration/initiatives/rules/gitlab/org/evidence-exists.md @@ -0,0 +1,53 @@ +--- +sidebar_label: Require Gitlab Organization Discovery Evidence +title: Require Gitlab Organization Discovery Evidence +--- +# Require Gitlab Organization Discovery Evidence +**Type:** Rule +**ID:** `gitlab-org-exists` +**Source:** [v2/rules/gitlab/org/evidence-exists.yaml](https://github.com/scribe-public/sample-policies/blob/main/v2/rules/gitlab/org/evidence-exists.yaml) +**Rego Source:** [evidence-exists.rego](https://github.com/scribe-public/sample-policies/blob/main/v2/rules/gitlab/org/evidence-exists.rego) +**Labels:** Gitlab, Organization + +Verify the Gitlab Organization exists as evidence. + +:::note +This rule requires Gitlab Organization Discovery Evidence. See [here](/docs/platforms/discover#gitlab-discovery) for more details. +::: +:::tip +> Evidence **IS** required for this rule and will fail if missing. +::: +:::tip +Signed Evidence for this rule **IS NOT** required by default but is recommended. +::: +:::warning +Rule requires evaluation with a target. Without one, it will be **disabled** unless the `--all-evidence` flag is provided. +::: + +## Usage example + +```yaml +uses: gitlab/org/evidence-exists@v2 +``` + +## Evidence Requirements +| Field | Value | +|-------|-------| +| signed | False | +| content_body_type | generic | +| target_type | data | +| predicate_type | http://scribesecurity.com/evidence/discovery/v0.1 | +| asset_platform | gitlab | +| asset_type | organization | +| asset_name | Template value (see below) | + +**Template Value** (see [here](/docs/valint/initiatives#template-arguments) for more details) + +``` +{{- if eq .Context.asset_type "organization" -}} +{{- on_target .Context.asset_name -}} +{{- else -}} +{{- on_target nil -}} +{{- end -}} +``` + diff --git a/docs/configuration/initiatives/rules/gitlab/org/expiring-tokens.md b/docs/configuration/initiatives/rules/gitlab/org/expiring-tokens.md index fbe766e9..14af82b3 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/expiring-tokens.md +++ b/docs/configuration/initiatives/rules/gitlab/org/expiring-tokens.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| exiring_in_days | number | False | Number of days before a token expires. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| exiring_in_days | number | False | Number of days before a token expires. | 30 | diff --git a/docs/configuration/initiatives/rules/gitlab/org/forbid-token-scopes.md b/docs/configuration/initiatives/rules/gitlab/org/forbid-token-scopes.md index 33a351d9..e9dd8aa4 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/forbid-token-scopes.md +++ b/docs/configuration/initiatives/rules/gitlab/org/forbid-token-scopes.md @@ -67,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| project_scopes | array | False | List of disallowed token scopes in the GitLab organization. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| project_scopes | array | False | List of disallowed token scopes in the GitLab organization. | ['write_api', 'write_repository'] | diff --git a/docs/configuration/initiatives/rules/gitlab/org/inactive-projects.md b/docs/configuration/initiatives/rules/gitlab/org/inactive-projects.md index 6740ce94..bee6ead9 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/inactive-projects.md +++ b/docs/configuration/initiatives/rules/gitlab/org/inactive-projects.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| inactive_for_days | number | False | Number of days before a project is considered inactive. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| inactive_for_days | number | False | Number of days before a project is considered inactive. | 90 | diff --git a/docs/configuration/initiatives/rules/gitlab/org/longlive-tokens.md b/docs/configuration/initiatives/rules/gitlab/org/longlive-tokens.md index b8716586..14dc8d78 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/longlive-tokens.md +++ b/docs/configuration/initiatives/rules/gitlab/org/longlive-tokens.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| exiring_in_days | number | False | Number of days before a token expires. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| exiring_in_days | number | False | Number of days before a token expires. | 365 | diff --git a/docs/configuration/initiatives/rules/gitlab/org/max-admins.md b/docs/configuration/initiatives/rules/gitlab/org/max-admins.md index fb28f191..45da1271 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/max-admins.md +++ b/docs/configuration/initiatives/rules/gitlab/org/max-admins.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_admins | number | False | Maximum number of admins allowed in the GitLab organization. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_admins | number | False | Maximum number of admins allowed in the GitLab organization. | 0 | diff --git a/docs/configuration/initiatives/rules/gitlab/org/projects-visibility.md b/docs/configuration/initiatives/rules/gitlab/org/projects-visibility.md index 7ff76ba3..906dd27e 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/projects-visibility.md +++ b/docs/configuration/initiatives/rules/gitlab/org/projects-visibility.md @@ -63,7 +63,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_public | array | False | List of projects allowed to have public visibility in the GitLab organization. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_public | array | False | List of projects allowed to have public visibility in the GitLab organization. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/org/unused-tokens.md b/docs/configuration/initiatives/rules/gitlab/org/unused-tokens.md index 8a2aec6e..4a4d7d87 100644 --- a/docs/configuration/initiatives/rules/gitlab/org/unused-tokens.md +++ b/docs/configuration/initiatives/rules/gitlab/org/unused-tokens.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| unused_for_days | number | False | Number of days before a token is considered unused. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| unused_for_days | number | False | Number of days before a token is considered unused. | 90 | diff --git a/docs/configuration/initiatives/rules/gitlab/project/abandoned-project.md b/docs/configuration/initiatives/rules/gitlab/project/abandoned-project.md index 1c744174..924c0d2f 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/abandoned-project.md +++ b/docs/configuration/initiatives/rules/gitlab/project/abandoned-project.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| inactive_for_days | number | False | Number of days the project has been inactive. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| inactive_for_days | number | False | Number of days the project has been inactive. | 30 | diff --git a/docs/configuration/initiatives/rules/gitlab/project/approvals-policy-check.md b/docs/configuration/initiatives/rules/gitlab/project/approvals-policy-check.md index f04bfedd..818d42f5 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/approvals-policy-check.md +++ b/docs/configuration/initiatives/rules/gitlab/project/approvals-policy-check.md @@ -67,8 +67,8 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| name | string | True | Name of the group or user that must approve the merge request. | -| approvals_required_min | number | True | Minimum number of approvals required for merge requests. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| name | string | True | Name of the group or user that must approve the merge request. | All Members | +| approvals_required_min | number | True | Minimum number of approvals required for merge requests. | 2 | diff --git a/docs/configuration/initiatives/rules/gitlab/project/approvers-per-merge-request.md b/docs/configuration/initiatives/rules/gitlab/project/approvers-per-merge-request.md index 0269752c..84a7b403 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/approvers-per-merge-request.md +++ b/docs/configuration/initiatives/rules/gitlab/project/approvers-per-merge-request.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| disable_overriding_approvers_per_merge_request | boolean | False | Whether to disable overriding approvers per merge request. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| disable_overriding_approvers_per_merge_request | boolean | False | Whether to disable overriding approvers per merge request. | False | diff --git a/docs/configuration/initiatives/rules/gitlab/project/author-email-regex.md b/docs/configuration/initiatives/rules/gitlab/project/author-email-regex.md index dd23455a..5c9f8678 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/author-email-regex.md +++ b/docs/configuration/initiatives/rules/gitlab/project/author-email-regex.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| author_email_regex | string | False | The regular expression for the author email. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| author_email_regex | string | False | The regular expression for the author email. | | diff --git a/docs/configuration/initiatives/rules/gitlab/project/check-cwe.md b/docs/configuration/initiatives/rules/gitlab/project/check-cwe.md index c3507ab4..954bd3e7 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/check-cwe.md +++ b/docs/configuration/initiatives/rules/gitlab/project/check-cwe.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| cwe_value | string | True | The CWE value to check for. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| cwe_value | string | True | The CWE value to check for. | 89 | diff --git a/docs/configuration/initiatives/rules/gitlab/project/co-approval-required.md b/docs/configuration/initiatives/rules/gitlab/project/co-approval-required.md index e9d1b3ff..277a2c31 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/co-approval-required.md +++ b/docs/configuration/initiatives/rules/gitlab/project/co-approval-required.md @@ -26,7 +26,9 @@ Rule requires evaluation with a target. Without one, it will be **disabled** unl ```yaml uses: gitlab/project/co-approval-required@v2 with: - branch: "main" + branches: + - "main" + - "master" ``` ## Mitigation @@ -65,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| branch | string | True | The branch to require code owner approval. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| branches | array | True | The branch to require code owner approval. | ['main', 'master'] | diff --git a/docs/configuration/initiatives/rules/gitlab/project/commit-author-email-check.md b/docs/configuration/initiatives/rules/gitlab/project/commit-author-email-check.md index 4cf4ebcc..50c2f8d9 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/commit-author-email-check.md +++ b/docs/configuration/initiatives/rules/gitlab/project/commit-author-email-check.md @@ -67,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_authors | array | False | List of users allowed to have commit author permissions in the GitLab project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_authors | array | False | List of users allowed to have commit author permissions in the GitLab project. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/project/commit-author-name-check.md b/docs/configuration/initiatives/rules/gitlab/project/commit-author-name-check.md index 7154f4dc..8c0dc93e 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/commit-author-name-check.md +++ b/docs/configuration/initiatives/rules/gitlab/project/commit-author-name-check.md @@ -66,7 +66,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_authors | array | False | List of users allowed to author commits in the GitLab project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_authors | array | False | List of users allowed to author commits in the GitLab project. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/project/commit-message-check.md b/docs/configuration/initiatives/rules/gitlab/project/commit-message-check.md index fd92fd8c..1b067e66 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/commit-message-check.md +++ b/docs/configuration/initiatives/rules/gitlab/project/commit-message-check.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| commit_message_regex | string | True | The regular expression to match the commit message format. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| commit_message_regex | string | True | The regular expression to match the commit message format. | | diff --git a/docs/configuration/initiatives/rules/gitlab/project/committer-email-check.md b/docs/configuration/initiatives/rules/gitlab/project/committer-email-check.md index afad9430..f0859de3 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/committer-email-check.md +++ b/docs/configuration/initiatives/rules/gitlab/project/committer-email-check.md @@ -66,7 +66,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_committers | array | False | List of email addresses allowed to use committer email addresses in the GitLab project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_committers | array | False | List of email addresses allowed to use committer email addresses in the GitLab project. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/project/committer-name-check.md b/docs/configuration/initiatives/rules/gitlab/project/committer-name-check.md index bc137b18..6fc523c9 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/committer-name-check.md +++ b/docs/configuration/initiatives/rules/gitlab/project/committer-name-check.md @@ -66,7 +66,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_committers | array | False | List of users allowed to commit by name in the GitLab project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_committers | array | False | List of users allowed to commit by name in the GitLab project. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/project/critical-severity-limit.md b/docs/configuration/initiatives/rules/gitlab/project/critical-severity-limit.md index d13edef2..c32acf38 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/critical-severity-limit.md +++ b/docs/configuration/initiatives/rules/gitlab/project/critical-severity-limit.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_allowed_vulnerability_count | number | False | Maximum allowed critical severity alerts for the GitLab project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_allowed_vulnerability_count | number | False | Maximum allowed critical severity alerts for the GitLab project. | 0 | diff --git a/docs/configuration/initiatives/rules/gitlab/project/description-substring-check.md b/docs/configuration/initiatives/rules/gitlab/project/description-substring-check.md index 171fff51..400720f2 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/description-substring-check.md +++ b/docs/configuration/initiatives/rules/gitlab/project/description-substring-check.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| pattern | string | False | The substring to search for in the description attribute of vulnerabilities. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| pattern | string | False | The substring to search for in the description attribute of vulnerabilities. | | diff --git a/docs/configuration/initiatives/rules/gitlab/project/disallowed-banned-approvers.md b/docs/configuration/initiatives/rules/gitlab/project/disallowed-banned-approvers.md index 4e0d6984..71556dfd 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/disallowed-banned-approvers.md +++ b/docs/configuration/initiatives/rules/gitlab/project/disallowed-banned-approvers.md @@ -67,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| banned_list | array | False | List of users banned from approving in the GitLab project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| banned_list | array | False | List of users banned from approving in the GitLab project. | [] | diff --git a/docs/configuration/initiatives/rules/gitlab/project/evidence-exists.md b/docs/configuration/initiatives/rules/gitlab/project/evidence-exists.md new file mode 100644 index 00000000..12a04085 --- /dev/null +++ b/docs/configuration/initiatives/rules/gitlab/project/evidence-exists.md @@ -0,0 +1,53 @@ +--- +sidebar_label: Require Gitlab Project Discovery Evidence +title: Require Gitlab Project Discovery Evidence +--- +# Require Gitlab Project Discovery Evidence +**Type:** Rule +**ID:** `gitlab-project-exists` +**Source:** [v2/rules/gitlab/project/evidence-exists.yaml](https://github.com/scribe-public/sample-policies/blob/main/v2/rules/gitlab/project/evidence-exists.yaml) +**Rego Source:** [evidence-exists.rego](https://github.com/scribe-public/sample-policies/blob/main/v2/rules/gitlab/project/evidence-exists.rego) +**Labels:** Gitlab, Project + +Verify the Gitlab Project exists as evidence. + +:::note +This rule requires Gitlab Project Discovery Evidence. See [here](/docs/platforms/discover#gitlab-discovery) for more details. +::: +:::tip +> Evidence **IS** required for this rule and will fail if missing. +::: +:::tip +Signed Evidence for this rule **IS NOT** required by default but is recommended. +::: +:::warning +Rule requires evaluation with a target. Without one, it will be **disabled** unless the `--all-evidence` flag is provided. +::: + +## Usage example + +```yaml +uses: gitlab/project/evidence-exists@v2 +``` + +## Evidence Requirements +| Field | Value | +|-------|-------| +| signed | False | +| content_body_type | generic | +| target_type | data | +| predicate_type | http://scribesecurity.com/evidence/discovery/v0.1 | +| asset_platform | gitlab | +| asset_type | repo | +| asset_name | Template value (see below) | + +**Template Value** (see [here](/docs/valint/initiatives#template-arguments) for more details) + +``` +{{- if eq .Context.asset_type "project" "repo" -}} +{{- on_target .Context.asset_name -}} +{{- else -}} +{{- on_target nil -}} +{{- end -}} +``` + diff --git a/docs/configuration/initiatives/rules/gitlab/project/force-push-protection.md b/docs/configuration/initiatives/rules/gitlab/project/force-push-protection.md index 6a913898..142c1ee0 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/force-push-protection.md +++ b/docs/configuration/initiatives/rules/gitlab/project/force-push-protection.md @@ -26,7 +26,9 @@ Rule requires evaluation with a target. Without one, it will be **disabled** unl ```yaml uses: gitlab/project/force-push-protection@v2 with: - branch: "main" + branches: + - "main" + - "master" ``` ## Mitigation @@ -65,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| branch | string | False | The branch to disallow force pushes. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| branches | array | False | The branch to disallow force pushes. | ['main', 'master'] | diff --git a/docs/configuration/initiatives/rules/gitlab/project/medium-severity-limit.md b/docs/configuration/initiatives/rules/gitlab/project/medium-severity-limit.md index a44269fc..02f60bac 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/medium-severity-limit.md +++ b/docs/configuration/initiatives/rules/gitlab/project/medium-severity-limit.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_allowed_specific_severity | number | False | Maximum allowed medium severity alerts for the GitLab project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_allowed_specific_severity | number | False | Maximum allowed medium severity alerts for the GitLab project. | 0 | diff --git a/docs/configuration/initiatives/rules/gitlab/project/merge-access-level.md b/docs/configuration/initiatives/rules/gitlab/project/merge-access-level.md index 618dbd9e..7ed4268d 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/merge-access-level.md +++ b/docs/configuration/initiatives/rules/gitlab/project/merge-access-level.md @@ -67,9 +67,9 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| branch | string | False | The branch to enforce merge access level policy. | -| access_level | number | False | The access level to enforce for merge access level policy. | -| access_level_description | string | False | The access level description to enforce for merge access level policy. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| branch | string | False | The branch to enforce merge access level policy. | main | +| access_level | number | False | The access level to enforce for merge access level policy. | | +| access_level_description | string | False | The access level description to enforce for merge access level policy. | Maintainers | diff --git a/docs/configuration/initiatives/rules/gitlab/project/merge-requests-author-approval.md b/docs/configuration/initiatives/rules/gitlab/project/merge-requests-author-approval.md index 6ebc685b..577ac928 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/merge-requests-author-approval.md +++ b/docs/configuration/initiatives/rules/gitlab/project/merge-requests-author-approval.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| merge_requests_author_approval | boolean | False | The binary field to enforce for merge requests author approval. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| merge_requests_author_approval | boolean | False | The binary field to enforce for merge requests author approval. | True | diff --git a/docs/configuration/initiatives/rules/gitlab/project/merge-requests-disable-committers-approval.md b/docs/configuration/initiatives/rules/gitlab/project/merge-requests-disable-committers-approval.md index 80fdf5d3..ec55db2c 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/merge-requests-disable-committers-approval.md +++ b/docs/configuration/initiatives/rules/gitlab/project/merge-requests-disable-committers-approval.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| merge_requests_disable_committers_approval | boolean | False | The binary field to enforce for merge requests committers' approval. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| merge_requests_disable_committers_approval | boolean | False | The binary field to enforce for merge requests committers' approval. | False | diff --git a/docs/configuration/initiatives/rules/gitlab/project/message-substring-check.md b/docs/configuration/initiatives/rules/gitlab/project/message-substring-check.md index 89107845..5c3f317a 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/message-substring-check.md +++ b/docs/configuration/initiatives/rules/gitlab/project/message-substring-check.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| pattern | string | True | The pattern to search for in the message attribute of vulnerabilities. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| pattern | string | True | The pattern to search for in the message attribute of vulnerabilities. | | diff --git a/docs/configuration/initiatives/rules/gitlab/project/protect-ci-secrets.md b/docs/configuration/initiatives/rules/gitlab/project/protect-ci-secrets.md index a340d384..4f298be2 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/protect-ci-secrets.md +++ b/docs/configuration/initiatives/rules/gitlab/project/protect-ci-secrets.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| pattern | string | False | The pattern to match secrets. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| pattern | string | False | The pattern to match secrets. | (?i)(token|secret) | diff --git a/docs/configuration/initiatives/rules/gitlab/project/push-access-level.md b/docs/configuration/initiatives/rules/gitlab/project/push-access-level.md index 18e80073..bf0bdcaa 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/push-access-level.md +++ b/docs/configuration/initiatives/rules/gitlab/project/push-access-level.md @@ -67,9 +67,9 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| branch | string | False | The branch to enforce push access level policy. | -| access_level | number | False | The access level to enforce for push access level policy. | -| access_level_description | string | False | The access level description to enforce for push access level policy. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| branch | string | False | The branch to enforce push access level policy. | main | +| access_level | number | False | The access level to enforce for push access level policy. | | +| access_level_description | string | False | The access level description to enforce for push access level policy. | Maintainers | diff --git a/docs/configuration/initiatives/rules/gitlab/project/require-password-to-approve.md b/docs/configuration/initiatives/rules/gitlab/project/require-password-to-approve.md index 7cb56dbc..7265c67e 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/require-password-to-approve.md +++ b/docs/configuration/initiatives/rules/gitlab/project/require-password-to-approve.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| require_password_to_approve | boolean | False | The binary field to enforce for requiring password to approve. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| require_password_to_approve | boolean | False | The binary field to enforce for requiring password to approve. | True | diff --git a/docs/configuration/initiatives/rules/gitlab/project/reset-pprovals-on-push.md b/docs/configuration/initiatives/rules/gitlab/project/reset-pprovals-on-push.md index 947751fc..c4adb397 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/reset-pprovals-on-push.md +++ b/docs/configuration/initiatives/rules/gitlab/project/reset-pprovals-on-push.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| reset_approvals_on_push | boolean | False | The binary field to enforce for resetting approvals on push. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| reset_approvals_on_push | boolean | False | The binary field to enforce for resetting approvals on push. | True | diff --git a/docs/configuration/initiatives/rules/gitlab/project/selective-code-owner-removals.md b/docs/configuration/initiatives/rules/gitlab/project/selective-code-owner-removals.md index 55833874..fb44a2fd 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/selective-code-owner-removals.md +++ b/docs/configuration/initiatives/rules/gitlab/project/selective-code-owner-removals.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| selective_code_owner_removals | boolean | True | Indicates whether `selective_code_owner_removals` is set for the GitLab project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| selective_code_owner_removals | boolean | True | Indicates whether `selective_code_owner_removals` is set for the GitLab project. | True | diff --git a/docs/configuration/initiatives/rules/gitlab/project/visibility-check.md b/docs/configuration/initiatives/rules/gitlab/project/visibility-check.md index 4024768f..c210c0a8 100644 --- a/docs/configuration/initiatives/rules/gitlab/project/visibility-check.md +++ b/docs/configuration/initiatives/rules/gitlab/project/visibility-check.md @@ -65,7 +65,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| visibility | string | True | The visibility level to enforce for the GitLab project. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| visibility | string | True | The visibility level to enforce for the GitLab project. | private | diff --git a/docs/configuration/initiatives/rules/images/allowed-base-image.md b/docs/configuration/initiatives/rules/images/allowed-base-image.md index 141df3d3..0d0eecb5 100644 --- a/docs/configuration/initiatives/rules/images/allowed-base-image.md +++ b/docs/configuration/initiatives/rules/images/allowed-base-image.md @@ -60,7 +60,7 @@ is found, a violation is recorded indicating that the necessary base image infor | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| approved_sources | array | False | A list of approved base image registry URL prefixes. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| approved_sources | array | False | A list of approved base image registry URL prefixes. | [] | diff --git a/docs/configuration/initiatives/rules/images/allowed-image-source.md b/docs/configuration/initiatives/rules/images/allowed-image-source.md index 6f5aeb92..f5154753 100644 --- a/docs/configuration/initiatives/rules/images/allowed-image-source.md +++ b/docs/configuration/initiatives/rules/images/allowed-image-source.md @@ -60,7 +60,7 @@ The matching is performed using a case-insensitive, anchored regex. | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| approved_sources | array | False | A list of approved Image source patterns. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| approved_sources | array | False | A list of approved Image source patterns. | [] | diff --git a/docs/configuration/initiatives/rules/images/allowed-npm-registries.md b/docs/configuration/initiatives/rules/images/allowed-npm-registries.md index f8f37638..bd102727 100644 --- a/docs/configuration/initiatives/rules/images/allowed-npm-registries.md +++ b/docs/configuration/initiatives/rules/images/allowed-npm-registries.md @@ -61,7 +61,7 @@ It performs the following steps: | target_type | container | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_registries | array | False | A list of allowed NPM registries. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_registries | array | False | A list of allowed NPM registries. | ['https://registry.npmjs.org/'] | diff --git a/docs/configuration/initiatives/rules/images/banned-ports.md b/docs/configuration/initiatives/rules/images/banned-ports.md index b6215c2c..dd37e855 100644 --- a/docs/configuration/initiatives/rules/images/banned-ports.md +++ b/docs/configuration/initiatives/rules/images/banned-ports.md @@ -63,7 +63,7 @@ It performs the following steps: | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| banned_ports | array | False | A list of banned ports and protocols. Each entry should be a dictionary with 'port' and 'protocol' keys. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| banned_ports | array | False | A list of banned ports and protocols. Each entry should be a dictionary with 'port' and 'protocol' keys. | [] | diff --git a/docs/configuration/initiatives/rules/images/banned-users.md b/docs/configuration/initiatives/rules/images/banned-users.md index 52d2e90b..929c02df 100644 --- a/docs/configuration/initiatives/rules/images/banned-users.md +++ b/docs/configuration/initiatives/rules/images/banned-users.md @@ -59,7 +59,7 @@ a violation is recorded. | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| users | array | False | A list of disallowed users. Each entry should be a string representing a username. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| users | array | False | A list of disallowed users. Each entry should be a string representing a username. | ['root'] | diff --git a/docs/configuration/initiatives/rules/images/blocklist-build-scripts.md b/docs/configuration/initiatives/rules/images/blocklist-build-scripts.md index c9b26b39..4a13058e 100644 --- a/docs/configuration/initiatives/rules/images/blocklist-build-scripts.md +++ b/docs/configuration/initiatives/rules/images/blocklist-build-scripts.md @@ -52,7 +52,7 @@ If a match is found, the rule generates a violation indicating that a disallowed | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| blocklist | array | False | A list of disallowed build script commands. Each entry should be a string representing a command or substring. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| blocklist | array | False | A list of disallowed build script commands. Each entry should be a string representing a command or substring. | [] | diff --git a/docs/configuration/initiatives/rules/images/forbid-large-images.md b/docs/configuration/initiatives/rules/images/forbid-large-images.md index 8a4558ca..edcb6f09 100644 --- a/docs/configuration/initiatives/rules/images/forbid-large-images.md +++ b/docs/configuration/initiatives/rules/images/forbid-large-images.md @@ -59,7 +59,7 @@ The extracted size is then converted to a numeric value and compared against the | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_size | integer | True | The maximum allowed image size in bytes. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_size | integer | True | The maximum allowed image size in bytes. | 77819980 | diff --git a/docs/configuration/initiatives/rules/images/fresh-base-image.md b/docs/configuration/initiatives/rules/images/fresh-base-image.md index 886b15b8..e270e786 100644 --- a/docs/configuration/initiatives/rules/images/fresh-base-image.md +++ b/docs/configuration/initiatives/rules/images/fresh-base-image.md @@ -55,7 +55,7 @@ If any base image is older than the allowed age, or if no base image data is fou | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_days | integer | True | The maximum allowed age of the base image in days. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_days | integer | True | The maximum allowed age of the base image in days. | 183 | diff --git a/docs/configuration/initiatives/rules/images/fresh-image.md b/docs/configuration/initiatives/rules/images/fresh-image.md index baf77e01..a6eab183 100644 --- a/docs/configuration/initiatives/rules/images/fresh-image.md +++ b/docs/configuration/initiatives/rules/images/fresh-image.md @@ -56,7 +56,7 @@ the rule flags the image as too old and generates a violation with details on th | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_days | integer | True | The maximum allowed age of the image in days. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_days | integer | True | The maximum allowed age of the image in days. | 183 | diff --git a/docs/configuration/initiatives/rules/images/image-signed.md b/docs/configuration/initiatives/rules/images/image-signed.md index 7ff88fc2..7ecc8d57 100644 --- a/docs/configuration/initiatives/rules/images/image-signed.md +++ b/docs/configuration/initiatives/rules/images/image-signed.md @@ -62,8 +62,8 @@ for images that do not require a signature. Otherwise, if the evidence does not | content_body_type | cyclonedx-json | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| identity | object | False | Identity information for the signers | -| skip_image_regex | array | False | Patterns to bypass the signature requirement for certain images | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| identity | object | False | Identity information for the signers | `{'emails': [], 'common-names': []}` | +| skip_image_regex | array | False | Patterns to bypass the signature requirement for certain images | [] | diff --git a/docs/configuration/initiatives/rules/images/verify-labels-exist.md b/docs/configuration/initiatives/rules/images/verify-labels-exist.md index 34759b8a..fff779f4 100644 --- a/docs/configuration/initiatives/rules/images/verify-labels-exist.md +++ b/docs/configuration/initiatives/rules/images/verify-labels-exist.md @@ -64,7 +64,7 @@ This rule checks the CycloneDX SBOM evidence for the container image to verify t | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| labels | array | False | A list of required labels. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| labels | array | False | A list of required labels. | [] | diff --git a/docs/configuration/initiatives/rules/images/verify-labels.md b/docs/configuration/initiatives/rules/images/verify-labels.md index c492c106..af1fd5df 100644 --- a/docs/configuration/initiatives/rules/images/verify-labels.md +++ b/docs/configuration/initiatives/rules/images/verify-labels.md @@ -60,7 +60,7 @@ required label (as defined in the `with.labels` parameter) exists with the corre | filter-by | ['target', 'product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| labels | array | False | A list of required labels. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| labels | array | False | A list of required labels. | [] | diff --git a/docs/configuration/initiatives/rules/jenkins/instance/inactive-users.md b/docs/configuration/initiatives/rules/jenkins/instance/inactive-users.md index 75b15f5a..ee665e5d 100644 --- a/docs/configuration/initiatives/rules/jenkins/instance/inactive-users.md +++ b/docs/configuration/initiatives/rules/jenkins/instance/inactive-users.md @@ -64,7 +64,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| inactive_for_days | number | False | Number of days before a user is considered inactive. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| inactive_for_days | number | False | Number of days before a user is considered inactive. | 90 | diff --git a/docs/configuration/initiatives/rules/k8s/namespace/allowed-images.md b/docs/configuration/initiatives/rules/k8s/namespace/allowed-images.md index adbf6615..31a3c2cb 100644 --- a/docs/configuration/initiatives/rules/k8s/namespace/allowed-images.md +++ b/docs/configuration/initiatives/rules/k8s/namespace/allowed-images.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| images_to_include | array | False | List of allowed container images. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| images_to_include | array | False | List of allowed container images. | [] | diff --git a/docs/configuration/initiatives/rules/k8s/namespace/allowed-registries.md b/docs/configuration/initiatives/rules/k8s/namespace/allowed-registries.md index 236b1f84..85db15be 100644 --- a/docs/configuration/initiatives/rules/k8s/namespace/allowed-registries.md +++ b/docs/configuration/initiatives/rules/k8s/namespace/allowed-registries.md @@ -68,7 +68,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| allowed_registries | array | False | A list of allowed container registries Regex patterns. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| allowed_registries | array | False | A list of allowed container registries Regex patterns. | [] | diff --git a/docs/configuration/initiatives/rules/k8s/namespace/verify-namespace-duration.md b/docs/configuration/initiatives/rules/k8s/namespace/verify-namespace-duration.md index 1f688076..d865f5d1 100644 --- a/docs/configuration/initiatives/rules/k8s/namespace/verify-namespace-duration.md +++ b/docs/configuration/initiatives/rules/k8s/namespace/verify-namespace-duration.md @@ -66,7 +66,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| threshold_date | string | False | The threshold date for namespace duration (supports regex). | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| threshold_date | string | False | The threshold date for namespace duration (supports regex). | 1970-01-01T00:00:00Z | diff --git a/docs/configuration/initiatives/rules/k8s/namespace/verify-namespace-termination.md b/docs/configuration/initiatives/rules/k8s/namespace/verify-namespace-termination.md index 9b1c0eb1..45bb6235 100644 --- a/docs/configuration/initiatives/rules/k8s/namespace/verify-namespace-termination.md +++ b/docs/configuration/initiatives/rules/k8s/namespace/verify-namespace-termination.md @@ -67,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| namespaces | array | False | A list of namespaces to verify (supports regex). | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| namespaces | array | False | A list of namespaces to verify (supports regex). | ['.*'] | diff --git a/docs/configuration/initiatives/rules/k8s/namespace/white-listed-namespaces.md b/docs/configuration/initiatives/rules/k8s/namespace/white-listed-namespaces.md index e118fc2a..d7127b61 100644 --- a/docs/configuration/initiatives/rules/k8s/namespace/white-listed-namespaces.md +++ b/docs/configuration/initiatives/rules/k8s/namespace/white-listed-namespaces.md @@ -67,7 +67,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| namespaces | array | False | A list of allowed namespaces. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| namespaces | array | False | A list of allowed namespaces. | [] | diff --git a/docs/configuration/initiatives/rules/k8s/namespace/white-listed-pod.md b/docs/configuration/initiatives/rules/k8s/namespace/white-listed-pod.md index 4bd55523..31bfbbb4 100644 --- a/docs/configuration/initiatives/rules/k8s/namespace/white-listed-pod.md +++ b/docs/configuration/initiatives/rules/k8s/namespace/white-listed-pod.md @@ -70,8 +70,8 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| white_listed_pod | array | True | A list of allowed pods (supports regex). | -| verify_namespaces | array | False | A list of namespaces to verify. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| white_listed_pod | array | True | A list of allowed pods (supports regex). | [] | +| verify_namespaces | array | False | A list of namespaces to verify. | ['.*'] | diff --git a/docs/configuration/initiatives/rules/k8s/pods/verify-pod-duration.md b/docs/configuration/initiatives/rules/k8s/pods/verify-pod-duration.md index bbbc68ef..cf3868df 100644 --- a/docs/configuration/initiatives/rules/k8s/pods/verify-pod-duration.md +++ b/docs/configuration/initiatives/rules/k8s/pods/verify-pod-duration.md @@ -66,7 +66,7 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_days | integer | False | The maximum allowed duration for pods in days. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_days | integer | False | The maximum allowed duration for pods in days. | 30 | diff --git a/docs/configuration/initiatives/rules/k8s/pods/white-listed-pod.md b/docs/configuration/initiatives/rules/k8s/pods/white-listed-pod.md index 397e71aa..dbb41ebd 100644 --- a/docs/configuration/initiatives/rules/k8s/pods/white-listed-pod.md +++ b/docs/configuration/initiatives/rules/k8s/pods/white-listed-pod.md @@ -70,8 +70,8 @@ It performs the following steps: ``` ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| white_listed_pod | array | True | A list of allowed pods (supports regex). | -| verify_namespaces | array | True | A list of namespaces to verify (supports regex). | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| white_listed_pod | array | True | A list of allowed pods (supports regex). | [] | +| verify_namespaces | array | True | A list of namespaces to verify (supports regex). | ['.*'] | diff --git a/docs/configuration/initiatives/rules/sarif/report-iac-errors.md b/docs/configuration/initiatives/rules/sarif/report-iac-errors.md index 60a3b8c2..db73395a 100644 --- a/docs/configuration/initiatives/rules/sarif/report-iac-errors.md +++ b/docs/configuration/initiatives/rules/sarif/report-iac-errors.md @@ -53,7 +53,7 @@ Evidence must be provided in a SARIF 2.1.0 compliant format, generated by the Vu | predicate_type | http://docs.oasis-open.org/sarif/sarif/2.1.0 | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| violations_threshold | integer | False | The maximum number of allowed IaC misconfiguration errors. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| violations_threshold | integer | False | The maximum number of allowed IaC misconfiguration errors. | 0 | diff --git a/docs/configuration/initiatives/rules/sarif/trivy/blocklist-cve.md b/docs/configuration/initiatives/rules/sarif/trivy/blocklist-cve.md index 6a48c671..aa1108c9 100644 --- a/docs/configuration/initiatives/rules/sarif/trivy/blocklist-cve.md +++ b/docs/configuration/initiatives/rules/sarif/trivy/blocklist-cve.md @@ -60,8 +60,8 @@ the rule ID, severity (extracted from the rule’s properties), and the location | filter-by | ['product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| rule_ids | array | False | List of CVE identifiers to check for in the Trivy SARIF report. | -| violations_threshold | integer | False | The maximum number of allowed violations. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| rule_ids | array | False | List of CVE identifiers to check for in the Trivy SARIF report. | [] | +| violations_threshold | integer | False | The maximum number of allowed violations. | 0 | diff --git a/docs/configuration/initiatives/rules/sarif/trivy/report-trivy-iac-errors.md b/docs/configuration/initiatives/rules/sarif/trivy/report-trivy-iac-errors.md index 82c29d58..9ac3bd3f 100644 --- a/docs/configuration/initiatives/rules/sarif/trivy/report-trivy-iac-errors.md +++ b/docs/configuration/initiatives/rules/sarif/trivy/report-trivy-iac-errors.md @@ -56,7 +56,7 @@ Evidence must be provided in a SARIF 2.1.0 compliant format, generated by the Tr | filter-by | ['product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| violations_threshold | integer | False | The maximum number of allowed IaC misconfiguration errors. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| violations_threshold | integer | False | The maximum number of allowed IaC misconfiguration errors. | 0 | diff --git a/docs/configuration/initiatives/rules/sarif/trivy/verify-cve-severity.md b/docs/configuration/initiatives/rules/sarif/trivy/verify-cve-severity.md index 1f15794b..bcd0b7c0 100644 --- a/docs/configuration/initiatives/rules/sarif/trivy/verify-cve-severity.md +++ b/docs/configuration/initiatives/rules/sarif/trivy/verify-cve-severity.md @@ -62,7 +62,7 @@ threshold. If the number of such violations exceeds the allowed maximum, a viola | filter-by | ['product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| severity_threshold | integer | True | The maximum severity level allowed for vulnerabilities. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| severity_threshold | integer | True | The maximum severity level allowed for vulnerabilities. | 0 | diff --git a/docs/configuration/initiatives/rules/sarif/trivy/verify-trivy-attack-vector.md b/docs/configuration/initiatives/rules/sarif/trivy/verify-trivy-attack-vector.md index 1b02523f..dd5d3ea5 100644 --- a/docs/configuration/initiatives/rules/sarif/trivy/verify-trivy-attack-vector.md +++ b/docs/configuration/initiatives/rules/sarif/trivy/verify-trivy-attack-vector.md @@ -42,8 +42,8 @@ with: | filter-by | ['product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| attack_vectors | array | False | List of attack vectors to check for in the Trivy SARIF report. | -| violations_threshold | integer | False | The maximum number of allowed attack vector violations in the Trivy SARIF report. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| attack_vectors | array | False | List of attack vectors to check for in the Trivy SARIF report. | [] | +| violations_threshold | integer | False | The maximum number of allowed attack vector violations in the Trivy SARIF report. | 0 | diff --git a/docs/configuration/initiatives/rules/sarif/trivy/verify-trivy-report.md b/docs/configuration/initiatives/rules/sarif/trivy/verify-trivy-report.md index 313c7094..749ae6c8 100644 --- a/docs/configuration/initiatives/rules/sarif/trivy/verify-trivy-report.md +++ b/docs/configuration/initiatives/rules/sarif/trivy/verify-trivy-report.md @@ -59,12 +59,12 @@ threshold. If the number of such violations exceeds the allowed maximum, a viola | filter-by | ['product'] | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| rule_level | array | False | List of rule levels to check for in the Trivy SARIF report. | -| precision | array | False | List of precision levels to check for in the Trivy SARIF report. | -| rule_ids | array | False | List of rule IDs to check for in the Trivy SARIF report. | -| rule_names | array | False | List of rule names to check for in the Trivy SARIF report. | -| ignore | array | False | List of rule IDs to ignore in the Trivy SARIF report. | -| max_allowed | integer | False | The maximum number of allowed violations. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| rule_level | array | False | List of rule levels to check for in the Trivy SARIF report. | [] | +| precision | array | False | List of precision levels to check for in the Trivy SARIF report. | [] | +| rule_ids | array | False | List of rule IDs to check for in the Trivy SARIF report. | [] | +| rule_names | array | False | List of rule names to check for in the Trivy SARIF report. | [] | +| ignore | array | False | List of rule IDs to ignore in the Trivy SARIF report. | [] | +| max_allowed | integer | False | The maximum number of allowed violations. | 0 | diff --git a/docs/configuration/initiatives/rules/sarif/verify-attack-vector.md b/docs/configuration/initiatives/rules/sarif/verify-attack-vector.md index 20f5479d..22114029 100644 --- a/docs/configuration/initiatives/rules/sarif/verify-attack-vector.md +++ b/docs/configuration/initiatives/rules/sarif/verify-attack-vector.md @@ -63,8 +63,8 @@ associated with specific attack vectors are properly identified. The rule works | predicate_type | http://docs.oasis-open.org/sarif/sarif/2.1.0 | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| attack_vectors | array | False | List of attack vectors to check for in the SARIF report. | -| violations_threshold | integer | False | The maximum number of allowed attack vector violations. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| attack_vectors | array | False | List of attack vectors to check for in the SARIF report. | [] | +| violations_threshold | integer | False | The maximum number of allowed attack vector violations. | 0 | diff --git a/docs/configuration/initiatives/rules/sarif/verify-sarif.md b/docs/configuration/initiatives/rules/sarif/verify-sarif.md index 9f4dda3f..df41e1a3 100644 --- a/docs/configuration/initiatives/rules/sarif/verify-sarif.md +++ b/docs/configuration/initiatives/rules/sarif/verify-sarif.md @@ -58,12 +58,12 @@ severity, and the corresponding location in the artifact. | predicate_type | http://docs.oasis-open.org/sarif/sarif/2.1.0 | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| rule_level | array | False | List of rule levels to check for in the SARIF report. | -| precision | array | False | List of precision levels to check for in the SARIF report. | -| rule_ids | array | False | List of rule IDs to check for in the SARIF report. | -| rule_names | array | False | List of rule names to check for in the SARIF report. | -| ignore | array | False | List of rule IDs to ignore in the SARIF report. | -| max_allowed | integer | False | The maximum number of allowed violations. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| rule_level | array | False | List of rule levels to check for in the SARIF report. | [] | +| precision | array | False | List of precision levels to check for in the SARIF report. | [] | +| rule_ids | array | False | List of rule IDs to check for in the SARIF report. | [] | +| rule_names | array | False | List of rule names to check for in the SARIF report. | [] | +| ignore | array | False | List of rule IDs to ignore in the SARIF report. | [] | +| max_allowed | integer | False | The maximum number of allowed violations. | 0 | diff --git a/docs/configuration/initiatives/rules/sarif/verify-semgrep-report.md b/docs/configuration/initiatives/rules/sarif/verify-semgrep-report.md index 51bba1c7..780392bf 100644 --- a/docs/configuration/initiatives/rules/sarif/verify-semgrep-report.md +++ b/docs/configuration/initiatives/rules/sarif/verify-semgrep-report.md @@ -56,11 +56,11 @@ Each violation includes details such as the rule identifier, the extracted sever | predicate_type | http://docs.oasis-open.org/sarif/sarif/2.1.0 | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| rule_level | array | False | List of rule levels to check for in the SARIF report. | -| precision | array | False | List of precision levels to check for in the SARIF report. | -| rule_ids | array | False | List of rule IDs to check for in the SARIF report. | -| ignore | array | False | List of rule IDs to ignore in the SARIF report. | -| max_allowed | integer | False | The maximum number of allowed violations. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| rule_level | array | False | List of rule levels to check for in the SARIF report. | | +| precision | array | False | List of precision levels to check for in the SARIF report. | | +| rule_ids | array | False | List of rule IDs to check for in the SARIF report. | [] | +| ignore | array | False | List of rule IDs to ignore in the SARIF report. | | +| max_allowed | integer | False | The maximum number of allowed violations. | | diff --git a/docs/configuration/initiatives/rules/sbom/NTIA-compliance.md b/docs/configuration/initiatives/rules/sbom/NTIA-compliance.md index 6e824ea7..713bde05 100644 --- a/docs/configuration/initiatives/rules/sbom/NTIA-compliance.md +++ b/docs/configuration/initiatives/rules/sbom/NTIA-compliance.md @@ -77,8 +77,8 @@ It performs the following steps: | content_body_type | cyclonedx-json | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| required_author | object | False | The required author (case-insensitive match for name/email). | -| required_supplier | object | False | The required supplier (case-insensitive match for supplier name). | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| required_author | object | False | The required author (case-insensitive match for name/email). | `{}` | +| required_supplier | object | False | The required supplier (case-insensitive match for supplier name). | `{}` | diff --git a/docs/configuration/initiatives/rules/sbom/allowed-components.md b/docs/configuration/initiatives/rules/sbom/allowed-components.md index 0fcf18aa..39c1a463 100644 --- a/docs/configuration/initiatives/rules/sbom/allowed-components.md +++ b/docs/configuration/initiatives/rules/sbom/allowed-components.md @@ -63,8 +63,8 @@ It performs the following steps: | target_type | container | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| types | array | True | A list of allowed component types. | -| allowlist | array | True | A list of allowed components. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| types | array | True | A list of allowed component types. | [] | +| allowlist | array | True | A list of allowed components. | [] | diff --git a/docs/configuration/initiatives/rules/sbom/banned-licenses.md b/docs/configuration/initiatives/rules/sbom/banned-licenses.md index b0428251..c6d0f487 100644 --- a/docs/configuration/initiatives/rules/sbom/banned-licenses.md +++ b/docs/configuration/initiatives/rules/sbom/banned-licenses.md @@ -61,8 +61,8 @@ remains below the specified threshold. It performs the following steps: | target_type | container | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| blocklist | array | False | A list of disallowed licenses. | -| blocklisted_limit | integer | False | The maximum number of components with disallowed licenses allowed. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| blocklist | array | False | A list of disallowed licenses. | [] | +| blocklisted_limit | integer | False | The maximum number of components with disallowed licenses allowed. | 0 | diff --git a/docs/configuration/initiatives/rules/sbom/fresh-sbom.md b/docs/configuration/initiatives/rules/sbom/fresh-sbom.md index 2cb34b7b..e0b37a79 100644 --- a/docs/configuration/initiatives/rules/sbom/fresh-sbom.md +++ b/docs/configuration/initiatives/rules/sbom/fresh-sbom.md @@ -56,7 +56,7 @@ It performs the following steps: | content_body_type | cyclonedx-json | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| max_days | integer | False | The maximum allowed age of the SBOM in days. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| max_days | integer | False | The maximum allowed age of the SBOM in days. | 30 | diff --git a/docs/configuration/initiatives/rules/sbom/required-packages.md b/docs/configuration/initiatives/rules/sbom/required-packages.md index 7f588770..9fc3461a 100644 --- a/docs/configuration/initiatives/rules/sbom/required-packages.md +++ b/docs/configuration/initiatives/rules/sbom/required-packages.md @@ -60,8 +60,8 @@ It performs the following steps: | target_type | container | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| required_pkgs | array | True | A list of required dependencies specified as PURLs. | -| violations_limit | integer | False | The maximum number of allowed violations. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| required_pkgs | array | True | A list of required dependencies specified as PURLs. | [] | +| violations_limit | integer | False | The maximum number of allowed violations. | 0 | diff --git a/docs/configuration/initiatives/rules/sbom/verify-huggingface-license.md b/docs/configuration/initiatives/rules/sbom/verify-huggingface-license.md index 8e23d65e..bcf0fcdb 100644 --- a/docs/configuration/initiatives/rules/sbom/verify-huggingface-license.md +++ b/docs/configuration/initiatives/rules/sbom/verify-huggingface-license.md @@ -63,7 +63,7 @@ It performs the following steps: | target_type | container | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| licenses | array | True | A list of specified licenses. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| licenses | array | True | A list of specified licenses. | [] | diff --git a/docs/configuration/initiatives/rules/slsa/verify-custom-fields.md b/docs/configuration/initiatives/rules/slsa/verify-custom-fields.md index 00f59e02..1c6b4f81 100644 --- a/docs/configuration/initiatives/rules/slsa/verify-custom-fields.md +++ b/docs/configuration/initiatives/rules/slsa/verify-custom-fields.md @@ -47,7 +47,7 @@ The key must be a path within the Provenance document, and the value must be a s | content_body_type | slsa | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| fields | object | False | The expected field values to match in the provenance document given as a `key:value` map. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| fields | object | False | The expected field values to match in the provenance document given as a `key:value` map. | `{}` | diff --git a/docs/configuration/initiatives/rules/slsa/verify-external-parameters.md b/docs/configuration/initiatives/rules/slsa/verify-external-parameters.md index f78b080e..afe76add 100644 --- a/docs/configuration/initiatives/rules/slsa/verify-external-parameters.md +++ b/docs/configuration/initiatives/rules/slsa/verify-external-parameters.md @@ -58,7 +58,7 @@ The allowed parameters values can be passed to the rule in the `key: value` form | content_body_type | slsa | ## Input Definitions -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| parameters | object | False | The expected external parameters to match in the provenance document given as `key:value` map. | +| Parameter | Type | Required | Description | Default | +|-----------|------|----------|-------------| --------| +| parameters | object | False | The expected external parameters to match in the provenance document given as `key:value` map. | `{}` | diff --git a/docs/configuration/initiatives/slsa.l1.md b/docs/configuration/initiatives/slsa.l1.md index f7972a38..2ce9e11c 100644 --- a/docs/configuration/initiatives/slsa.l1.md +++ b/docs/configuration/initiatives/slsa.l1.md @@ -16,11 +16,11 @@ Evaluate SLSA Level 1 This initiative ensures that every critical build artifact includes the minimum required provenance metadata as specified in SLSA Level 1. By recording detailed information about the build process—such as timestamps, authors, and build details— organizations establish a traceable chain-of-custody for their software artifacts. -## Controls Overview +## Required Evidence -| Control Name | Control Description | Mitigation | -|--------------|---------------------|------------| -| [[provenance] Provenance exists](#provenance-provenance-exists) | This control verifies that essential provenance metadata is present for each build artifact. | Ensure that provenance metadata is present for critical build artifacts to support supply chain integrity. | +This initiative requires the following evidence types: + +- [SLSA Provenance](/docs/valint/help/valint_slsa) ## Evidence Defaults @@ -28,6 +28,12 @@ This initiative ensures that every critical build artifact includes the minimum |-------|-------| | signed | False | +## Controls Overview + +| Control Name | Control Description | Mitigation | +|--------------|---------------------|------------| +| [[provenance] Provenance exists](#provenance-provenance-exists) | This control verifies that essential provenance metadata is present for each build artifact. | Ensure that provenance metadata is present for critical build artifacts to support supply chain integrity. | + --- # Detailed Controls diff --git a/docs/configuration/initiatives/slsa.l2.md b/docs/configuration/initiatives/slsa.l2.md index 54513ea0..ad1bb667 100644 --- a/docs/configuration/initiatives/slsa.l2.md +++ b/docs/configuration/initiatives/slsa.l2.md @@ -16,11 +16,12 @@ Evaluate SLSA Level 2 Evaluate SLSA L2 and ensure that provenance information is both recorded and authenticated. This helps protect against unauthorized modifications and ensures artifact integrity." -## Controls Overview +## Required Evidence -| Control Name | Control Description | Mitigation | -|--------------|---------------------|------------| -| [[provenance] Provenance authenticated](#provenance-provenance-authenticated) | Ensure that provenance metadata for build artifacts is authenticated, confirming that it originates from a trusted source. | Authentication of provenance data prevents attackers from forging or modifying build metadata, ensuring the integrity of the software supply chain. | +This initiative requires the following evidence types: + +- [SLSA Provenance](/docs/valint/help/valint_slsa) +- [Signed SLSA Provenance](/docs/valint/help/valint_slsa) ## Evidence Defaults @@ -28,6 +29,12 @@ Evaluate SLSA L2 and ensure that provenance information is both recorded and aut |-------|-------| | signed | False | +## Controls Overview + +| Control Name | Control Description | Mitigation | +|--------------|---------------------|------------| +| [[provenance] Provenance authenticated](#provenance-provenance-authenticated) | Ensure that provenance metadata for build artifacts is authenticated, confirming that it originates from a trusted source. | Authentication of provenance data prevents attackers from forging or modifying build metadata, ensuring the integrity of the software supply chain. | + --- # Detailed Controls diff --git a/docs/configuration/initiatives/sp-800-190.md b/docs/configuration/initiatives/sp-800-190.md index c9d45f4c..fa31d9cc 100644 --- a/docs/configuration/initiatives/sp-800-190.md +++ b/docs/configuration/initiatives/sp-800-190.md @@ -12,12 +12,13 @@ title: NIST Application Container Security Initiative This initiative enforces container security controls as outlined in NIST SP 800-190. It ensures that containerized applications follow security best practices, including vulnerability scanning, trusted image sources, registry security, and proper configuration to minimize risk. The initiative enables policy-driven enforcement of security controls throughout the software development lifecycle (SDLC), providing real-time feedback to developers and enforcement in CI/CD pipelines. -## Controls Overview +## Required Evidence -| Control Name | Control Description | Mitigation | -|--------------|---------------------|------------| -| [[4.1] IMAGE COUNTERMEASURES](#41-41-image-countermeasures) | Implements security controls to reduce risks associated with container images, such as vulnerabilities, misconfigurations, and unauthorized images. The policies enforce CVE scanning, mandatory security settings, and allow only trusted sources. | Ensures that all container images meet organizational security policies before deployment. Helps reduce the attack surface by blocking images with vulnerabilities, misconfigurations, or unauthorized sources. | -| [[4.2] REGISTRY COUNTERMEASURES](#42-42-registry-countermeasures) | Implements controls to secure container image registries by enforcing HTTPS connections, verifying image freshness, and preventing stale images from being used. | Reduces risks associated with registry security, stale images, and unauthorized image pulls. Ensures that images are kept up-to-date and only retrieved from secure sources. | +This initiative requires the following evidence types: + +- [SBOM](/docs/valint/sbom) +- [Image SBOM](/docs/valint/sbom) +- [SARIF Evidence](/docs/valint/sarif) ## Evidence Defaults @@ -25,6 +26,53 @@ This initiative enforces container security controls as outlined in NIST SP 800 |-------|-------| | signed | False | +## Rule Parameters +To configure this initiative for your organization needs, the following parameters should be specified: + +- **[4.1] 4.1 IMAGE COUNTERMEASURES** + - **4.1.1 Severity-Based Vulnerabilities** + - **`severity_threshold`**: `integer` - The maximum severity level allowed for vulnerabilities. + *Default:* `5.5`. + - **`superset`**: `object` - The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. + *Default:* `{'cve': {'max': 0, 'severity': 0}}`. + - **4.1.1 High-Profile Vulnerabilities** + - **`rule_ids`**: `array` - List of CVE identifiers to check for in the Trivy SARIF report. + *Default:* `['CVE-2014-0160', 'CVE-2021-44228', 'CVE-2023-38545', 'CVE-2023-44487', 'CVE-2024-3094', 'CVE-2024-47176', 'CVE-2024-47076', 'CVE-2024-47175', 'CVE-2024-47177', 'CVE-2019-1549']`. + - **`superset`**: `object` - The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. + *Default:* `{'cve': {'max': 0, 'severity': 6, 'has_kev': True, 'vulnerabilities': ['CVE-2014-0160', 'CVE-2021-44228', 'CVE-2023-38545', 'CVE-2023-44487', 'CVE-2024-3094', 'CVE-2024-47176', 'CVE-2024-47076', 'CVE-2024-47175', 'CVE-2024-47177', 'CVE-2019-1549']}}`. + - **4.1.2 Banned Open Port 22** + - **`banned_ports`**: `array` - A list of banned ports and protocols. Each entry should be a dictionary with 'port' and 'protocol' keys. + *Default:* `[{'port': '22', 'protocol': 'tcp'}]`. + - **4.1.2 Approved Source Base Images** + - **`approved_sources`**: `array` - A list of approved base image registry URL prefixes. + - **4.1.2 Up-to-Date Base Images** + - **`max_days`**: `integer` - The maximum allowed age of the base image in days. + *Default:* `100`. + - **4.1.3 Verify Required Image Labels** + - **`labels`**: `array` - A list of required labels. + *Default:* `['org.opencontainers.image.created', 'org.opencontainers.image.revision', 'org.opencontainers.image.source', 'org.opencontainers.image.version', 'org.opencontainers.image.licenses']`. + - **4.1.5 Approved Source Base Images** + - **`approved_sources`**: `array` - A list of approved base image registry URL prefixes. + - **4.1.5 Approved Source Images** + - **`approved_sources`**: `array` - A list of approved Image source patterns. + - **4.1.5 Fresh Images** + - **`max_days`**: `integer` - The maximum allowed age of the image in days. + *Default:* `30`. +- **[4.2] 4.2 REGISTRY COUNTERMEASURES** + - **4.2.2 Up-to-Date Base Images** + - **`max_days`**: `integer` - The maximum allowed age of the base image in days. + *Default:* `100`. + - **4.2.2 Up-to-Date Derived Images** + - **`max_days`**: `integer` - The maximum allowed age of the image in days. + *Default:* `30`. + +## Controls Overview + +| Control Name | Control Description | Mitigation | +|--------------|---------------------|------------| +| [[4.1] IMAGE COUNTERMEASURES](#41-41-image-countermeasures) | Implements security controls to reduce risks associated with container images, such as vulnerabilities, misconfigurations, and unauthorized images. The policies enforce CVE scanning, mandatory security settings, and allow only trusted sources. | Ensures that all container images meet organizational security policies before deployment. Helps reduce the attack surface by blocking images with vulnerabilities, misconfigurations, or unauthorized sources. | +| [[4.2] REGISTRY COUNTERMEASURES](#42-42-registry-countermeasures) | Implements controls to secure container image registries by enforcing HTTPS connections, verifying image freshness, and preventing stale images from being used. | Reduces risks associated with registry security, stale images, and unauthorized image pulls. Ensures that images are kept up-to-date and only retrieved from secure sources. | + --- # Detailed Controls diff --git a/docs/configuration/initiatives/sp-800-53.md b/docs/configuration/initiatives/sp-800-53.md index 9a709a36..8839911e 100644 --- a/docs/configuration/initiatives/sp-800-53.md +++ b/docs/configuration/initiatives/sp-800-53.md @@ -16,13 +16,14 @@ This initiative enforces key supply chain requirements from NIST SP 800-53. It m - Provenance data to support architectural traceability, as outlined in SA-8. Both the SBOM and the provenance artifacts must be cryptographically signed to meet integrity requirements specified in SA-12. -## Controls Overview +## Required Evidence -| Control Name | Control Description | Mitigation | -|--------------|---------------------|------------| -| [[SR4_CM8] SBOM Requirement](#sr4_cm8-sbom-requirement) | Enforce that every container build includes a Software Bill of Materials (SBOM), ensuring that all components are inventoried and traceable. This requirement addresses both SR-4 and the component inventory aspects of CM-8. | Ensures complete visibility into container components, reducing the risk of unvetted or vulnerable code entering the supply chain. | -| [[SA8] Provenance Requirement](#sa8-provenance-requirement) | Enforce that every container build includes provenance data, supporting traceability within the security architecture as required by SA-8. | Provides a clear audit trail of the build process, mitigating risks related to unidentified or untraceable changes. | -| [[SA12] SBOM Signature Enforcement](#sa12-sbom-signature-enforcement) | Enforce that the SBOM is cryptographically signed to verify its integrity and authenticity, aligning with SA-12 requirements. | Prevents unauthorized modifications by ensuring that only signed SBOMs are accepted. | +This initiative requires the following evidence types: + +- [SBOM](/docs/valint/sbom) +- [Image SBOM](/docs/valint/sbom) +- [SLSA Provenance](/docs/valint/help/valint_slsa) +- [Signed SLSA Provenance](/docs/valint/help/valint_slsa) ## Evidence Defaults @@ -30,6 +31,25 @@ Both the SBOM and the provenance artifacts must be cryptographically signed to m |-------|-------| | signed | False | +## Rule Parameters +To configure this initiative for your organization needs, the following parameters should be specified: + +- **[SR4_CM8] SBOM Requirement** + - **Verify Supply Chain Labels** + - **`labels`**: `array` - A list of required labels. + *Default:* `['org.opencontainers.image.created', 'org.opencontainers.image.revision', 'org.opencontainers.image.source', 'org.opencontainers.image.version', 'org.opencontainers.image.licenses']`. + - **NTIA SBOM Compliance Check** + - **`required_author`**: `object` - The required author (case-insensitive match for name/email). + - **`required_supplier`**: `object` - The required supplier (case-insensitive match for supplier name). + +## Controls Overview + +| Control Name | Control Description | Mitigation | +|--------------|---------------------|------------| +| [[SR4_CM8] SBOM Requirement](#sr4_cm8-sbom-requirement) | Enforce that every container build includes a Software Bill of Materials (SBOM), ensuring that all components are inventoried and traceable. This requirement addresses both SR-4 and the component inventory aspects of CM-8. | Ensures complete visibility into container components, reducing the risk of unvetted or vulnerable code entering the supply chain. | +| [[SA8] Provenance Requirement](#sa8-provenance-requirement) | Enforce that every container build includes provenance data, supporting traceability within the security architecture as required by SA-8. | Provides a clear audit trail of the build process, mitigating risks related to unidentified or untraceable changes. | +| [[SA12] SBOM Signature Enforcement](#sa12-sbom-signature-enforcement) | Enforce that the SBOM is cryptographically signed to verify its integrity and authenticity, aligning with SA-12 requirements. | Prevents unauthorized modifications by ensuring that only signed SBOMs are accepted. | + --- # Detailed Controls diff --git a/docs/configuration/initiatives/ssdf.md b/docs/configuration/initiatives/ssdf.md index 23e1c8fe..35e93a37 100644 --- a/docs/configuration/initiatives/ssdf.md +++ b/docs/configuration/initiatives/ssdf.md @@ -12,6 +12,38 @@ title: SSDF Client Initiative Evaluate PS rules from the SSDF initiative +## Required Evidence + +This initiative requires the following evidence types: + +- [Signed SBOM](/docs/valint/sbom) +- [SLSA Provenance](/docs/valint/help/valint_slsa) +- [Github Organization Discovery Evidence](/docs/platforms/discover#github-discovery) +- [Github Repository Discovery Evidence](/docs/platforms/discover#github-discovery) + +## Evidence Defaults + +| Field | Value | +|-------|-------| +| signed | False | + +## Rule Parameters +To configure this initiative for your organization needs, the following parameters should be specified: + +- **[PS/PS.1/PS.1.1] Store all forms of code based on the principle of least privilege** + - **Limit admins** + - **`max_admins`**: `integer` - Maximum number of admins allowed. + *Default:* `3`. + - **Require signoff on web commits** + - **`desired_value`**: . + *Default:* `True`. + - **Branch protected** + - **`desired_protected`**: `boolean` - Desired branch protection setting. + *Default:* `True`. + - **Repo private** + - **`desired_private`**: . + *Default:* `True`. + ## Controls Overview | Control Name | Control Description | Mitigation | @@ -21,12 +53,6 @@ Evaluate PS rules from the SSDF initiative | [[PS/PS.3/PS.3.1] Securely archive the necessary files and supporting data to be retained for each software release](#psps3ps31-securely-archive-the-necessary-files-and-supporting-data-to-be-retained-for-each-software-release) | Securely archive the necessary files and supporting data (e.g., integrity verification information, provenance data) to be retained for each software release | Use secure, version-controlled repositories to store software releases and their supporting data. Implement access controls to restrict who can modify or delete these repositories. Use cryptographic signatures to sign software releases and provide a way for users to verify these signatures. Regularly back up the repositories to prevent data loss and ensure that software releases are preserved even in the event of a system failure. | | [[PS/PS.3/PS.3.2] Collect, safeguard, maintain, and share provenance data for all components of each software release](#psps3ps32-collect-safeguard-maintain-and-share-provenance-data-for-all-components-of-each-software-release) | Collect, safeguard, maintain, and share provenance data for all components of each software release (e.g., in a software bill of materials [SBOM]) | Use software bill of materials (SBOM) to document the provenance of each software release and its components. Store SBOMs in a secure, version-controlled repository to ensure they can be retrieved and analyzed in the future. Implement access controls to restrict who can modify or delete SBOMs. Use cryptographic signatures to sign SBOMs and provide a way for users to verify these signatures. Regularly back up the repository to prevent data loss and ensure that SBOMs are preserved even in the event of a system failure. Document the SBOM creation process and train personnel on its importance and proper handling procedures. | -## Evidence Defaults - -| Field | Value | -|-------|-------| -| signed | False | - --- # Detailed Controls diff --git a/docs/configuration/initiatives/sspb-gh.md b/docs/configuration/initiatives/sspb-gh.md index 1381a040..3f76e2d4 100644 --- a/docs/configuration/initiatives/sspb-gh.md +++ b/docs/configuration/initiatives/sspb-gh.md @@ -16,6 +16,63 @@ Blueprint for secure pipelines - GitHub This initiative defines a set of best practices and technical guidelines designed to safeguard every stage of the software delivery process—from code development and build, to testing and production deployment. It emphasizes the importance of ensuring code integrity, authenticating build artifacts, and continuously monitoring system changes to mitigate the risk of supply chain attacks. The framework is adaptable to various environments and aligned with industry standards, providing organizations with actionable steps to enhance their overall security posture. +## Required Evidence + +This initiative requires the following evidence types: + +- [Signed SBOM](/docs/valint/sbom) +- [Signed Image SBOM](/docs/valint/sbom) +- [Signed Generic Statement](/docs/valint/generic) +- [Signed Github Organization Discovery Evidence](/docs/platforms/discover#github-discovery) +- [Signed Github Repository Discovery Evidence](/docs/platforms/discover#github-discovery) + +## Evidence Defaults + +| Field | Value | +|-------|-------| +| signed | True | + +## Rule Parameters +To configure this initiative for your organization needs, the following parameters should be specified: + +- **[CTL-1] Restrict administrative access to CI/CD tools** + - **Limit Admin Number in GitHub Organization** + - **`max_admins`**: `integer` - Maximum number of admins allowed. + *Default:* `1`. + - **Allowed GitHub Organization Admins** + - **`allowed_admins`**: `array` - List of allowed GitHub organization admins. + *Default:* `['admin']`. +- **[CTL-5] Only dependencies from trusted registries can be used** + - **Ensure that base images are from an approved source** + - **`approved_sources`**: `array` - A list of approved base image registry URL prefixes. + *Default:* `['index.docker.io/library/.*', 'gcr.io/.*']`. + - **Verify NPM Packages Origin** + - **`allowed_registries`**: `array` - A list of allowed NPM registries. + *Default:* `['https://registry.npmjs.org/']`. +- **[CTL-6] Any critical or high severity vulnerability breaks the build** + - **Verify No Critical or High Vulnerabilities** + - **`superset`**: `object` - The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. + *Default:* `{'cve': {'severity': 6, 'max': 0}}`. +- **[CTL-7] Artifacts are stored in a repository in development, stage and production** + - **Artifacts are stored in a repository** + - **`approved_sources`**: `array` - A list of approved Image source patterns. + *Default:* `['index.docker.io/library/.*', 'gcr.io/.*']`. +- **[CTL-10] Artifacts in higher repositories are signed** + - **Artifacts are stored in a repository** + - **`approved_sources`**: `array` - A list of approved Image source patterns. + *Default:* `['index.docker.io/library/.*', 'gcr.io/.*']`. +- **[CTL-11] Available container images don’t have any high or critical vulnerabilities** + - **Verify No Critical or High Vulnerabilities** + - **`superset`**: `object` - The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. + *Default:* `{'cve': {'severity': 6, 'max': 0}}`. +- **[CTL-13] Scan deployed images in production** + - **Restrict Disallowed Dependencies** + - **`blocklist`**: . + *Default:* `['liblzma5@5.6.0', 'liblzma5@5.6.1', 'xz-utils@5.6.0', 'xz-utils@5.6.1']`. + - **Verify No Critical or High Vulnerabilities** + - **`superset`**: `object` - The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. + *Default:* `{'cve': {'severity': 6, 'max': 0}}`. + ## Controls Overview | Control Name | Control Description | Mitigation | @@ -36,12 +93,6 @@ This initiative defines a set of best practices and technical guidelines designe | [[CTL-14] Validate Kubernetes resource manifests](#ctl-14-validate-kubernetes-resource-manifests) | Validate Kubernetes resource manifests | Ensure that Kubernetes manifests are validated to prevent misconfigurations and security vulnerabilities. | | [[CTL-15] Ensure build environments are ephemeral and immutable](#ctl-15-ensure-build-environments-are-ephemeral-and-immutable) | Ensure build environments are ephemeral and immutable | Build environments should be defined in code with automated creation and teardown, and that a fresh environment is created for every build | -## Evidence Defaults - -| Field | Value | -|-------|-------| -| signed | True | - --- # Detailed Controls diff --git a/docs/configuration/initiatives/sspb-gl.md b/docs/configuration/initiatives/sspb-gl.md index e35c7bf5..aa0afc71 100644 --- a/docs/configuration/initiatives/sspb-gl.md +++ b/docs/configuration/initiatives/sspb-gl.md @@ -16,6 +16,67 @@ Blueprint for secure pipelines - Gitlab This initiative defines a set of best practices and technical guidelines designed to safeguard every stage of the software delivery process—from code development and build, to testing and production deployment. It emphasizes the importance of ensuring code integrity, authenticating build artifacts, and continuously monitoring system changes to mitigate the risk of supply chain attacks. The framework is adaptable to various environments and aligned with industry standards, providing organizations with actionable steps to enhance their overall security posture. +## Required Evidence + +This initiative requires the following evidence types: + +- [Signed SBOM](/docs/valint/sbom) +- [Signed Image SBOM](/docs/valint/sbom) +- [Signed Generic Statement](/docs/valint/generic) +- [Signed Gitlab Organization Discovery Evidence](/docs/platforms/discover#gitlab-discovery) +- [Signed Gitlab Project Discovery Evidence](/docs/platforms/discover#gitlab-discovery) + +## Evidence Defaults + +| Field | Value | +|-------|-------| +| signed | True | + +## Rule Parameters +To configure this initiative for your organization needs, the following parameters should be specified: + +- **[CTL-1] Restrict administrative access to CI/CD tools** + - **Limit Admins in GitLab Organization** + - **`max_admins`**: `number` - Maximum number of admins allowed in the GitLab organization. + *Default:* `1`. + - **Allowed Admins in GitLab Organization** + - **`allowed_admins`**: `array` - List of users allowed to have admin privileges in the GitLab organization. + *Default:* `['admin']`. +- **[CTL-4] Reduce automation access to read-only** + - **Forbid Token Scopes in GitLab Organization** + - **`project_scopes`**: `array` - List of disallowed token scopes in the GitLab organization. + *Default:* `['write_api', 'write_repository', 'write_registry', 'write_registry_image', 'write_package_registry', 'write_package', 'write_repository_hook']`. +- **[CTL-5] Only dependencies from trusted registries can be used** + - **Ensure that base images are from an approved source** + - **`approved_sources`**: `array` - A list of approved base image registry URL prefixes. + *Default:* `['index.docker.io/library/.*', 'gcr.io/.*']`. + - **Verify NPM Packages Origin** + - **`allowed_registries`**: `array` - A list of allowed NPM registries. + *Default:* `['https://registry.npmjs.org/']`. +- **[CTL-6] Any critical or high severity vulnerability breaks the build** + - **Verify No Critical or High Vulnerabilities** + - **`superset`**: `object` - The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. + *Default:* `{'cve': {'severity': 6, 'max': 0}}`. +- **[CTL-7] Artifacts are stored in a repository in development, stage and production** + - **Artifacts are stored in a repository** + - **`approved_sources`**: `array` - A list of approved Image source patterns. + *Default:* `['index.docker.io/library/.*', 'gcr.io/.*']`. +- **[CTL-10] Artifacts in higher repositories are signed** + - **Artifacts are stored in a repository** + - **`approved_sources`**: `array` - A list of approved Image source patterns. + *Default:* `['index.docker.io/library/.*', 'gcr.io/.*']`. +- **[CTL-11] Available container images don’t have any high or critical vulnerabilities** + - **Verify No Critical or High Vulnerabilities** + - **`superset`**: `object` - The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. + *Default:* `{'cve': {'severity': 6, 'max': 0}}`. +- **[CTL-13] Scan deployed images in production** + - **Restrict Disallowed Dependencies** + - **`blocklist`**: . + *Default:* `['liblzma5@5.6.0', 'liblzma5@5.6.1', 'xz-utils@5.6.0', 'xz-utils@5.6.1']`. + - **Verify No Critical or High Vulnerabilities** + - **`superset`**: `object` - The superset of CVEs to check for, including the following format [cve: [max: int, severity: int], has_kev: bool, has_fix: bool]]. + *Default:* `{'cve': {'severity': 6, 'max': 0}}`. + ## Controls Overview | Control Name | Control Description | Mitigation | @@ -36,12 +97,6 @@ This initiative defines a set of best practices and technical guidelines designe | [[CTL-14] Validate Kubernetes resource manifests](#ctl-14-validate-kubernetes-resource-manifests) | Validate Kubernetes resource manifests | Ensure that Kubernetes manifests are validated to prevent misconfigurations and security vulnerabilities. | | [[CTL-15] Ensure build environments are ephemeral and immutable](#ctl-15-ensure-build-environments-are-ephemeral-and-immutable) | Ensure build environments are ephemeral and immutable | Build environments should be defined in code with automated creation and teardown, and that a fresh environment is created for every build | -## Evidence Defaults - -| Field | Value | -|-------|-------| -| signed | True | - --- # Detailed Controls diff --git a/docs/guides/enforcing-sdlc-initiative.md b/docs/guides/enforcing-sdlc-initiative.md index 77e47aba..2d63a21f 100644 --- a/docs/guides/enforcing-sdlc-initiative.md +++ b/docs/guides/enforcing-sdlc-initiative.md @@ -446,6 +446,7 @@ To use a custom initiatives rule catalog, you can specify the path to the catalo |------|-------------| | [NIST Application Container Security Initiative](/docs/configuration/initiatives/sp-800-190.md) | This initiative enforces container security controls as outlined in NIST SP 800-190. It ensures that containerized applications follow security best practices, including vulnerability scanning, trusted image sources, registry security, and proper configuration to minimize risk. The initiative enables policy-driven enforcement of security controls throughout the software development lifecycle (SDLC), providing real-time feedback to developers and enforcement in CI/CD pipelines. | | [NIST Supply Chain Integrity Initiative](/docs/configuration/initiatives/sp-800-53.md) | This initiative enforces key supply chain requirements from NIST SP 800-53. It mandates that container builds include: - A Software Bill of Materials (SBOM) to ensure component inventory and traceability, addressing requirements from SR-4 and CM-8. - Provenance data to support architectural traceability, as outlined in SA-8. Both the SBOM and the provenance artifacts must be cryptographically signed to meet integrity requirements specified in SA-12. | +| [OWASP Top 10 CI/CD Security Controls](/docs/configuration/initiatives/owasp-top10-cicd-gh.md) | OWASP Top 10 CI/CD Security Controls - GitHub | | [SLSA L1 Framework](/docs/configuration/initiatives/slsa.l1.md) | Evaluate SLSA Level 1 | | [SLSA L2 Framework](/docs/configuration/initiatives/slsa.l2.md) | Evaluate SLSA Level 2 | | [SSDF Client Initiative](/docs/configuration/initiatives/ssdf.md) | Evaluate PS rules from the SSDF initiative | @@ -510,6 +511,22 @@ To use a custom initiatives rule catalog, you can specify the path to the catalo | [Disallow Commits to Main Branch](/docs/configuration/initiatives/rules/git/no-commit-to-main.md) | Verify commits made directly to the main branch are disallowed. | | [Disallow Unsigned Commits](/docs/configuration/initiatives/rules/git/no-unsigned-commits.md) | Verify all commits are signed. | +### SLSA Provenance + +**Evidence Type:** [SLSA Provenance](/docs/valint/help/valint_slsa) + +| Rule Name | Description | +|-----------|-------------| +| [SLSA External Parameters Match in Provenance Document](/docs/configuration/initiatives/rules/slsa/verify-external-parameters.md) | Verify the specified external parameters value match in the provenance document. | +| [Verify that provenance is authenticated](/docs/configuration/initiatives/rules/slsa/l2-provenance-authenticated.md) | Verify the artifact is signed. | +| [SLSA Field Exists in Provenance Document](/docs/configuration/initiatives/rules/slsa/field-exists.md) | Verify the specified field exists in the provenance document. | +| [Verify Provenance Document Exists](/docs/configuration/initiatives/rules/slsa/l1-provenance-exists.md) | Verify that the Provenance document evidence exists. | +| [Disallow dependencies in SLSA Provenance Document](/docs/configuration/initiatives/rules/slsa/banned-builder-deps.md) | Verify that dependencies in the block list do not appear in the SLSA Proveance document. | +| [Verify build time](/docs/configuration/initiatives/rules/slsa/build-time.md) | Verify the artifact was created within the specified time window. | +| [Verify that artifact was created by the specified builder](/docs/configuration/initiatives/rules/slsa/verify-builder.md) | Verify the artifact was created by the specified builder. | +| [Verify that artifact has no disallowed builder dependencies](/docs/configuration/initiatives/rules/slsa/verify-byproducts.md) | Verify the artifact has no disallowed builder dependencies. | +| [SLSA Field Value Matches in Provenance Document](/docs/configuration/initiatives/rules/slsa/verify-custom-fields.md) | Verify the specified field value matches in the provenance document. | + ### SARIF Evidence **Evidence Type:** [SARIF Evidence](/docs/valint/sarif) @@ -592,6 +609,7 @@ To use a custom initiatives rule catalog, you can specify the path to the catalo | [Verify secret_scanning setting](/docs/configuration/initiatives/rules/github/repository/secret-scanning.md) | Verify `secret_scanning` is configured in the GitHub repository. | | [Verify No Cache Usage Exists in Repository](/docs/configuration/initiatives/rules/github/repository/no-cache-usage.md) | Verify the GitHub repository has no cache usage. | | [Verify All Commits Are Signed in Repository](/docs/configuration/initiatives/rules/github/repository/check-signed-commits.md) | Verify all commits in the GitHub repository are signed. | +| [Repo Workflows and Pipelines Discovered](/docs/configuration/initiatives/rules/github/repository/workflows-discovered.md) | Ensure that repository pipelines discovery was not skipped. | | [Verify Only Ephemeral Runners Exist in Repository](/docs/configuration/initiatives/rules/github/repository/ephemeral-runners-only.md) | Verify self-hosted runners are disallowed in the GitHub repository. | | [Allowed Public Repositories](/docs/configuration/initiatives/rules/github/repository/visibility.md) | Verify only GitHub repositories in the Allowed List are public. | | [Verify Push Protection Setting](/docs/configuration/initiatives/rules/github/repository/push-protection.md) | Verify `secret_scanning_push_protection` is configured in the GitHub repository. | @@ -603,6 +621,7 @@ To use a custom initiatives rule catalog, you can specify the path to the catalo | Rule Name | Description | |-----------|-------------| | [Limit Admins in GitLab Organization](/docs/configuration/initiatives/rules/gitlab/org/max-admins.md) | Verify the maximum number of admins for the GitLab project is restricted. | +| [Require Gitlab Organization Discovery Evidence](/docs/configuration/initiatives/rules/gitlab/org/evidence-exists.md) | Verify the Gitlab Organization exists as evidence. | | [Ensure Active Projects in GitLab Organization](/docs/configuration/initiatives/rules/gitlab/org/inactive-projects.md) | Verify no GitLab organization projects are inactive. | | [Restrict Public Visibility in GitLab Organization](/docs/configuration/initiatives/rules/gitlab/org/projects-visibility.md) | Verify only allowed projects in the GitLab organization have public visibility. | | [Allowed Admins in GitLab Organization](/docs/configuration/initiatives/rules/gitlab/org/allow-admins.md) | Verify only users in the Allowed List have admin privileges in the GitLab organization. | @@ -635,6 +654,7 @@ To use a custom initiatives rule catalog, you can specify the path to the catalo | [Restrict Selective Code Owner Removals in GitLab](/docs/configuration/initiatives/rules/gitlab/project/selective-code-owner-removals.md) | Verify `selective_code_owner_removals` is set for the GitLab project. | | [Run Secrets Scanning in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/secrets-scanning.md) | Verify secrets scanning is performed for the GitLab project. | | [Reset Approvals on Push in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/reset-pprovals-on-push.md) | Verify `reset_approvals_on_push` is set for the GitLab project. | +| [Require Gitlab Project Discovery Evidence](/docs/configuration/initiatives/rules/gitlab/project/evidence-exists.md) | Verify the Gitlab Project exists as evidence. | | [Reject Unsigned Commits in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/reject-unsigned-commits.md) | Verify `reject_unsigned_commits` is enabled for the GitLab project. | | [Enable Commit Committer Check in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/commit-committer-check.md) | Verify `commit_committer_check` is enabled for the GitLab project. | | [Protect CI Secrets in GitLab Project](/docs/configuration/initiatives/rules/gitlab/project/protect-ci-secrets.md) | Verify secrets in the GitLab project are not shared. | @@ -745,22 +765,6 @@ To use a custom initiatives rule catalog, you can specify the path to the catalo | [Disallow Unused Users](/docs/configuration/initiatives/rules/jenkins/instance/unused-users.md) | Verify there are no users with zero activity. | | [Verify Inactive Users](/docs/configuration/initiatives/rules/jenkins/instance/inactive-users.md) | Verify there are no inactive users. | -### SLSA Provenance - -**Evidence Type:** [SLSA Provenance](/docs/valint/help/valint_slsa) - -| Rule Name | Description | -|-----------|-------------| -| [SLSA External Parameters Match in Provenance Document](/docs/configuration/initiatives/rules/slsa/verify-external-parameters.md) | Verify the specified external parameters value match in the provenance document. | -| [Verify that provenance is authenticated](/docs/configuration/initiatives/rules/slsa/l2-provenance-authenticated.md) | Verify the artifact is signed. | -| [SLSA Field Exists in Provenance Document](/docs/configuration/initiatives/rules/slsa/field-exists.md) | Verify the specified field exists in the provenance document. | -| [Verify Provenance Document Exists](/docs/configuration/initiatives/rules/slsa/l1-provenance-exists.md) | Verify that the Provenance document evidence exists. | -| [Disallow dependencies in SLSA Provenance Document](/docs/configuration/initiatives/rules/slsa/banned-builder-deps.md) | Verify that dependencies in the block list do not appear in the SLSA Proveance document. | -| [Verify build time](/docs/configuration/initiatives/rules/slsa/build-time.md) | Verify the artifact was created within the specified time window. | -| [Verify that artifact was created by the specified builder](/docs/configuration/initiatives/rules/slsa/verify-builder.md) | Verify the artifact was created by the specified builder. | -| [Verify that artifact has no disallowed builder dependencies](/docs/configuration/initiatives/rules/slsa/verify-byproducts.md) | Verify the artifact has no disallowed builder dependencies. | -| [SLSA Field Value Matches in Provenance Document](/docs/configuration/initiatives/rules/slsa/verify-custom-fields.md) | Verify the specified field value matches in the provenance document. | - ### Statement **Evidence Type:** [Statement](/docs/valint/generic) diff --git a/docs/valint/initiatives.md b/docs/valint/initiatives.md index 778767bb..b49a7560 100644 --- a/docs/valint/initiatives.md +++ b/docs/valint/initiatives.md @@ -473,6 +473,18 @@ valint verify --initiative ssdf@v2 \ --gate-type Build --gate-name "Build of My Product" ``` +## Specifying parameters for an initiative from Scribe Bundle + +To customize parameters for an initiative from the Scribe Bundle — such as specifying a list of allowed registries for the [NIST Application Container Security (SP-800-190) Initiative](../configuration/initiatives/sp-800-190) — the recommended approach is to copy the initiative configuration file from the bundle and modify it locally. + +A local initiative file enables the definition of configuration parameters specific to an organization, while still referencing rules from the Scribe Bundle. This local initiative file can then be used with the `--initiative` flag in the `valint verify` command, for example: + +```bash +valint verify --initiative my-initiative.yaml \ + --product-key -- product-version \ + --scribe.client-secret +``` + ## Using a private bundle Rules and initiatives can be provided locally or reused either from the public Scribe bundle or a private bundle managed by the user. By default, the public Scribe bundle is used.