Skip to main content
All CollectionsConnectionsGeneral Information
GitHub Organizational Rulesets
GitHub Organizational Rulesets

How does Drata support GitHub rulesets

Updated over a week ago

Drata now supports GitHub organizational rulesets in our GitHub integration for Version Control. Follow these steps to enable the Drata Autopilot system access to your organizational rulesets and apply these rulesets to the Formal Code Review Process test.

Note: Due to recent GitHub updates, Drata can now access both organizational and repository rulesets with Read-only permissions, eliminating the need for elevated access. Organization and repository rulesets are supported.

Prerequisite

To use GitHub rulesets, ensure your setup meets the following requirements:

    • Drata supports both organization and repository rulesets.

  • You must include ALL branches or the Default Branch. Default branches must be directly targeted, as paths are not supported.

  • One or more approvers must be specified.

  • Grant Administration Read permissions under Organization permissions.

Grant Administration Read permissions

To grant Administration Read permissions under Organization permissions:

  1. Log into Github as an Admin.

  2. Select your organization within Github.

    • You can access your organizations by selecting your user icon and then Your organization.

  3. Select the Settings tab and then App settings.

  4. Select Permissions & events. On the Permissions page, expand the Organization permissions section and then select Read-only for Administration permission.

  5. Save your changes

Set up organizational rulesets in GitHub

To configure organizational:

  1. Log in as an Admin in GitHub and select Your organizations.

  2. Select the relevant organization.

  3. Navigate to Settings.

  4. Expand Repository and select Repository rulesets.

Here, you can start to configure your rulesets.

Create a repository ruleset

To create or edit a ruleset:

  1. Select the New branch ruleset or select an existing ruleset to edit.

  2. Enter a Ruleset Name.

  3. Set Enforcement Status to Active.

  4. Bypass list is optional.

  5. Choose Target repositories to be one of the following:

    • All repositories

    • Dynamic list by name

    • Select repositories

      • If selected, continue and add specific repositories.


    Note: Some configurations, such as Target: Dynamic list by property, are currently not supported.


  6. Under Target branches, choose Include default branch or Include all branches.

    • Note: Default branches must be directly targeted. Paths (such as /not/supported/*/main) are not supported.

  7. Configure Branch protections:

    • Require a pull request before merging.

    • Specify Required approvals (must be 1 or more).

  8. Save changes.

Troubleshooting

If issues arise, use the JSON results from the Formal Code Review monitoring test to identify any failed repositories. Only repositories with failures are displayed; passing repositories will not appear in this list.

Did this answer your question?