Blocking Rules
Blocking rules help enforce security and quality standards by preventing non-compliant code from being merged.
Overview
What it Does
Blocking rules are powerful guardrails that allow you to define specific conditions under which pull requests should be blocked from being merged. This helps ensure that your codebase adheres to your organization’s security and quality standards by preventing potentially risky or non-compliant code changes from being merged.
Who it’s For
Blocking rules are primarily designed for:
- Development teams
- Project managers
- Security professionals
This feature is particularly useful for organizations with strict compliance requirements or those working on mission-critical applications where code quality and security are paramount.
Key Features and Benefits
How it Works with GitHub
Prerequisite You must have installed and configured the Corgea GitHub App with appropriate repository permissions.
Pull Request Submission
Developer submits a pull request with code changes
Automated Analysis
System analyzes code changes against active blocking rules
Rule Validation
If violations are found, pull request is automatically blocked
Developer Notification
Developer receives detailed notification about rule violations
Resolution
Developer must fix violations and mark them as Fixed, or mark them as False Positive or Accepted Risk before merge is allowed
Usage Guide
Creating a New Blocking Rule
Initiate Creation
Click the “Add Blocking Rule” button
Basic Information
Enter rule name and description
Configure Settings
Select urgency levels (Critical, High, Medium, or Low) and/or target CWEs - at least one of these must be defined for the rule to be valid
Set Scope
Choose applicable projects (optional)
Save
Review and click “Create”
Managing Existing Rules
- Locate rule in table
- Click “Edit” button
- Modify settings as needed
- Click “Update” to save
Viewing Rules on scans
You can view blocking rules that apply to your scans in two places:
- On the scan details page, you’ll see a “Blocking Rules” section showing all rules that were evaluated:
- For individual issues, you can see which blocking rules were triggered in the issue details:
This makes it easy to understand which rules are affecting your scans and specific issues, helping you identify why certain changes may be blocked.
Examples
Best Practices
Implementation Tips
- Start with essential rules and gradually expand
- Regular review and updates
- Clear documentation and team training
- Encourage feedback and collaboration
- Strategic use of urgency levels