GH-100 Cheatsheet
GitHub Administration
Download free PDFEnterprise platforms and support
Cloud and Server responsibilities
- **GitHub Enterprise Cloud (GHEC)** is operated by GitHub. **GitHub Enterprise Server (GHES)** is a self-hosted appliance; your administrators control infrastructure, storage and network boundaries.
- **GHES operations** include capacity planning, backups, recovery testing, monitoring and upgrades. A self-hosted deployment can run in a data center or supported cloud infrastructure.
- **Enterprise accounts** govern multiple organizations. An organization separates repositories, teams, membership and settings; enterprise policy can constrain its local choices.
Support requests and diagnostic bundles
- **GitHub Support** handles product incidents, service failures and supported installation or configuration problems. Describe business impact and urgency; separate platform issues from hardware, custom development and third-party ownership.
- **Premium Support** adds contracted support services. For an outage, check service status and provide affected users, reproduction steps, error messages and relevant logs. Route commercial requests through the appropriate billing or sales channel.
- **Support bundles** package GHES diagnostic information for a support case. Administrative SSH access is required for the command-line method; protect bundles and upload them through the support channel.
- For a standard appliance, run **ghe-support-bundle -o** through SSH as **admin** on port **122**, redirecting standard output to a local **support-bundle.tgz** file. Use the topology-appropriate bundle utility for clustered deployments.
Identity and authentication
Personal accounts and managed users
- **Personal accounts** belong to individuals and can support personal and professional collaboration. Organization membership grants work access without transferring ownership of the personal account.
- **Enterprise Managed Users (EMU)** are enterprise-controlled accounts provisioned through an identity provider. Work identities remain separate from personal accounts and have restricted collaboration outside the enterprise.
- **EMU authentication** uses the configured IdP rather than independent personal GitHub sign-in. Keep setup-account access and recovery codes available for identity-provider failures.
SAML scope and identity-provider integration
- **SAML SSO** authenticates access through an IdP. Enterprise-wide configuration gives organizations a common identity boundary; organization-level configuration manages the SSO relationship separately for each organization.
- With **personal accounts and SAML**, an authenticated GitHub session alone may not grant organization access. Applicable SSH keys and classic PATs need SSO authorization; check credential authorization when troubleshooting.
- **Partner IdPs** provide documented integration paths. A non-partner integration requires compatible **SAML 2.0** authentication and **SCIM 2.0** provisioning with appropriate configuration and support arrangements.
- **OIDC for EMU** depends on the supported IdP integration; do not assume any OIDC provider works. Test authentication and recovery before enforcing an enterprise-wide change.
SCIM, external groups and team synchronization
- **SCIM** automates identity lifecycle operations: provision users, update attributes and deprovision access. Deprovisioning a managed account suspends access; it does not delete repositories owned by an organization.
- **Group SCIM** provisions external group information for supported enterprise identity integrations. Connecting IdP groups to GitHub teams helps centralize membership management.
- **Team synchronization** maps IdP groups to GitHub teams in supported configurations. Define group-to-team mappings and team repository roles before rollout; synchronized membership is managed through the identity source.
- **Authentication, provisioning and authorization** are separate controls. SAML establishes identity, SCIM manages lifecycle, and GitHub roles or team grants determine permitted resource actions.
Access, permissions and policy
Organization and team administration
- **Organization owners** administer organization settings, base permissions, membership and billing access. They have administrative access to organization repositories; reserve this broad role for trusted administrators.
- **Team maintainers** manage their team and its membership, subject to identity synchronization and organization controls. Team administration does not confer organization ownership or unrestricted repository administration.
- **Teams and nested teams** organize access within an organization. Child teams inherit parent-team repository access; review inherited permissions before changing team structure.
- **Multiple organizations** maintain separate memberships, teams and access grants. A person can hold different roles in each organization; joining one does not expose personal repositories to the others.
Repository roles and access review
- **Read** supports viewing and cloning. **Triage** supports issue and pull-request management without code write access. **Write** supports pushing code where branch rules allow it.
- **Maintain** supports repository management without the full set of sensitive administrative powers. **Admin** controls repository settings and access, including destructive operations subject to policy.
- **Base permissions** set the default repository access for organization members. Use a low baseline and grant additional access through teams or explicit roles; Read prevents unintended writes but still exposes readable code.
- **Repository Settings: access management** shows direct collaborators and team grants. Review base access, inherited grants and effective roles together when determining who can access a repository.
- **Outside collaborators** receive access to specified organization repositories without becoming organization members. Their access and applicable authentication requirements differ from ordinary membership; do not assume organization-wide access or identical SSO behavior.
Enterprise policy, rulesets and forking
- **Enterprise policies** establish mandatory boundaries or delegate choices to organization owners. Organization and repository settings must stay within enforced enterprise restrictions.
- **Rulesets** target matching branches, tags or pushes and combine across applicable scopes. All active matching rulesets are evaluated; adding another does not replace existing rules.
- **Protected writes** may require pull requests, approvals, status checks or signed commits. For a rejected push, inspect effective permissions, matching rulesets, branch protection and bypass eligibility.
- **Private and internal repository forking** can be allowed, prohibited or delegated through enterprise policy. Organization and repository controls further govern eligible forks within that boundary.
- **Policy rollout** should document intended controls, stakeholder agreement, exceptions and changes. Review risk and audit evidence regularly; consistent enterprise policies support compliance without establishing compliance by themselves.
Security and audit
Dependencies and security updates
- **Dependency graph** inventories dependencies from supported manifests, lockfiles and submitted dependency information. **Dependabot alerts** match vulnerable dependencies against advisory information.
- **Dependabot security updates** attempt pull requests that resolve alerted vulnerabilities. **Version updates** follow configured schedules to keep dependencies current, even without a security alert.
- **.github/dependabot.yml** configures package ecosystems, directories, schedules and update behavior. Enabling scheduled updates and enabling security remediation serve different purposes.
- **Transitive dependencies** arrive through another package. Remediation may update a lockfile or a direct dependency to obtain a safe transitive version; a compatible automatic fix is not always available.
Secret scanning and exposure response
- **Secret scanning** detects supported credential patterns. For supported public-repository partner patterns, GitHub can notify the issuing provider; detection does not imply that all credentials are automatically revoked.
- **Push protection** can block supported secrets before a push completes. **Custom patterns** detect organization-specific secret formats where enabled; alerting and push prevention are separate controls.
- **Revoke or rotate exposed credentials first.** Review their use and replace affected application secrets. Removing a file or deleting a repository does not invalidate a leaked token.
- **History cleanup** follows containment when needed. Coordinate history rewriting and cleanup of forks, clones and cached views; a force push cannot erase copies already obtained by others.
Code scanning and coordinated disclosure
- **Code scanning** finds potential vulnerabilities in source code. **CodeQL** builds a representation of code that queries can analyze for semantic relationships and data flow.
- **GitHub Advanced Security capabilities** help detect code, dependency and secret risks. Availability and licensing depend on the enabled product and repository; findings still require triage and remediation.
- **SECURITY.md** explains supported versions and how researchers should report vulnerabilities securely. A reporting policy communicates a process; repository rules enforce contribution restrictions.
- **Repository security advisories** let maintainers discuss and coordinate a vulnerability privately before publishing disclosure. Use a private reporting route for sensitive findings.
Audit evidence and token investigations
- **Audit logs** record supported security and administrative events, including membership, permission and app-permission changes. Correlate actor, action, timestamp, repository or organization and available source-IP fields.
- **Token attribution** can use token identifiers or hashes, associated identity and programmatic-access type where recorded. Preserve relevant events; an audit log does not automatically contain every API request.
- **Git activity** includes clone, fetch and push event categories. Branch deletion is a distinct repository event; choose the event category and retrieval method that match the investigation.
- **REST audit APIs and streaming** support collection beyond interactive review. Older GraphQL audit interfaces covered administrative events rather than Git events; use supported REST interfaces for new integrations.
- **Continuous export** preserves evidence beyond service retention. Enable supported API-request streaming and IP disclosure in advance when required; incident-time activation cannot recover earlier missing events.
GitHub Actions administration
Workflow governance and secrets
- **Actions policies** can disable Actions or restrict allowed actions and reusable workflows. An enterprise-only allowlist excludes external Marketplace actions unless the policy explicitly permits them.
- **Organization secrets** centralize values shared across repositories. Use a visibility policy for private repositories or select specific repositories; verify coverage for the intended repository visibility.
- **Repository secrets** serve one repository. **Environment secrets** protect deployment-specific credentials and can be gated by environment approvals; the job must reference the environment.
- **Least privilege** applies to workflow token permissions and secret distribution. Review third-party action code, pin trusted revisions and avoid exposing privileged credentials to untrusted pull-request code.
Reusable workflows across repositories
- **workflow_call** declares a reusable workflow interface. The caller invokes the workflow at job level with a repository path and reference; cross-repository access must be allowed.
- **Inputs** are declared by the called workflow and passed with **with**. Caller workflow-level environment variables do not automatically become inputs to the called workflow.
- **Secrets** are explicitly passed using **secrets**, or inherited where the relationship permits **secrets: inherit**. The called repository does not automatically donate its own stored secrets to callers.
- **Outputs** expose results back to callers. Design inputs, secrets and outputs as an explicit interface; called workflows cannot elevate the caller-granted token permissions.
Runner ownership, groups and networking
- **GitHub-hosted runners** provide managed execution environments. **Self-hosted runners** give administrators control over OS, installed tools, network access and job lifecycle hooks, with corresponding maintenance duties.
- **Autoscaling and GPUs** are not exclusive to self-hosted runners. Select runner type by isolation, workload, networking and operating responsibility rather than assuming every advanced feature requires self-hosting.
- **Runner groups** authorize which repositories or organizations can use a pool. Set selected-repository access on the group; runner labels select capabilities and do not replace access controls.
- **Larger runners with static public IP ranges** provide dedicated, stable egress ranges for firewall allowlists on supported platforms. Standard hosted-runner address lists identify shared infrastructure.
- **Azure private networking** connects supported hosted larger runners to resources through an Azure VNet. It addresses private routing and network policy; GitHub-assigned static public ranges are a separate configuration.
- **Runner trust** matters: jobs execute code with the runner's network reach and available credentials. Isolate privileged workloads and use disposable execution environments when practical.
Apps, tokens and API integrations
GitHub Apps, OAuth Apps and machine accounts
- **GitHub Apps** use fine-grained permissions and installations scoped to selected resources. Installation tokens are short lived, making apps suitable for service automation without tying it to a person's PAT.
- **OAuth Apps** generally act with a consenting user's granted scopes. A **machine account** is a dedicated user account for automation and still needs credential, membership and access lifecycle management.
- **App installation rate limits** use the applicable installation and enterprise rules. They can scale differently from user-token limits; evaluate the actual endpoint and authentication type rather than assuming unlimited access.
- **GitHub Marketplace** offers ready-made integrations, often delivered as apps. Review permissions, installation scope, vendor trust and data handling before approval.
- **GitHub Actions** runs event-triggered workflows and reusable steps on runners. An app is an integration identity with APIs and webhooks; apps and Actions can complement each other across repositories.
Token scope and resilient API consumption
- **Fine-grained PATs** select a resource owner, repositories and explicit permissions. **Classic PATs** use broader scopes. Set expiration and follow organization approval or restriction policies.
- **PATs act as their user**, so permissions and account access constrain them. Prefer installation tokens for app-owned automation and rotate credentials without interrupting unrelated integrations.
- **Webhooks** deliver subscribed events such as repository creation to an integration. A vendor app can supply this behavior without a custom enterprise workflow; install it at the required scope.
- **API reliability** requires pagination, appropriate caching and retry handling. Honor rate-limit and retry headers, back off on throttling and avoid token rotation intended to bypass limits.
Usage, billing and cost control
Licenses and account lifecycle
- **Enterprise licensing** and **metered product usage** are separate billing dimensions. Reconcile assigned or billable users against the enterprise's agreement rather than inferring cost from repository activity.
- **EMU provisioning** affects the enterprise user inventory. Dormancy alone does not prove a user is free; review billable-user reports and the effect of suspension or deprovisioning under the applicable plan.
- **Access reviews** identify inactive users, stale collaborators, redundant grants and unused subscriptions. Remove access through the correct identity source so synchronization does not restore it.
Usage reporting and Actions costs
- **Billing reports** help attribute licensed products and metered consumption. Review supported Copilot usage and license reports alongside Actions, Packages and Git LFS consumption; engagement metrics such as Discussions activity are different.
- **Hosted Actions compute** depends on execution duration, operating system and runner size or type. Workflow-file count and contributor count do not directly measure consumed compute.
- **Storage and data transfer** can add charges for applicable products. Review retained artifacts, package storage and Git LFS usage separately from runner execution.
- **Cost controls** combine usage reports, budgets or alerts and deliberate retention or concurrency choices. Validate budget enforcement settings; a notification by itself does not stop usage.