Skip to main content

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

New Chocolatey packages can take time to appear publicly while community moderation completes. If gh-audit is not visible yet, download the .nupkg asset from GitHub Releases and install it from the folder where you saved it:

choco install gh-audit --source="'C:\path\to\package-folder'"

Direct download

Download standalone binaries, checksums, and release artifacts from GitHub Releases. Standalone executables are available for Linux (amd64), macOS (amd64, arm64), and Windows (amd64).

Quick Start

Single organization (PAT)

gh-audit discover --organization myorg --token ghp_xxxxx
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

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.

Metadata

Release files for gh-audit 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gh-audit 0.2.1
File Size Uploaded Provenance Actions
gh_audit-0.2.1.tar.gz 197.2 kB With provenance Details for gh_audit-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gh-audit 0.2.1
File Interpreter ABI Platform Actions
gh_audit-0.2.1-py3-none-any.whl Python 3 none any Details for gh_audit-0.2.1-py3-none-any.whl

Total release size: 307.8 kB

Release files / gh_audit-0.2.1.tar.gz

Download URL gh_audit-0.2.1.tar.gz
Size 197.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3ab5a583f38c34f7bed09e41c67e50f352f5bf19476b0d298c8e208d677b8d4a
BLAKE2b-256 checksum
How to use checksums
242c1d504994d3f73b574a69e2852444b995b521befcfef742c08079248dafcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.

Transparency log

Release files / gh_audit-0.2.1-py3-none-any.whl

Download URL gh_audit-0.2.1-py3-none-any.whl
Size 110.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f256ad8f6a41529b75c8a51588053900c9d73aec63c4e144b62452691859becb
BLAKE2b-256 checksum
How to use checksums
0ee169ba88c68a9a511b4538ce19eeca063aedfc0354c5b0c99dd0d4495b3169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.

Transparency log

Security for gh-audit 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gh_audit-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page