Github
GitHub is a web-based platform for version control, source code management, and collaborative software development. This integration provides comprehensive access to GitHub's organizational data, repositories, workflows, security features, and audit capabilities, enabling teams to query and analyze their entire GitHub environment for security, compliance, DevOps, and operational insights.
| Category | Source control & CI/CD |
| Direction | Query source |
| Sign-in | Access Token |
| Query languages | SQLite |
| Tables | 71 |
| Query templates | 251 |
| Website | github.com |
Before you start
Huntbase signs in to Github with Access Token. Create the credential in Github first, then keep it to hand for the Connect step.
- In GitHub, go to Settings › Developer settings › Personal access tokens › Fine-grained tokens and click Generate new token.
- Enter a token name and pick an expiration date.
- Under Resource owner, select the user or organization whose data you want to query. If the organization requires approval, enter a justification.
- Choose the repository access and grant read-only permissions for the data you want to query, then click Generate token and copy it.
Permissions:
- If you use a classic token instead (Tokens (classic)), grant
repo,read:org,gist,read:useranduser:email.
- A fine-grained token can only access resources owned by the resource owner you select when you create it.
- The classic
reposcope includes write access. Use a fine-grained token with read-only permissions when you can.
For the vendor's own instructions, see GitHub personal access token documentation.
Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.
Connect Github
- Go to Connections and click New connection, or click New connection on the Github product page.
- On Product, pick Github and choose the Owner.
- On Details, give the connection a Name and, optionally, a Description.
- On Connect, fill in the settings and credentials described below.
- On Verify, review the summary and click Create & check.
For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.
Settings
Where your Github lives:
| Field | Required | Notes |
|---|---|---|
| Base URL (for GitHub Enterprise) | No | Leave blank for github.com. For GitHub Enterprise Server, enter your instance URL, such as https://github.example.com. |
| GitHub App ID | No | |
| GitHub App Installation ID | No |
Credentials
The only Method is Access Token. Enter a Credential label (for example Production), then fill in:
| Field | Required | Notes |
|---|---|---|
| Access Token | Yes | Secret — not shown again after you save it. |
Query it
Once connected, Github can serve these languages in a query tab, and Scout can use it when you ask in Auto:
| Language | Use it for |
|---|---|
| SQLite | SQL over the 71 tables listed below, alongside every other connected source. |
Example: SQLite
List your gists — Identify and review all the gists you have created on GitHub.
select
*
from
github_my_gist;
Github ships with 251 query templates. Find them in Library › Queries — see Query templates.
What syncs automatically
Github comes with a content pack. These queries run on a schedule on each new connection so the entities they find appear in the Activity Feed without you asking. You can turn syncing off from the connection's Synchronisation Settings card.
| Query | Finds |
|---|---|
| Sync repositories | resource, user |
| Sync organization members | organization, user |
| Sync SAML identities | organization, user, url |
| Sync teams | group, organization |
| Sync repository collaborators | user, resource |
| Sync organization security settings | organization |
Tables
Github adds 71 tables. Browse their columns from Schema in the query bar's ⋯ menu.
All 71 tables
| Table | Contains |
|---|---|
github_actions_artifact | Artifacts allow you to share data between jobs in a workflow and store data once that workflow has completed. |
github_actions_cache | Caches are a built-in storage mechanism to speed up jobs in a workflow by persisting data for re-use. |
github_actions_environment_variable | Variables are unencrypted environment variables that you create in a repository environment for use in GitHub Actions workflows. |
github_actions_organization_variable | Variables are unencrypted environment variables created in an organization for use in GitHub Actions workflows. |
github_actions_repository_runner | The runner is the application that runs a job from a GitHub Actions workflow |
github_actions_repository_secret | Secrets are encrypted environment variables that you create in a repository |
github_actions_repository_variable | Variables are unencrypted environment variables created in a repository for use in GitHub Actions workflows. |
github_actions_repository_workflow_job | WorkflowJob represents a repository action workflow job |
github_actions_repository_workflow_run | WorkflowRun represents a repository action workflow run |
github_audit_log | Gets the audit logs for an organization. |
github_blob | Gets a blob from a repository. |
github_branch | Branches in the given repository. |
github_branch_protection | Branch protection defines rules for pushing to and managing a branch. |
github_code_owner | Individuals or teams that are responsible for code in a repository. |
github_commit | GitHub Commits bundle project files for download by users. |
github_community_profile | Community profile information for the given repository. |
github_gist | GitHub Gist is a simple way to share snippets and pastes with others. |
github_gitignore | GitHub defined .gitignore templates that you can associate with your repository. |
github_issue | GitHub Issues are used to track ideas, enhancements, tasks, or bugs for work on GitHub. |
github_issue_comment | GitHub Issue Comments are the responses/comments on GitHub Issues. |
github_license | GitHub Licenses are common software licenses that you can associate with your repository. |
github_my_gist | GitHub Gists owned by you. GitHub Gist is a simple way to share snippets and pastes with others. |
github_my_issue | GitHub Issues owned by you. GitHub Issues are used to track ideas, enhancements, tasks, or bugs for work on GitHub. |
github_my_organization | GitHub Organizations that you are a member of. GitHub Organizations are shared accounts where businesses and open-source projects can collaborate across many projects at once. |
github_my_repository | GitHub Repositories that you are associated with. GitHub Repositories contain all of your project's files and each file's revision history. |
github_my_star | GitHub stars owned by you. GitHub stars are repositories. |
github_my_team | GitHub Teams that you belong to in your organization. GitHub Teams are groups of organization members that reflect your company or group's structure with cascading access permissions and mentions. |
github_organization | GitHub Organizations are shared accounts where businesses and open-source projects can collaborate across many projects at once. |
github_organization_collaborator | GitHub members for a given organization. GitHub Users are user accounts in GitHub. |
github_organization_dependabot_alert | Dependabot alerts from an organization. |
github_organization_external_identity | GitHub members for a given organization. GitHub Users are user accounts in GitHub. |
github_organization_member | GitHub members for a given organization. GitHub Users are user accounts in GitHub. |
github_organization_ruleset | Retrieve the rulesets of a specified GitHub organization. |
github_package | GitHub Packages allow you to store and manage packages such as container images or other artifacts in your GitHub repositories. |
github_package_version | GitHub Packages allow you to store and manage packages such as container images or other artifacts in your GitHub repositories. |
github_pull_request | GitHub Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch. |
github_pull_request_comment | Comments are the responses/comments on Pull Requests. |
github_pull_request_review | Pull Request Reviews are groups of pull request review comments on a pull request. |
github_rate_limit | Rate limit of github. |
github_rate_limit_graphql | Rate limit information for GitHub GraphQL API endpoint. |
github_release | GitHub Releases bundle project files for download by users. |
github_repository | GitHub Repositories contain all of your project's files and each file's revision history. |
github_repository_collaborator | Collaborators are users that have contributed to the repository. |
github_repository_content | List the content in a repository (list directory, or get file content |
github_repository_dependabot_alert | Dependabot alerts from a repository. |
github_repository_deployment | GitHub Deployments are releases of the app/service/etc to an environment. |
github_repository_discussion | GitHub Discussions are conversations that can be started by anyone and are organized into categories. |
github_repository_environment | GitHub Environments are named deployment targets, usually isolated for usage such as test, prod, staging, etc. |
github_repository_ruleset | Retrieve the rulesets of a specified GitHub repository. |
github_repository_sbom | Get the software bill of materials (SBOM) for a repository. |
github_repository_vulnerability_alert | Vulnerability Alerts from a repository. |
github_search_code | Searches for query terms inside of a file. |
github_search_commit | Find commits via various criteria on the default branch (usually master). |
github_search_issue | Find issues by state and keyword. |
github_search_label | Find labels in a repository with names or descriptions that match search keywords. |
github_search_pull_request | Find pull requests by state and keyword. |
github_search_repository | Find repositories via various criteria. |
github_search_topic | Find topics via various criteria. |
github_search_user | Find users via various criteria. |
github_stargazer | Stargazers are users who have starred the repository. |
github_tag | Tags for commits in the given repository. |
github_team | GitHub Teams in a given organization. GitHub Teams are groups of organization members that reflect your company or group's structure with cascading access permissions and mentions. |
github_team_member | GitHub members for a given team. GitHub Users are user accounts in GitHub. |
github_team_repository | GitHub Repositories that a given team is associated with. GitHub Repositories contain all of your project's files and each file's revision history. |
github_traffic_clone_daily | Daily traffic clone stats over the last 14 days for the given repository. |
github_traffic_clone_weekly | Weekly traffic clone stats over the last 14 days for the given repository. |
github_traffic_view_daily | Daily traffic view over the last 14 days for the given repository. |
github_traffic_view_weekly | Weekly traffic view over the last 14 days for the given repository. |
github_tree | Lists directories and files in the given repository's git tree. |
github_user | GitHub Users are user accounts in GitHub. |
github_workflow | GitHub Workflows bundle project files for download by users. |
Next steps
- Connections — health, credentials and settings after you connect
- Query languages — syntax, parameters and time ranges
- Chatting with Scout — ask questions without writing a query
- All integrations — the rest of the catalog