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.
This rule requires Github Organization Discovery Evidence. See here for more details.
Signed Evidence for this rule IS NOT required by default but is recommended.
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:
- Checks the visibility settings of repositories in the GitHub organization.
- 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
Field | Value |
---|---|
signed | False |
content_body_type | generic |
target_type | data |
predicate_type | http://scribesecurity.com/evidence/discovery/v0.1 |
labels | - platform=github - asset_type=organization |
Input Definitions
Parameter | Type | Required | Description |
---|---|---|---|
allowed_repo_names | array | False | List of repository pattern allowed to be visible. |