Last reviewed: 2026-09-16
Repositories in CodeCleared
Understand connected GitHub and GitLab repositories, owner/repo names, default branch detection, private access, and reconnection behavior.
Purpose
A repository is a GitHub- or GitLab-connected codebase available to one CodeCleared organization.
Who
Owners and admins connect repositories; members work with those their role permits.
Prerequisites
Connect GitHub (App) or GitLab.com (OAuth at Settings → Sources) and grant access to the intended repository or project.
How it works
Import the repository and identify it by its provider fullName, in owner/repo form. Use its product identifier where an API asks for it.
On import, CodeCleared reads the repository’s default branch from the VCS provider and stores it as the repository default branch. Scans and push-triggered workflows use that branch unless you override it later in repository configuration.
For GitLab, project webhooks are registered automatically on import. Self-managed GitLab is not supported.
Business rules
Private or external repositories can require a personal access token in the product when App or OAuth access is insufficient. A repository belongs to its connected organization. The initial default branch always comes from the provider; it is not assumed to be main or master.
Scenarios & edge cases
Rename: reconnect or refresh the connection after an owner or repository rename. Missing access: check provider access first, then the selected organization. Deleted connection: reconnect rather than creating assumptions from stale results. Wrong default branch after import: confirm the provider’s default branch, then adjust it in repository configuration if you intentionally scan another branch.
Limits
Only repositories the connected provider has authorized can be imported; connection access can change outside CodeCleared. GitLab is gitlab.com only.
Common errors
- Sending
fullNamewhere an API requiresrepositoryId. - Assuming a renamed repository stays connected automatically.
- Assuming every imported repository uses
mainas its default branch.