> ## Documentation Index
> Fetch the complete documentation index at: https://docs.forge.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

> Discover AI workloads, tools, models, and configuration in GitHub repositories.

Forge scans authorized GitHub repositories for concrete evidence of AI
applications and their dependencies. Repository evidence is joined with
endpoint, gateway, cloud, and identity signals to connect deployed activity to
the code that defines it.

The GitHub connection can also contribute provider-native non-human identities
and ownership evidence. Agent access uses a separate provider authority so
inventory collection does not silently grant Forge permission to change GitHub
access.

## Coverage

| Capability       | Implementation                                                       |
| ---------------- | -------------------------------------------------------------------- |
| Repository scope | GitHub organization or user, with an optional repository allowlist   |
| Authentication   | GitHub App installation or fine-grained access token                 |
| Revision         | Default branch and resolved Git commit                               |
| Output           | Inventory items, source references, confidence, and posture findings |
| Runtime data     | Not collected by repository scanning                                 |

## Detection

| Asset class       | Detected evidence                                                             |
| ----------------- | ----------------------------------------------------------------------------- |
| Provider SDKs     | OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI, Mistral, Cohere, and others |
| Agent frameworks  | OpenAI Agents, Vercel AI SDK, LangChain, LlamaIndex, CrewAI, AutoGen, ADK     |
| Gateways          | LiteLLM, Portkey, Helicone, Cloudflare AI Gateway, and telemetry tooling      |
| Tools             | MCP servers, function tools, code execution, and database tools               |
| Data dependencies | Vector stores, model artifacts, and referenced provider credentials           |
| Workloads         | Containers, deployment manifests, public AI endpoints, and local runtimes     |

Each observation includes the repository, revision, file path, line number,
content fingerprint, evidence quality, and confidence. Credential names may be
identified; secret values are not collected.

## Scan contract

| Limit                  | Behavior                                                                    |
| ---------------------- | --------------------------------------------------------------------------- |
| Repositories per run   | Up to 25; narrow the allowlist to scan additional repositories              |
| Candidate files        | Up to 300 per repository                                                    |
| File size              | Files larger than 256 KiB are skipped                                       |
| Generated dependencies | `.git`, `node_modules`, `vendor`, build output, lockfiles, and similar data |
| File types             | Source, JSON, YAML, TOML, Terraform, Markdown, shell, and model artifacts   |

Files with package manifests, AI/provider names, environment references, and
application source paths are prioritized before lower-signal files.

## Connection

| Field          | Description                                                       |
| -------------- | ----------------------------------------------------------------- |
| Owner          | GitHub organization or user whose repositories are in scope       |
| Authentication | GitHub App installation or fine-grained token                     |
| Repositories   | Optional allowlist; when empty, Forge lists repositories in scope |
| Installation   | GitHub App installation ID and repository selection, when used    |

## Setup

1. Open **Settings → Integrations → GitHub** and install the Forge GitHub App
   on the intended organization or user. Select only the repositories Forge
   should scan. A fine-grained token is also supported.
2. Save the owner and an optional repository allowlist. An empty allowlist uses
   the repositories visible to the installation or token, subject to the
   per-run limit.
3. Run a sync. Forge reports `observationCount`,
   `canonicalInventoryCount`, and blockers independently for each repository.

The GitHub App path records the installation ID, account login, account type,
and GitHub repository-selection mode. App credentials are exchanged for
short-lived installation access rather than stored as a user token.

## Evidence

| Field             | Meaning                                                        |
| ----------------- | -------------------------------------------------------------- |
| `kind`            | Workload, runtime, gateway, tool, data source, model, or route |
| `subtype`         | More specific asset classification                             |
| `evidenceQuality` | Static code, configuration, or deployment-manifest evidence    |
| `sourceRefs`      | Repository file, line, revision, and fingerprint               |
| `coverageGaps`    | Runtime facts that static repository evidence cannot establish |

Repository evidence does not prove live usage, prompt or response content,
tool execution, account identity, or policy enforcement. Connect a runtime
integration to establish those facts.

## Non-human identities and Agent access

When the connected GitHub scope and permissions provide the evidence, Forge
adds GitHub machine principals and credentials to **Identities → NHIs**. Review
their repository or organization scope, status, activity, credential posture,
and available ownership evidence alongside NHIs from cloud providers.

Agent identities can receive bounded GitHub access through provider-specific
access limits, profiles, revisions, and assignments. This configuration is
separate from repository scanning:

* The inventory connection discovers repositories, artifacts, and available
  identity evidence.
* The Agent access connection authorizes the exact GitHub operations Forge can
  issue for an assigned Agent identity.
* Forge activates access only after the saved boundary and provider readback
  agree.

Use [Non-human identities](/observe/non-human-identities) to investigate
existing GitHub machine access and [Agent identities](/secure/agent-identities)
to configure an autonomous workload's governed access.
