- 12 Mar 2023
- 2 Minutes to read
- Updated on 12 Mar 2023
- 2 Minutes to read
GitHub provides hosting for software development version control using Git, including distributed version control and source code management (SCM) functionality.
Types of Assets Fetched
This adapter fetches the following types of assets:
- GitHub Domain (required, default: https://api.github.com) - The hostname or IP address of the GitHub server.
- Organization (optional) - The organization for the GitHub account. To connect this adapter, either this setting must be set or the Fetch all organizations for logged user setting on the Advanced Configuration screen. You can also fetch data without specifiying the Organization, see Fetching data without Specifying the Organization.
- Authorization Token (optional) - Specify the personal access token that has read access. For details, see Creating the Authorization Token. If you authenticate using GitHub App leave this field blank.
- Authenticate using GitHub App - Select to authenticate using the GitHub App. Make sure you add the 'org' scope.
- GitHub App's ID - Github app's ID, can be found under the GitHub app's page. Only use if authenticating with GitHub app.
- App Key File (pem) - Click Upload File to upload the GitHub app's pem key file. You can download this through the GitHub app's page. Only use if authenticating with GitHub App.
- Verify SSL - Select to verify the SSL certificate offered by the value supplied in GitHub Domain. For more details, see SSL Trust & CA Settings.
- HTTPS Proxy (optional) - A proxy to use when connecting to the value supplied in GitHub Domain.
- For details on the common adapter connection parameters and buttons, see Adding a New Adapter Connection.
From Version 4.6, Advanced settings can either apply for all connections for this adapter, or you can set different advanced settings and/or different scheduling for a specific connection, refer to Advanced Configuration for Adapters.
Fetch public organizations for users - Select whether to fetch the public organizations each user is a member.
- If disabled, this adapter will not fetch the public organizations each user is a member of. As a result, the fetch time will be shorter.
Fetch public gists for users - Select whether to fetch data about public gists for users.
Fetch all organizations for logged user - Select whether to fetch all organizations for the logged user. To connect this adapter, either this setting must be set or the Organizations setting for each connection's basic configuration.
Fetch user role and organization data - Select whether to fetch each user role in the organization and additional information about the organization.
For details on general advanced settings under the Adapter Configuration tab, see Adapter Advanced Settings.
Axonius uses the GitHub API.
Creating the Authorization Token
To create a personal access token:
- From GitHub, navigate to Settings > Developer Settings > Personal access token.
- Generate a new token and then give the following read-only permissions:
- To use a personal access token with an organization that uses SAML single sign-on (SSO), you must first authorize the token. For details, see GitHub Docs - Authorizing a personal access token for use with SAML single sign-on.
Fetching Data Without Specifying the Organization
It is possible to fetch data without specifying the organization.
- Go to GitHub Settings
- Select Developer settings
- Select GitHub App, then select 'Your App', and choose Edit.
- From Permissions and events select Organization permissions.
- Under Metadata and Pull Requests select Access: Read-only.
- Under Members select Access Read-only.
- Under Account Permissions select Access:Read-only for Email addresses and Followers and Access Read and write for Gists and Profile.