Overview
Control gates are checkpoints in your software supply chain that enforce specific policies and security checks. They ensure that only compliant artifacts and pieces of evidence progress through the pipeline, enhancing the overall security and integrity of your software delivery process. Control gates can be configured to evaluate various criteria, such as vulnerability scans, license compliance, code quality metrics, and more. By implementing control gates, organizations can automate the enforcement of security and compliance standards, reducing the risk of introducing vulnerabilities into production environments.Implementing Control and Quality Gates with Chainloop
In Chainloop, control gates are implemented through policies that are evaluated against pieces of evidence (materials), entire attestation documents, or stored compliance data. These policies serve as acceptance criteria for the organization to ingest those materials or to proceed with further steps in the software supply chain. If a control gate policy evaluation fails, the CLI commandchainloop attestation push will return a non-zero exit code but the attestation is still sent to Chainloop. This approach ensures that all activities are tracked, even those that do not meet compliance standards.
Configuring enforcement
Policies enforcement (gating) can be configured as a default for the organization and/or on a per policy basis.Organization default
Global policy enforcement can be set globally by organization administrators. This will affect to all products and contracts within the organization. Please refer to Policies section for further reference. By selecting this option you’ll be effectively blocking the pipeline workflow runs that do not meet the compliance standards.- Web UI
- CLI
To enable organization-wide control gates, navigate to the Organization Settings in the Chainloop Web UI (only available in paid plans).

Fine-grained per policy
You can also enable gating capabilities to specific policies by adding thegate property in the policy attachment in the contract. This allows for more granular control over specific products or services. Policies defined at the contract level will override organization-wide policies.
To set control gate policies at the contract level, include the gate flag in your policy definition:
Using control gates in your CI/CD pipeline
A typical use case for control gates is to enforce security checks before allowing an artifact to be promoted to production. For example, you might want to ensure that no critical vulnerabilities are present in the codebase before proceeding with a release. This will be usually done in the CI/CD pipeline, where thechainloop attestation push command is executed after running security scans and tests. If the control gate policies are not met, the pipeline can be configured to halt further steps, preventing non-compliant artifacts from being deployed.
chainloop attestation push command will return a non-zero exit code, indicating that the attestation did not pass the required checks. This mechanism helps prevent non-compliant artifacts from progressing through the CI/CD pipeline.

Bypassing Control Gates
While blocking pipelines with control gates is essential for maintaining security and compliance standards, there are situations where developers may need to bypass these checks temporarily. For example, during urgent hotfixes or when investigating false positives. Chainloop provides the--exception-bypass-policy-check flag to handle these scenarios:

Examples
Example 1: check compliance requirements for my project
This feature is only available on Chainloop’s platform paid plans.
chainloop.project_compliance built-in function which is only available for paid plans.
Example 2: check required pieces of evidence
This feature is only available on Chainloop’s platform paid plans.
chainloop.evidence built-in function which is only available for paid plans.
