Imports organization members, repositories, Dependabot alerts and fine-grained access tokens from GitHub (github.com or Enterprise Server) for IAM, privileged-access, credential-hygiene and software-inventory metrics.
For the general flow of adding a source, see Connect Data Sources.
Prerequisites
A GitHub organization ā a personal account cannot be used
Being an organization owner: required to install the App, and 2FA status is only readable at that level
For GitHub Enterprise Server, the API root of your instance
A personal access token is never accepted: it cannot read the organization's token list, and it carries one person's visibility rather than the organization's
Setup
Option A ā Connect with the HARVEN GitHub App
Click Connect GitHub
On GitHub, pick the organization to read, then come back to HARVEN
Nothing to copy: the installation is recorded on your return, and the base URL and organization are filled in for you. If you are not allowed to install Apps, GitHub queues the request instead: an owner of the organization has to approve it, then click Connect GitHub again. If the form says no HARVEN GitHub App is published on your environment, use Option B.
Option B ā Use your own GitHub App
Required for GitHub Enterprise Server, which a public github.com App cannot be installed on. Follow steps 1 to 3 below, then open Use your own GitHub App in the form and fill in the fields.
Step 1 ā Determine the base URL
For github.com the URL is https://api.github.com. For GitHub Enterprise Server, use your instance's API root, e.g. https://github.example.com/api/v3.
Step 2 ā Create and install a GitHub App
Open Settings ā Developer settings ā GitHub Apps ā New GitHub App (create it from the organization if you can: it stays private and installs directly)
Grant the permissions listed below, then save
Under General ā About, note the App ID
Under General ā Private keys, click Generate a private key and keep the .pem file (shown only once)
Under Install App, install it on your organization
Step 3 ā App permissions (all read-only)
Each permission feeds one table; an App granted fewer of them still works, the tables it cannot read stay empty.
Permission | Feeds |
|---|---|
Organization ā Members | members, 2FA status, invitations |
Organization ā Personal access tokens | the access-tokens table |
Repository ā Metadata | repositories |
Repository ā Dependabot alerts | Dependabot alerts |
ā ļø Not Personal access token requests, which covers the approval workflow. Permissions added after installing must be approved by an organization owner before they take effect.
Fields to fill in HARVEN
Field | Where to find it |
|---|---|
Base URL | GitHub REST API documentation, or your Enterprise Server instance |
Organization | github.com/<organization> |
GitHub App ID | App settings ā General ā About ā App ID |
GitHub App private key | App settings ā General ā Private keys |
Collected data
org_members ā Organization members: MFA, organization role and membership state (login, role, state, two_factor_disabled)
repos ā Repositories: Source-code exposure and archived scope (full_name, visibility, private, archived)
dependabot_alerts ā Dependabot alerts: Known-vulnerable components and remediation latency (package_name, ecosystem, severity, state, fixed_at)
org_pat ā Fine-grained access tokens: Standing and dormant credentials (owner_login, token_expired, token_expires_at, token_last_used_at)
Official documentation
Need help? Contact [email protected].
