Overview
The GitHub (NHI) integration gives Lumos read-only visibility into the non-human identities, credentials, and automation surfaces inside your GitHub organization. Once connected, the Lumos NHI Security Analysis agent automatically scans these resources and surfaces security findings. Each finding includes a severity, supporting evidence, and a recommended remediation, so your team can act without searching through GitHub’s settings. This integration uses two GitHub authentication methods together: a GitHub OAuth App and a GitHub App. Setup typically takes a few minutes, and findings arrive after the agent’s first run.What Lumos Does
Findings from this integration go to the GitHub NHI Threat Hunter Agent. The agent is in beta, and access is by invitation, so contact your Lumos account team or CSM to request it. Lumos agents identify and analyze risks across your entire environment: Identities and membership- Organization members and their org-level roles (owner, member, billing manager)
- Outside collaborators (can be excluded via the Exclude Outside Collaborators setting)
- Machine users (non-human accounts used for automation)
- SAML identities mapped to GitHub accounts, when the Use SAML Identities setting is enabled and your org has SAML SSO configured
- Personal Access Tokens issued at the organization level (classic and fine-grained), including scopes and expiry
- OAuth Apps with access to the organization and the tokens they hold
- GitHub Apps installed in the organization, including their granted permissions and installation scope
- Deploy keys configured on repositories
- SSH keys attached to user accounts
- GPG keys attached to user accounts
- Self-hosted runners registered at the organization and repository level
- GitHub Actions configuration on repositories
- Repository and organization Actions secrets (inventory and last-updated metadata; values are never read)
- Environments and their protection rules
- Repository administration settings
- Organization administration settings
- Repository and organization webhooks, including endpoint targets and whether a webhook secret is set
- Enterprise slug is required on the connection form and identifies this connection
What the NHI Security Analysis agent looks for
Each time the agent runs, it reviews your GitHub data and produces findings such as:- Personal Access Tokens that are over-scoped, never expire, or haven’t been used in a long time
- Deploy keys that grant write access, are orphaned, or shouldn’t exist on the repository
- GitHub Apps installed with admin-level scopes whose owners have left the organization
- OAuth tokens still issued to third-party apps that are no longer in active use
- Machine users with privileged scopes and no clear owner
- Webhooks with no secret configured or pointed at unexpected endpoints
- Self-hosted runners that are unowned or attached at an unexpectedly broad scope
- Compound-risk patterns, for example, a long-lived organization-admin PAT held by a machine user that has no matching SAML identity
Required scopes and permissions
Lumos connects via two GitHub apps. The minimum scopes and permissions for each are listed below. These are all read-only. GitHub App — Required Permissions
Providing additional scopes lets the agent investigate and raise more issues. The full list of scopes Lumos recommends is:
- Repository permissions
- Actions, Administration, Code scanning alerts, Codespaces, Environments, Metadata, Repository security advisories, Secret scanning alerts, Secrets, Webhooks
- Organization permissions
- Administration, Custom organization roles, Custom properties, Custom repository roles, Events, Members, Models, Organization codespaces, Organization innersource vulnerabilities, Personal access tokens, Projects, Secrets, Self-hosted runners, Webhooks
- Account permissions
- GPG keys, Git SSH keys, SSH signing keys
- Enterprise permissions
- Audit log, Custom properties, Enterprise custom organization roles, Enterprise custom properties for organizations, Enterprise innersource vulnerabilities, Enterprise organization installation repositories, Enterprise organization installations, Enterprise people, Enterprise single sign-on, Enterprise teams, Enterprise administration
- read:public_key
- read:gpg_key
- read:audit_log
- read:user
- read:org
Settings reference
Setup
You’ll register two apps in GitHub and paste their values into the Lumos connection form. Before you start, in the Lumos app, go to Integrations, open the Discover tab, and search for “GitHub (NHI)”. Keep the form open while you work through the steps below. Before you start, watch the setup video for this version to see what is required.Step 1 — Register a GitHub OAuth App
- Go to GitHub Developer Settings and select OAuth Apps in the left sidebar.
- Click New OAuth App (or Register a new application).
- Fill in the required details:
- Application name — any descriptive name
- Homepage URL — any valid URL
- Authorization callback URL —
https://app.lumosidentity.com/integrations/ics_oauth2_callback
- Click Register application.
- Copy the Client ID value and paste it into the Client ID field in Lumos.
- Click Generate a new client secret, then copy the secret into the Client Secret field in Lumos. Save it immediately. GitHub doesn’t show it again.
Step 2 — Register a GitHub App
You can install the GitHub App on a single organization, or on several organizations in your GitHub enterprise. Lumos finds each installation automatically.- Go to GitHub Developer Settings → GitHub Apps and click New GitHub App.
- Fill in the required details (name, an arbitrary homepage URL).
- Set the following permissions, all Read-only:
- Repository permissions: Actions, Administration, Environments, Secrets, Webhooks
- Organization permissions: Administration, Members, Personal access tokens, Secrets, Self-hosted runners, Webhooks
- Account permissions: Git SSH keys
- Choose where the app can be installed: Only on this account to install it on one organization, or Any account if it should cover several organizations in your enterprise. Then create the GitHub App.
- Under General → About, copy the App ID and paste it into the App ID field in Lumos.
- Under General → Private keys, click Generate a private key. A
.pemfile downloads. Open it and paste the full contents into the Private Key field in Lumos. - In the left sidebar, click Install App, choose the organization or account to install on, and confirm. Lumos finds the installation automatically, so there’s no Installation ID to copy.
Step 3 — Finish configuring in Lumos
- Enter your Enterprise slug. The connection form requires it.
- (Optional) Toggle Exclude Outside Collaborators or Use SAML Identities to match how your organization manages identity.
- Click Complete. Findings arrive after the agent’s first run.
Notes
- All resources listed above are accessed read-only. Lumos cannot modify GitHub configuration, secrets, tokens, or memberships through this integration.
- Secret values (for Actions secrets, webhook secrets, etc.) are never read. Only their presence and metadata are analyzed.
- This integration sits alongside the Lumos Microsoft Entra ID (NHI) and AWS IAM Identity Center (NHI) integrations.
Troubleshooting
“GitHub App ID or Private Key is invalid.” The App ID and private key don’t belong to the same GitHub App, or the key was revoked. Copy the App ID from General → About again, generate a new private key if needed, and paste the full.pem contents.
“The GitHub App ’…’ is missing required permissions.” The message lists each missing permission. In the GitHub App’s settings, grant each one as Read-only (see Step 2), then try again.
“OAuth token is missing required scopes.” Reconnect so the authorization flow requests the scopes listed under GitHub OAuth App — required scopes.
“The GitHub App isn’t installed on any organization.” Install the GitHub App on at least one organization (Step 2), then try again.
A sync error on the integration tile. GitHub (NHI) doesn’t run a sync, so you can ignore a sync error on its tile. A “Connection lost” banner is real and means the OAuth App or GitHub App credentials were revoked, expired, or uninstalled. See NHI Connector Sync Status.
If the problem persists, contact Lumos support.