Public repositories on GitHub, GitLab and Bitbucket can be analysed from their URL without connecting anything. To analyse a private GitHub repository, or to pick repositories and branches from a list, you connect GitHub through the Codeego GitHub App. See Providing your code for the other ways to supply code.
Permissions requested#
The app requests two repository permissions, both read-only, and no account or organisation permissions:
- Contents: Read-only
- Lets Codeego clone the repositories you choose.
- Metadata: Read-only
- Lets Codeego list repositories and branches.
Codeego never has write access to your repositories. It cannot push commits, open pull requests, change settings or read issues.
Connect GitHub#
- Start a new assessment and choose a Git source. The form shows Connect GitHub, with the note "Codeego gets read-only access to the repositories you choose."
- Select Connect. GitHub asks you to authorise the Codeego app and, if it is not installed yet, to install it on your account or on an organisation, for all repositories or only selected ones.
- After GitHub returns you to Codeego, the form shows your GitHub login with Connected and Read-only access, and lists the repositories the app can see.
- To make more repositories available, select Add repositories on GitHub. This opens the app's installation page on GitHub, where you can add repositories or install the app on another organisation.
Installing the app on a GitHub organisation usually requires an owner of that organisation. If you are only a collaborator on a repository whose owner has not installed the app, Codeego cannot clone it. In that case, upload a ZIP archive or request the code from the owner.
Which repositories are visible#
The repository list shows the repositories that are both covered by an installation of the app and visible to your own GitHub account. When you add a repository to an assessment, Codeego checks with your GitHub authorisation that you can access it. A repository you cannot see on GitHub is refused, even if the app is installed on it.
Tokens and what is stored#
- Your GitHub authorisation is stored encrypted and used only to list installations, repositories and branches, and to check access. GitHub limits it to 8 hours and refreshes it for up to 6 months.
- To clone, Codeego requests from GitHub a separate token that is limited to one repository, carries read-only permissions and expires after one hour. This token is not stored. A relaunch requests a new one.
- Public repositories, and repositories on other hosts, are cloned without credentials.
Disconnect and uninstall#
Disconnect, next to your GitHub login in the assessment form, revokes Codeego's authorisation on your GitHub account and deletes the stored token. It does not uninstall the app. To remove the app's access to a repository or organisation, change or uninstall the installation in your GitHub settings, under the installed GitHub Apps.
If your GitHub connection was made before the switch to the read-only app, the form shows "GitHub access is now read-only. Reconnect to continue." Select Reconnect and follow the steps above.