Check ID: repository_default_branch_status_checks_required
Provider: GitHub
Service: repository
Severity: HIGH
Categories: ci-cd
Resource type: NotDefined

What this check verifies

GitHub repository default branch uses required status checks, indicating whether merges are gated by successful check results on pull requests

Risk

Without required checks, unvetted commits can be merged, degrading code integrity and availability. Skipped or failing validations may introduce vulnerable dependencies, break builds, or allow malicious code, enabling supply-chain compromise and rapid propagation to production.

Recommendation

Enforce branch protection to require status checks on the default branch.
  • Gate merges on build, tests, and security scans
  • Use require up-to-date behavior to reduce integration risk
  • Apply to admins and limit bypasses
  • Combine with least privilege and required reviews for defense in depth

Remediation

gh api -X PATCH repos/<OWNER>/<REPO>/branches/<DEFAULT_BRANCH>/protection/required_status_checks -f strict=false -F contexts[]=<CHECK_NAME>

References

Where this check fires

This check runs on every scheduled scan against your GitHub account. Findings appear at Cloud Security → Findings filterable by Check ID = repository_default_branch_status_checks_required. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to GitHub checks