This feature is only available on Chainloop’s platform paid plans.
Supported policies
The following policies are supported and can be used with the runner context data.Branch protection
- branch-deletion-blocked - Ensures that branch deletion is blocked to protect important branches from accidental deletion.
- branch-force-push-blocked - Ensures that force pushes are blocked on branches to prevent bypassing code review and history integrity.
- branch-linear-history-required - Ensures that branches require linear history to prevent merge commits and maintain a clean commit history.
- repository-rules-change-restricted - Ensures that repository rules can only be changed by approved teams, protecting against unauthorized modifications to security policies.
On GitHub, new rulesets start as Disabled: set the enforcement status to Active or the policies do not see the ruleset.
To allow specific users or teams to change branch protection, set the
allowlist input of repository-rules-change-restricted (authorized_admins in the branch-protection policy group). On GitHub, use user:<login> (or collaborator:<login>) and team:<team-slug>, for example user:alice,team:security. On GitLab, use role names such as Maintainers, user display names or group names. A GitLab allowlist replaces the default Maintainers, so list Maintainers explicitly to keep it.
Pull request protection
- pr-code-owner-review-required - Ensures that code owner reviews are required for pull requests.
- pr-conversation-resolution-required - Ensures that all conversations on pull requests must be resolved before merging.
- pr-review-required - Ensures that pull requests require a minimum number of reviewers before merging.
- pr-stale-reviews-dismissed - Ensures that stale pull request reviews are automatically dismissed when new commits are pushed.
pr-min-approvals.
Commit protection
- commits-signed-required - Ensures that all commits are signed to verify their authenticity and integrity.
Once signed commits are required on GitHub, Rebase and merge cannot be used in the GitHub UI because GitHub cannot sign rebased commits. On GitLab, commits created in the UI or API are still accepted unsigned.
Using the policy groups
The branch protection policies and the code review policies are also available as the branch-protection and code-review policy groups. Both evaluate therunner-context material, so name it that way when you add it to the attestation.
Branch patterns. The
branches input is a comma-separated list of patterns, for example main,release/*. * matches within one path segment (release/* matches release/1.0 but not release/1.0/hotfix) and ** also crosses /. If branches is not set, every branch in the runner context is checked, including unprotected feature branches, so set it to the branches you protect. The --branches flag of chainloop gather-runner-context uses the same rule.GitLab notes.
- Protected branches cannot be deleted with Git, but Maintainers and Owners can still delete them from the GitLab UI or API.
branch-deletion-blockedpasses when the branch is protected. - Merge commit with semi-linear history passes
branch-linear-history-required, but it still adds a merge commit for every merge. Use Fast-forward merge for a strictly linear history. - Allowed to unprotect is available on GitLab Premium and Ultimate and can only be set through the protected branches API.
- Protected branch settings are in Settings > Repository > Branch rules (Protected branches on older GitLab versions).
Pull request quality
These policies evaluate built-in attestation metadata captured automatically by Chainloop and do not require runner context data.- pr-description-required - Ensures that pull requests have a description providing context about the changes.
- pr-user-story-linked - Ensures that pull requests are linked to a user story or issue for traceability.
Tag protection
- tag-deletion-blocked - Ensures that tag deletion is blocked to prevent supply chain attacks via tag manipulation.
- tag-force-push-blocked - Ensures that force pushes to tags are blocked to prevent tag history rewriting.
- tag-rules-change-restricted - Ensures that tag protection rules can only be changed by authorized actors.
Patch management
- patch-policy-present - Verifies that automated patch management tooling is configured and actively monitoring third-party dependencies for known vulnerabilities. On GitHub, checks that Dependabot security updates are enabled. On GitLab, checks for the presence of a Renovate configuration file.
Immutable releases
- immutable-releases-enabled - Verifies that GitHub Immutable Releases is enabled for the repository. When enabled, published release artifacts and their associated tags cannot be modified or deleted, protecting the integrity of the software supply chain. This is a GitHub-specific feature; the policy skips on GitLab repositories.
Bot PR verification
- pr-bot-author-allowed - Verifies that a PR/MR was authored by one of the allowed bot accounts. Useful for gating workflows that should only accept PRs from automated tools such as Dependabot or Renovate.
CHAINLOOP_PR_INFO metadata and accepts an optional allowed_bots input (comma-separated list of bot login names). If not specified, it defaults to dependabot[bot] and renovate[bot].
On GitLab, bot detection relies on the
author.bot field from the Merge Request API. Regular user accounts used for automation (e.g., Renovate with a PAT) will not be detected as bots unless provisioned as a GitLab service account. Adding a regular user’s login to allowed_bots has no effect, because the policy skips any author that is not a bot. See the Gating Bot-Authored PRs guide for details.- GitHub
- GitLab
