Built-in Policies¶
PipelineConductor includes built-in policies that enforce common CI/CD best practices. These policies are enabled by default.
Included Policies¶
ci/workflow-required¶
Severity: High
Requires repositories to have at least one GitHub Actions workflow.
Remediation: Create a .github/workflows/ci.yml file.
security/branch-protection¶
Severity: Medium
Requires branch protection to be enabled on the default branch.
forbid(
principal,
action == Action::"merge",
resource
)
when {
context.branchProtectionEnabled == false
};
Remediation: Enable branch protection in repository settings.
Disabling Built-in Policies¶
To use only custom policies:
Extending Built-in Policies¶
You can add custom policies alongside built-in ones:
Your custom policies will be evaluated together with built-in policies.
Policy Precedence¶
When multiple policies apply:
- Forbid always wins - If any
forbidmatches, action is denied - Permit allows - If a
permitmatches (and noforbid), action is allowed - Default deny - If no policies match, action is denied
Viewing Built-in Policies¶
Validate built-in policies to confirm they load correctly:
Output:
See Also¶
- Writing Policies - Create custom policies
- Examples - Policy examples