Skip to content

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

  1. In GitHub, go to Settings > Developer settings > Personal access tokens > Fine-grained tokens and select Generate new token.
  2. Set Resource owner to your organisation. If the org requires approval for fine-grained tokens, an org owner must approve it.
  3. Under Repository access, choose All repositories.
  4. Under Repository permissions, leave only Metadata: Read-only. Grant nothing else.
  5. Generate the token and copy it.
  6. In 0zone, open Integrations, choose GitHub, and enter:
    • Org: the organisation login, for example yourcompany
    • API token: the value from step 5
  7. 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.