1 - Overview
GitHub Quick Review analyzes GitHub enterprises, organizations, and repositories against GitHub best practices and security recommendations.
GitHub Quick Review (ghqr) is a powerful command-line interface (CLI) tool that analyzes GitHub enterprises, organizations, and repositories to ensure compliance with GitHub best practices and security recommendations. Its main objective is to offer users a comprehensive assessment of their GitHub security posture, allowing them to easily identify security gaps, misconfigured settings, and areas for improvement.
What ghqr Checks
GitHub Enterprise Cloud / Organizations / Repositories
| Area | Scope | Examples |
|---|
| Security | Org, Repo | Dependabot alerts, secret scanning, code scanning, GHAS |
| Access Control | Org, Repo | 2FA enforcement, member privileges, SAML SSO, CODEOWNERS |
| Branch Protection | Repo | Required reviews, status checks, admin enforcement |
| Copilot | Org | Seat usage, content exclusions, policy configuration, MCP settings |
| Governance | Org | IP allow lists, repository creation policies, fork policies |
| Audit Log | Enterprise, Org | Audit log streaming, suspicious event detection |
| Community | Repo | Contributing guide, issue templates, code of conduct |
| Actions | Org, Repo | Workflow permissions, allowed actions, self-hosted runners |
| Dependencies | Repo | Dependabot version updates, security updates |
| Metadata | Repo | Description, topics, visibility, archival status |
GitHub Enterprise Server (GHES)
| Area | Examples |
|---|
| Server Configuration | Version currency, subdomain isolation, TLS, private mode |
| Authentication | Auth mode (SAML/LDAP/CAS), open signup, password authentication |
| License | Seat utilization, license expiration warnings |
| Security | GHAS enablement, secret scanning, push protection, code scanning |
| Dependencies | Dependabot alerts and security updates enablement |
| Actions | GitHub Actions enablement, self-hosted runner security |
| Audit Log | Suspicious event detection, log forwarding, staff impersonation |
| Infrastructure | Admin SSH access, site admin count, backup-utils, HA replicas |
| Admin Stats | User/org/repo counts, suspended user ratio, disabled orgs |
Scan Results
The output generated by GitHub Quick Review (ghqr) includes the following sheets when using the default Excel format:
- Recommendations: Prioritized findings with severity and category
- Organizations: Summary of all scanned organizations and their posture
- Repositories: Per-repository findings with branch protection, security features, and access settings
- Issues: All findings with recommendations and links to documentation
GitHub Quick Review (ghqr) supports three output formats:
- Excel (.xlsx) (default): Multi-sheet workbook with all findings, summaries, and links
- Markdown (.md): Text-based report suitable for inclusion in wikis or pull requests
- JSON: Machine-readable output suitable for integration with other tools or pipelines
Recommendation Severity Levels
Each recommendation is assigned one of the following severity levels:
| Severity | Description |
|---|
| critical | Immediate risk of compromise or data loss; remediate without delay |
| high | Significant security gap that should be addressed promptly |
| medium | Security control that reduces risk when implemented |
| low | Improvement that provides defense-in-depth or best-practice alignment |
| info | Observation or informational finding requiring no immediate action |
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct.
Trademark Notice
Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
2 - Install
Learn how to install GitHub Quick Review (ghqr)
Install on Linux or macOS
bash -c "$(curl -fsSL https://raw.githubusercontent.com/microsoft/ghqr/main/scripts/install.sh)"
Or download the latest release from the releases page.
Install on Windows
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/microsoft/ghqr/main/scripts/install.ps1'))
Or download the latest release from the releases page.
Install with Docker
docker pull ghcr.io/microsoft/ghqr:latest
Run a scan using Docker:
docker run --rm \
-e GITHUB_TOKEN="$GITHUB_TOKEN" \
ghcr.io/microsoft/ghqr:latest \
scan -o my-org
Build from Source
Requires Go 1.24 or higher.
git clone https://github.com/microsoft/ghqr.git
cd ghqr
make
The compiled binary is placed in the bin/ directory.
3 - Usage
Use GitHub Quick Review to analyze GitHub enterprises, organizations, and repositories.
Authentication
GitHub Quick Review (ghqr) requires a GitHub Personal Access Token (PAT). Set the GITHUB_TOKEN environment variable before running any scan.
Required Token Scopes for GitHub.com
| Scope | Purpose |
|---|
read:org | Read organization settings and members |
read:enterprise | Read enterprise settings |
repo | Read repository settings, branch protection, and security features |
read:audit_log | Read audit log configuration |
read:user | Read user information |
copilot | Read Copilot seat and policy information |
Required Token Scopes for GHES
Create a Personal Access Token on your GHES instance with these scopes:
| Scope | Purpose |
|---|
site_admin | Read server settings, license, admin stats, and audit log |
read:org | Read organization settings and members |
repo | Read repository settings and security features |
read:audit_log | Read audit log events |
Note: For GHES, ghqr reads the token from GH_TOKEN first, then falls back to GITHUB_TOKEN. Tokens without site_admin produce a degraded scan: license, admin stats, audit log, and management settings are reported as unavailable rather than treated as misconfigured.
GitHub Enterprise Cloud with Data Residency (GHE.com)
If your organization uses GitHub Enterprise Cloud with data residency, your API endpoints are on a custom ghe.com subdomain instead of github.com.
Specify your hostname using either:
Running Scans
Scan a Single Organization
export GITHUB_TOKEN=<your-personal-access-token>
ghqr scan -o my-org
Scan a GitHub Enterprise
ghqr scan -e my-enterprise
Scan a GitHub Enterprise Server Instance
export GH_TOKEN=<your-ghes-personal-access-token>
ghqr scan --ghes ghes.example.com
Scan Multiple GHES Instances
ghqr scan --ghes ghes1.example.com --ghes ghes2.example.com
ghqr scan -e my-enterprise --ghes ghes.example.com
Specify a Custom Output Name
ghqr scan -o my-org -n my-org-audit-2026
GitHub Enterprise Server (GHES) Scan Details
GitHub Quick Review supports scanning on-premise GitHub Enterprise Server instances to assess security posture, configuration best practices, and compliance.
What GHES Scan Checks
| Category | Checks |
|---|
| Server Version | Installed version detection, supported release verification |
| Authentication | Auth mode (built-in/SAML/LDAP/CAS), open signup, password auth |
| Networking | Subdomain isolation (critical), private mode, TLS enforcement |
| License | Seat utilization, expiration warnings (30/90 days) |
| Advanced Security | GHAS enablement, secret scanning, push protection, code scanning |
| Dependencies | Dependabot alerts and security updates enablement |
| Actions | GitHub Actions enablement, self-hosted runner security guidance |
| Audit Log | Suspicious event detection, log forwarding recommendations |
| Infrastructure | Site admin count, backup-utils verification, HA replica checks |
| Admin Stats | User/org/repo counts, suspended user ratio, disabled orgs |
GHES-Specific Suspicious Audit Events
The GHES audit log scanner detects these additional server-specific events:
staff.fake_login - Admin impersonation of another userstaff.unlock - Admin unlock of a user accountstaff.set_site_admin - Admin privilege escalationuser.suspend / user.unsuspend - User account state changes
These are in addition to the standard events (repo.destroy, org.remove_member, etc.).
Manual Verification Items
Some GHES configuration items cannot be verified automatically via the API. The scan report flags these for manual review:
- Audit log forwarding (syslog) - Verify in Site Admin > Monitoring > Log forwarding
- Backup configuration - Verify GitHub Enterprise Server Backup Utilities (backup-utils) are configured and tested
- High Availability (HA) - Verify replica configuration if HA is required for your deployment
GitHub Quick Review (ghqr) supports three output formats: xlsx (default), markdown, and json.
xlsx (Default)
The default output format produces an Excel workbook with multiple sheets covering all findings, organization summaries, and repository details.
markdown
Generate a Markdown report suitable for wikis, pull request descriptions, or archiving alongside code:
ghqr scan -o my-org --markdown
json
Generate a machine-readable JSON report for integration with other tools or pipelines:
ghqr scan -o my-org --json
Changing the Output File Name
Use the -n flag to set a custom output file name:
# Linux / macOS
timestamp=$(date '+%Y%m%d%H%M%S')
ghqr scan -o my-org -n "ghqr_report_$timestamp"
# Windows PowerShell
$timestamp = Get-Date -Format 'yyyyMMddHHmmss'
.\ghqr scan -o my-org -n "ghqr_report_$timestamp"
Replaying a Previous Scan
To re-evaluate rules or re-render reports without re-querying the GitHub API, replay an existing scan JSON file:
ghqr scan --from-json ghqr_20260417_143426.json
The scan stages are skipped, and a fresh output file is produced. No GitHub API calls or token are required.
Note: The JSON renderer compacts collaborators and deploy_keys arrays into summaries, so per-collaborator and per-deploy-key rules cannot be re-evaluated from a replayed file.
Generating Synthetic (Mock) Scans
For demos, report-template development, or testing the renderers without a GitHub token, generate a synthetic scan:
# 1 org with 5 repos (defaults)
ghqr mock
# 3 orgs, 10 repos each, wrapped in an enterprise
ghqr mock -o 3 -r 10 -e mock-ent --seed 42
# Generate JSON and immediately render markdown and xlsx
ghqr mock -o 5 -r 20 --profile noisy --render
Mock Command Flags
| Flag | Default | Description |
|---|
-o, --orgs | 1 | Number of organizations to synthesize |
-r, --repos | 5 | Number of repositories per organization |
-e, --enterprise | (none) | Optional enterprise slug wrapping all orgs |
--profile | typical | Distribution profile: clean, typical, or noisy |
--seed | 0 | RNG seed for reproducible output (0 = time-based) |
-O, --output | ghqr_mock_<timestamp>.json | Output JSON path |
--render | false | After writing JSON, replay it through the scan pipeline to produce md/xlsx |
MCP Server (Model Context Protocol)
GitHub Quick Review includes a Model Context Protocol (MCP) server that enables AI assistants and tools to interact with ghqr functionality. The MCP server can run in two modes.
stdio Mode (Default)
The stdio mode is designed for integration with tools like VS Code and AI assistants that communicate via standard input/output:
HTTP/SSE Mode
The HTTP/SSE mode allows the MCP server to be accessed over HTTP, enabling remote access and web-based integrations:
# Start on default port (:8080)
ghqr mcp --mode http
# Start on a custom port
ghqr mcp --mode http --addr :3000
# Start with a specific host and port
ghqr mcp --mode http --addr localhost:9090
Configuring with VS Code / GitHub Copilot
Add to your .vscode/mcp.json:
{
"servers": {
"ghqr": {
"type": "stdio",
"command": "ghqr",
"args": ["mcp"],
"env": {
"GITHUB_TOKEN": "${input:githubToken}"
}
}
}
}
| Tool | Description |
|---|
scan | Scan GitHub enterprises, organizations, or repositories for best practices and security recommendations |
The scan tool accepts these optional array arguments:
enterprises - Enterprise slugs to scanorganizations - Organization slugs to scanrepositories - Repository full names in owner/repo formatghes_instances - GHES hostnames (for example ghes.example.com)
When using ghes_instances, ensure GH_TOKEN or GITHUB_TOKEN is valid for all specified instances.
Listing All Recommendations
You can list all available recommendations in the built-in registry:
# List as a formatted table
ghqr list-recommendations
# Filter by scope
ghqr list-recommendations --scope repository
# Filter by severity
ghqr list-recommendations --severity critical
# Filter by category
ghqr list-recommendations --category branch_protection
# Output as JSON
ghqr list-recommendations --json
# Output as a Markdown table
ghqr list-recommendations --markdown
Debugging
Use the --debug flag to enable verbose logging for any command:
ghqr scan -o my-org --debug
Help
Get help for any command by running:
ghqr --help
ghqr scan --help
ghqr mcp --help
ghqr mock --help
4 - Recommendations
All best-practice recommendations evaluated by GitHub Quick Review (ghqr)
GitHub Quick Review (ghqr) evaluates your GitHub resources against the following best-practice recommendations. Each recommendation has a stable ID, scope, category, and severity level.
Recommendations are grouped by scope:
- repository - Evaluated against each scanned repository
- organization - Evaluated against each scanned organization
- enterprise - Evaluated against a GitHub Enterprise Cloud tenant
- ghes - Evaluated against a GitHub Enterprise Server appliance
Severity levels range from critical (immediate risk) to info (informational observation). See the Overview for a full description of severity levels.
| ID | Scope | Category | Severity | Title |
|---|
| ent-alert-001 | enterprise | dependencies | critical | Critical Dependabot alerts open across enterprise |
| ent-alert-002 | enterprise | dependencies | high | High-severity Dependabot alerts open across enterprise |
| ent-alert-003 | enterprise | security | high | Code scanning alerts open across enterprise |
| ent-alert-004 | enterprise | security | critical | Secret scanning alerts open across enterprise |
| ent-budget-001 | enterprise | budget | critical | No billing budgets configured |
| ent-budget-002 | enterprise | budget | high | No budgets have alerting enabled |
| ent-budget-003 | enterprise | budget | medium | Budgets without usage prevention when exceeded |
| ent-ghas-001 | enterprise | security | high | GitHub Advanced Security not enabled at enterprise level |
| ent-ghas-002 | enterprise | security | high | Secret scanning not enabled as enterprise default |
| ent-ghas-003 | enterprise | security | high | Secret scanning push protection not enabled as enterprise default |
| ent-ghas-004 | enterprise | dependencies | high | Dependabot alerts not enabled as enterprise default |
| ent-ghas-005 | enterprise | dependencies | medium | Dependabot security updates not enabled as enterprise default |
| ent-ghas-006 | enterprise | dependencies | medium | Dependency graph not enabled as enterprise default |
| ent-ghas-007 | enterprise | security | low | Secret scanning for non-provider patterns not enabled as enterprise default |
| ent-log-001 | enterprise | security | critical | Suspicious audit log events detected |
| ent-log-002 | enterprise | security | high | Audit log streaming configuration cannot be verified |
| ghes-actions-001 | ghes | actions | medium | GitHub Actions is not enabled on the GHES instance |
| ghes-actions-002 | ghes | actions | info | GitHub Actions is enabled on the GHES instance |
| ghes-actions-003 | ghes | actions | info | GitHub Actions status could not be confirmed on this GHES instance |
| ghes-audit-001 | ghes | security | critical | Suspicious audit log events detected |
| ghes-audit-002 | ghes | security | info | No suspicious audit log events detected |
| ghes-auth-001 | ghes | ghes_authentication | high | Password authentication is enabled on the GHES instance |
| ghes-auth-002 | ghes | ghes_authentication | critical | GHES is using built-in authentication instead of an external identity provider |
| ghes-auth-003 | ghes | ghes_authentication | info | GHES authentication mode observed |
| ghes-auth-004 | ghes | ghes_authentication | high | Open signup is enabled on the GHES instance |
| ghes-auth-005 | ghes | ghes_authentication | medium | High percentage of GHES users are suspended |
| ghes-infra-001 | ghes | ghes_infrastructure | medium | Administrative SSH access is enabled on the GHES instance |
| ghes-infra-002 | ghes | ghes_infrastructure | info | GHES management settings could not be read; configuration checks were skipped |
| ghes-infra-003 | ghes | security | high | Audit log forwarding configuration cannot be verified automatically |
| ghes-infra-004 | ghes | ghes_infrastructure | high | GHES backup configuration cannot be verified automatically |
| ghes-infra-005 | ghes | ghes_infrastructure | medium | High availability (HA) replica configuration cannot be verified automatically |
| ghes-infra-006 | ghes | security | high | GHES signing key rotation status cannot be verified automatically |
| ghes-license-001 | ghes | ghes_license | high | GHES license is expiring soon |
| ghes-license-002 | ghes | ghes_license | high | GHES license seat utilisation is high |
| ghes-license-003 | ghes | ghes_license | info | GHES license seat utilisation summary |
| ghes-license-004 | ghes | ghes_license | info | GHES license is unlimited |
| ghes-license-005 | ghes | ghes_license | critical | GHES license expires within 30 days |
| ghes-net-001 | ghes | ghes_networking | critical | Subdomain isolation is not enabled |
| ghes-net-002 | ghes | ghes_networking | critical | Private mode is disabled |
| ghes-net-003 | ghes | ghes_networking | medium | Public GitHub Pages are enabled on the GHES instance |
| ghes-net-004 | ghes | ghes_networking | critical | GitHub Pages is enabled while subdomain isolation is disabled |
| ghes-sec-001 | ghes | security | high | GitHub Advanced Security (GHAS) is not enabled on the GHES instance |
| ghes-sec-002 | ghes | security | high | Secret scanning is not enabled on the GHES instance |
| ghes-sec-003 | ghes | security | info | Secret scanning status could not be confirmed on this GHES instance |
| ghes-sec-004 | ghes | security | high | Secret scanning push protection is not enabled |
| ghes-sec-005 | ghes | security | high | Code scanning is not enabled on the GHES instance |
| ghes-sec-006 | ghes | security | info | Code scanning status could not be confirmed on this GHES instance |
| ghes-sec-007 | ghes | dependencies | critical | Critical Dependabot alerts open across the GHES instance |
| ghes-sec-008 | ghes | dependencies | high | High-severity Dependabot alerts open across the GHES instance |
| ghes-sec-009 | ghes | security | high | Code scanning alerts open across the GHES instance |
| ghes-sec-010 | ghes | security | critical | Secret scanning alerts open across the GHES instance |
| ghes-sec-011 | ghes | dependencies | high | Dependabot alerts are not enabled on the GHES instance |
| ghes-sec-012 | ghes | dependencies | info | Dependabot alerts status could not be confirmed on this GHES instance |
| ghes-sec-013 | ghes | dependencies | medium | Dependabot security updates are not enabled on the GHES instance |
| ghes-sec-014 | ghes | dependencies | info | Dependabot alerts API could not be confirmed on this GHES instance |
| ghes-sec-015 | ghes | security | info | Code scanning alerts API could not be confirmed on this GHES instance |
| ghes-sec-016 | ghes | security | info | Secret scanning alerts API could not be confirmed on this GHES instance |
| ghes-server-001 | ghes | ghes_server | info | GHES instance version detected |
| ghes-server-002 | ghes | ghes_server | info | GHES version is within the supported release window |
| ghes-server-003 | ghes | ghes_server | high | GHES version is no longer in support |
| ghes-server-004 | ghes | ghes_server | medium | GHES version string could not be parsed |
| ghes-server-005 | ghes | ghes_server | medium | GHES server version could not be determined |
| ghes-server-006 | ghes | ghes_server | high | GHES instance is currently in maintenance mode |
| ghes-stats-001 | ghes | ghes_server | info | GHES user population summary |
| ghes-stats-002 | ghes | ghes_server | info | GHES organization summary |
| ghes-stats-003 | ghes | ghes_server | info | GHES repository summary |
| ghes-stats-004 | ghes | ghes_server | low | Disabled organisations present on the GHES instance |
| ghes-stats-005 | ghes | access_control | high | High number of site administrators on the GHES instance |
| org-act-001 | organization | actions | high | Default GITHUB_TOKEN permission is write |
| org-act-002 | organization | actions | high | GitHub Actions allows all third-party actions |
| org-act-003 | organization | actions | low | Actions restricted to local repositories only |
| org-alert-001 | organization | dependencies | critical | Critical Dependabot alerts open across organization |
| org-alert-002 | organization | dependencies | high | High-severity Dependabot alerts open across organization |
| org-alert-003 | organization | dependencies | medium | Open Dependabot alerts across organization |
| org-alert-004 | organization | security | high | Code scanning alerts open across organization |
| org-alert-005 | organization | security | critical | Secret scanning alerts open across organization |
| org-cop-001 | organization | copilot_cost | medium | Copilot seats assigned to all organization members |
| org-cop-002 | organization | copilot_security | high | Copilot allowed to suggest code matching public repositories |
| org-cop-003 | organization | copilot_cost | medium | High percentage of inactive Copilot seats |
| org-def-001 | organization | dependencies | high | Dependabot alerts not enabled by default for new repositories |
| org-def-002 | organization | dependencies | medium | Dependabot security updates not enabled by default for new repositories |
| org-def-003 | organization | dependencies | medium | Dependency graph not enabled by default for new repositories |
| org-def-004 | organization | security | high | Secret scanning not enabled by default for new repositories |
| org-def-005 | organization | security | high | Secret scanning push protection not enabled by default for new repositories |
| org-def-006 | organization | security | medium | GitHub Advanced Security not enabled by default for new repositories |
| org-sec-001 | organization | security | high | Two-factor authentication not required |
| org-sec-002 | organization | security | medium | Web commit signoff not required |
| org-sec-003 | organization | access_control | high | Default repository permission set to admin |
| org-sec-004 | organization | access_control | medium | Members can create public repositories |
| org-sec-005 | organization | access_control | medium | No security manager team assigned |
| org-sec-006 | organization | security | info | EMU enabled: two-factor authentication is controlled by your identity provider |
| repo-acc-001 | repository | access_control | high | Excessive admin collaborators |
| repo-acc-002 | repository | access_control | medium | Direct collaborators instead of teams |
| repo-acc-003 | repository | security | high | Deploy keys with write access |
| repo-acc-004 | repository | security | medium | Unverified deploy keys |
| repo-acc-005 | repository | security | medium | Deploy keys present — consider GitHub Apps or OIDC |
| repo-bp-001 | repository | branch_protection | critical | No branch protection configured on default branch |
| repo-bp-002 | repository | branch_protection | critical | No approving reviews required before merge |
| repo-bp-003 | repository | branch_protection | medium | Only 1 approving review required |
| repo-bp-004 | repository | branch_protection | high | Stale reviews not dismissed on new commits |
| repo-bp-005 | repository | branch_protection | medium | Code owner review not required |
| repo-bp-006 | repository | branch_protection | critical | Pull request reviews not configured |
| repo-bp-007 | repository | branch_protection | high | Strict status checks not enabled |
| repo-bp-008 | repository | branch_protection | high | No specific status checks required |
| repo-bp-009 | repository | branch_protection | high | No required status checks configured |
| repo-bp-010 | repository | branch_protection | critical | Force pushes allowed on protected branch |
| repo-bp-011 | repository | branch_protection | high | Branch deletion allowed on protected branch |
| repo-bp-012 | repository | branch_protection | medium | Signed commits not required |
| repo-bp-013 | repository | branch_protection | low | Linear history not required |
| repo-bp-014 | repository | branch_protection | info | Branch protected by repository rulesets (not legacy branch protection) |
| repo-comm-001 | repository | community | info | GitHub Discussions not enabled |
| repo-feat-001 | repository | features | low | Issues and Discussions both disabled |
| repo-feat-002 | repository | maintenance | low | Auto-delete branches on merge not enabled |
| repo-meta-001 | repository | community | medium | Repository has no description |
| repo-meta-002 | repository | community | low | Repository has no topics |
| repo-meta-003 | repository | maintenance | low | Repository appears dormant but is not archived |
| repo-sec-001 | repository | security | high | Dependabot alerts not enabled |
| repo-sec-002 | repository | security | critical | Critical Dependabot alerts open |
| repo-sec-003 | repository | security | high | High-severity Dependabot alerts open |
| repo-sec-004 | repository | security | low | No SECURITY.md file found |
| repo-sec-005 | repository | access_control | medium | No CODEOWNERS file found |
| repo-sec-006 | repository | security | medium | Dependabot alerts enabled but no dependabot.yml found |
| repo-sec-007 | repository | security | high | Dependabot not configured |
| repo-sec-008 | repository | security | high | Code scanning (CodeQL) not configured |
| repo-sec-009 | repository | security | info | No custom CodeQL configuration file |
5 - Contribution Guidelines
How to contribute to the project
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Adding or Modifying Recommendations
Recommendations are stored as YAML files under internal/recommendations/definitions/. Each file maps to a scope (repository, organization, enterprise, ghes). To add a new recommendation:
Open the appropriate YAML file for the scope (e.g., internal/recommendations/definitions/repository/security.yaml).
Add a new entry following the existing schema:
- id: repo-sec-010
scope: repository
title: Short human-readable title
category: security
severity: high
description: What the check evaluates and why it matters.
recommendation: Actionable remediation guidance.
learnMore: https://docs.github.com/...
tags: [security]
enabled: true
Implement the corresponding evaluation logic in internal/scanners/bestpractices/.
Add a unit test covering the positive (issue found) and negative (no issue) paths.
Run make test before submitting your pull request.
Contributing to Documentation
The following packages are required to build and run the documentation site locally:
githugo (extended edition, version 0.110.0 or higher)nodejs (version 18 or higher)
Running the Docs Site Locally
Fork the ghqr repository and clone it locally.
Navigate to the docs folder:
Install Node modules:
Start the Hugo development server:
Open your browser at http://localhost:1313/ghqr/.
6 - Troubleshooting and Support
Troubleshooting and Support for GitHub Quick Review (ghqr)
If you encounter any issue while using GitHub Quick Review (ghqr), run the command with the --debug flag to enable verbose logging:
ghqr scan -o my-org --debug
Authentication Errors
If you receive 401 Unauthorized or 403 Forbidden errors:
- Verify your
GITHUB_TOKEN is set and valid. - Check that your token has the required scopes (see Usage - Authentication).
- For enterprise resources, ensure your token has
read:enterprise scope and that SSO is authorized for the enterprise. - If using GitHub Enterprise Cloud with Data Residency (GHE.com), ensure you pass
--hostname or set GH_HOST (see Usage - GHE.com).
GHES Connection Errors
If ghqr cannot connect to your GitHub Enterprise Server instance:
- Verify
GH_TOKEN or GITHUB_TOKEN is set and was created on the GHES instance, not on github.com. - Ensure the hostname is correct and reachable from your network (e.g.
ghes.example.com). - The token must have
site_admin scope for full scanning capabilities. - If some checks show “not available”, the token may lack sufficient permissions. Re-create the token with
site_admin scope. - GHES instances behind a VPN or firewall require network access from the machine running ghqr.
Rate Limiting
GitHub API has rate limits (5,000 requests/hour for REST, 5,000 points/hour for GraphQL). For large enterprises or organizations, ghqr handles rate limiting automatically with exponential backoff. If a scan is taking a long time, this is expected behavior for large environments.
Unexpected or Missing Findings
- Ensure your token has all the required scopes listed in Usage - Authentication.
- Confirm the organization or enterprise slug is correct and that the token has been granted SSO access if your enterprise uses SAML.
- For repositories that show no findings, verify the token has
repo scope (not just public_repo).
Support
This project uses GitHub Issues to track bugs and feature requests. Before logging an issue, please check the troubleshooting steps above.
Please search the existing issues before filing new ones to avoid duplicates.
Support for this project is limited to the resources listed above.