GitHub audit, governance, and inventory for organizations
Project description
gh-audit
GitHub audit, governance, and inventory for organizations.
gh-audit produces a comprehensive inventory of your GitHub organization -- repositories, members, Actions workflows, security posture, packages, and projects -- and generates JSON, HTML, and Excel reports. It supports standard (fast) and deep (thorough) scan profiles, multi-organization scanning via YAML config, and both PAT and GitHub App authentication.
A free tool by N8 Group -- DevOps Transformation. Executed with Precision.
Installation
pip (Python 3.11+)
pip install gh-audit
gh-audit --version
Homebrew (macOS / Linux)
brew tap n8group-oss/tap
brew install gh-audit
Chocolatey (Windows)
choco install gh-audit --source="https://github.com/n8group-oss/gh-audit/releases"
Direct download
Download standalone binaries from GitHub Releases. Available for Linux (amd64), macOS (amd64, arm64), and Windows (amd64).
Quick Start
Single organization (PAT)
gh-audit discover --organization myorg --token ghp_xxxxx
Single organization (GitHub App -- recommended)
gh-audit discover \
--organization myorg \
--app-id 12345 \
--private-key-path /path/to/key.pem \
--installation-id 67890
Multi-organization (config file)
gh-audit discover --config gh-audit.yml --output-dir ./results
See examples/gh-audit.yml for the config format.
Interactive setup
gh-audit init
Creates a .env file with your credentials. Then run:
gh-audit discover
Scan Profiles
| Profile | Default | What it does |
|---|---|---|
standard |
Yes | Repository metadata, PR/issue/branch counts, workflow listing, security feature status, users, packages, projects |
deep |
No | Everything in standard + recursive tree walk (large file detection), workflow YAML parsing (action usage, self-hosted runners), exact security alert counts |
gh-audit discover --organization myorg --token ghp_xxx --scan-profile deep
Individual deep features can be toggled independently:
gh-audit discover --organization myorg --token ghp_xxx \
--scan-large-files \
--scan-workflow-contents \
--security-alert-counts
Output
Every scan produces three artifacts:
| Format | File | Purpose |
|---|---|---|
| JSON | {org}-inventory.json |
Machine-readable inventory |
| HTML | {org}-report.html |
Self-contained visual report (offline, no CDN) |
| Excel | {org}-inventory.xlsx |
10-sheet workbook for analysis and sharing |
Regenerate reports from an existing inventory:
gh-audit report --inventory myorg-inventory.json
Authentication
Personal Access Token (PAT)
Required scopes (classic): repo, read:org, read:packages, read:project, security_events
Set via CLI flag, environment variable, or .env file:
export GH_AUDIT_TOKEN=ghp_xxxxx
export GH_AUDIT_ORGANIZATION=myorg
GitHub App (recommended)
Better rate limits (15,000 req/hr vs 5,000) and org-level permissions.
Required permissions: Repository metadata (read), Organization members (read), Actions (read), Packages (read), Security events (read).
export GH_AUDIT_APP_ID=12345
export GH_AUDIT_PRIVATE_KEY_PATH=/path/to/key.pem
export GH_AUDIT_INSTALLATION_ID=67890
export GH_AUDIT_ORGANIZATION=myorg
GitHub Enterprise Server
export GH_AUDIT_API_URL=https://github.mycompany.com/api/v3
Multi-Organization Config
Scan multiple organizations with different credentials in one run:
defaults:
scan_profile: standard
concurrency: 8
organizations:
- name: org-one
token: ${GH_TOKEN_ORG_ONE}
- name: org-two
app_id: 12345
private_key_path: /path/to/key.pem
installation_id: 67890
scan_profile: deep
gh-audit discover --config gh-audit.yml --output-dir ./results
Each organization gets its own output directory. A cross-org summary
(summary.json + summary.html) is generated at the root.
License
Business Source License 1.1 -- free to use for internal purposes. See LICENSE for full terms.
Contact
N8 Group -- European leader in AI-powered DevOps solutions.
- Web: n8-group.com
- Email: sales@n8-group.com
- LinkedIn: N8 Group
- Phone: +48 12 300 25 80
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gh_audit-0.1.2.tar.gz.
File metadata
- Download URL: gh_audit-0.1.2.tar.gz
- Upload date:
- Size: 193.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc122547c2fdeece4933175c9ff6730155ac2e0c814302ceea60b1dbb786ca99
|
|
| MD5 |
ded2db29f3d82e61b02ea0ae40a9433b
|
|
| BLAKE2b-256 |
6bb9ead5e6e4e26ce254039fad4dba79a74b6be9551b98c53bc18430ce011e48
|
Provenance
The following attestation bundles were made for gh_audit-0.1.2.tar.gz:
Publisher:
release.yml on n8group-oss/gh-audit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_audit-0.1.2.tar.gz -
Subject digest:
dc122547c2fdeece4933175c9ff6730155ac2e0c814302ceea60b1dbb786ca99 - Sigstore transparency entry: 1203622814
- Sigstore integration time:
-
Permalink:
n8group-oss/gh-audit@20adb58f5a02fe77aece789914800b528beb3eb1 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/n8group-oss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@20adb58f5a02fe77aece789914800b528beb3eb1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file gh_audit-0.1.2-py3-none-any.whl.
File metadata
- Download URL: gh_audit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 108.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f5600daba3edb68a272bd7b103358602c061ee590d33e8a1667eb721a25c9ff
|
|
| MD5 |
6cab2d1c69bcc3aa106acc8a81140d85
|
|
| BLAKE2b-256 |
b64879eaefa19ec59828ed66acc21dbb3228be3d15fcaa4fb3d026060445997f
|
Provenance
The following attestation bundles were made for gh_audit-0.1.2-py3-none-any.whl:
Publisher:
release.yml on n8group-oss/gh-audit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_audit-0.1.2-py3-none-any.whl -
Subject digest:
1f5600daba3edb68a272bd7b103358602c061ee590d33e8a1667eb721a25c9ff - Sigstore transparency entry: 1203622817
- Sigstore integration time:
-
Permalink:
n8group-oss/gh-audit@20adb58f5a02fe77aece789914800b528beb3eb1 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/n8group-oss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@20adb58f5a02fe77aece789914800b528beb3eb1 -
Trigger Event:
workflow_dispatch
-
Statement type: