Skip to main content

Verify that members can create private repositories setting is configured

Type: Rule
ID: github-org-create-private-repos
Source: v2/rules/github/org/create-private-repos.yaml
Rego Source: create-private-repos.rego
Labels: GitHub, Organization

Verify only allowed users can create private repositories in the GitHub organization.

note

This rule requires Github Organization Discovery Evidence. See here for more details.

tip

Signed Evidence for this rule IS NOT required by default but is recommended.

warning

Rule requires evaluation with a target. Without one, it will be disabled unless the --all-evidence flag is provided.

Usage example

uses: github/org/create-private-repos@v2
with:
allowed_users:
- "user1"
- "user2"

Mitigation

Ensures that only approved users can create private repositories in the GitHub organization, reducing the risk of unauthorized repository creation.

Description

This rule ensures that only users specified in the allowed list can create private repositories in the GitHub organization. Note: this setting is supported only in GitHub Enterprise. It performs the following steps:

  1. Iterates over the users in the GitHub organization.
  2. Checks users' permissions to create private repositories against the allowed list specified in the with.allowed_users configuration.
    • If a user not on the allowed list has permission to create private repositories, the rule flags this as a violation.

Evidence Requirements:

  • Evidence must be provided by the Scribe Platform's CLI tool through scanning GitHub organization resources.

Evidence Requirements

FieldValue
signedFalse
content_body_typegeneric
target_typedata
predicate_typehttp://scribesecurity.com/evidence/discovery/v0.1
labels- platform=github
- asset_type=organization

Input Definitions

ParameterTypeRequiredDescription
allowed_usersarrayFalseList of allowed users.