GitHub connector
The GitHub connector reads your organisation’s profile and repository list. 0zone adds the org and repository homepages to the company’s approved inventory.
What 0zone reads
- The organisation profile (
/orgs/{org}). - The repository list (
/orgs/{org}/repos): names, visibility and homepage URLs.
What 0zone never does
- Read or clone code. Secret scanning of code is the separate Code Security integration.
- Change repositories, settings or members.
Steps
- In GitHub, go to Settings > Developer settings > Personal access tokens > Fine-grained tokens and select Generate new token.
- Set Resource owner to your organisation. If the org requires approval for fine-grained tokens, an org owner must approve it.
- Under Repository access, choose All repositories.
- Under Repository permissions, leave only Metadata: Read-only. Grant nothing else.
- Generate the token and copy it.
- In 0zone, open Integrations, choose GitHub, and enter:
- Org: the organisation login, for example
yourcompany - API token: the value from step 5
- Org: the organisation login, for example
- Select Run now.
Check it worked
The connector shows ok and a count of repositories with homepages.
Remove access
Delete the connector in 0zone, then delete the token under Fine-grained tokens.
Troubleshooting
- auth_error: the token expired, was deleted, or is still waiting for org approval.
- Private repositories missing: the token’s repository access does not include them.