Skip to main content

Verify Repo Visibility Setting

Type: Rule
ID: github-org-repo-visibility
Source: v2/rules/github/org/repo-visibility.yaml
Rego Source: repo-visibility.rego
Labels: GitHub, Organization

Verify only repositories in the Allowed List are public 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/repo-visibility@v2
with:
allowed_repo_names:
- "my_org/.*"
- "my_org/my_repo/.*"

Mitigation

Ensure that the repository visibility setting is configured correctly to reduce the risk of unauthorized access to repositories.

Description

This rule ensures that the repository visibility setting is configured correctly in the GitHub organization. It performs the following steps:

  1. Checks the visibility settings of repositories in the GitHub organization.
  2. Verifies that the visibility setting matches the value specified in the with.desired_visibility configuration.

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_repo_namesarrayFalseList of repository pattern allowed to be visible.