Skip to main content

Connect a git provider

Connect a GitHub, GitLab, Bitbucket, Azure DevOps or Codeberg / Forgejo organisation or user as a workspace, give Vulnara access through a GitHub App, a GitLab connection or a git token, and import the repositories.

Before Vulnara can scan code, it needs to know where the code lives. You connect an organisation, group or user on GitHub, GitLab, Bitbucket, Azure DevOps or Codeberg / Forgejo as a workspace, give Vulnara access to private repositories through a GitHub App, a GitLab connection or a git token, and import the repositories. For a GitLab or GitHub Enterprise Server you run yourself, see Self-hosted git servers.

What it is for

A workspace is the Git account that owns your code: a GitHub organisation or user, a GitLab group or user, a Bitbucket workspace, an Azure DevOps organisation, or a Codeberg / Forgejo organisation or user. Everything you scan belongs to a workspace. A git token lets Vulnara reach that workspace's private repositories. For GitHub you can install the Vulnara GitHub App, or your own GitHub App, instead. For GitLab you can connect your GitLab account in one click instead of pasting a token. Without any of these, Vulnara works with public repositories only.

What to expect

  • The type you choose (organisation, group or user) must match what the provider says the account is, or the workspace is refused.
  • A private organisation or group that the provider hides from anonymous visitors can still be added by name, once your team has a valid token for that provider. Vulnara looks the name up with your team's tokens and uses the first one that finds it.
  • If the name is not found on any public provider, Add Workspace says so and offers your own servers under Instance. See Self-hosted git servers.
  • A token you add is checked against the provider, and the app shows whether it works and when it expires.
  • An import adds the workspace's repositories with their branches and languages. Repositories appear as the import runs, and the tasks bar shows how many have been fetched.
  • If an import fails, the tasks bar shows the reason, often the provider's own message. On Bitbucket, Azure DevOps and Forgejo, an import the provider refuses access to fails rather than leaving you with an empty or partial workspace.
  • Azure DevOps repositories are named project/repository.
  • Private repositories are imported only when a token or the GitHub App gives Vulnara access to them. Otherwise they are skipped, because they could not be scanned.
  • Through a GitHub App, the import brings in exactly the repositories you granted the app, public and private.

What you can set

  • Git Provider: GitHub, GitLab, Bitbucket, Azure DevOps or Codeberg / Forgejo. Vulnara detects it when you paste a URL, such as https://bitbucket.org/acme, https://dev.azure.com/acme, https://acme.visualstudio.com or https://codeberg.org/acme, and asks you to choose if a handle exists on both GitHub and GitLab.
  • Workspace: the user, organisation or group handle, or its URL. Bitbucket and Azure DevOps workspaces are organisations only.
  • Ownership confirmation: you must confirm that you own the workspace or have its owner's permission to scan it. Vulnara records who confirmed it and when.
  • Automatically add repositories: start an import as soon as the workspace is added.
  • Ignore paths: optional glob patterns applied to every repository in the workspace. See Ignore paths.
  • Git token name: a label for your reference, unique within your account.
  • Git token value: the access token. GitHub and GitLab tokens are recognised automatically; for the other providers, the workspace's provider or the one you choose is used. The form links to the provider's page for creating a token.
  • Expires At: optional. Leave it blank to use the token's own expiry, or set an earlier date after which Vulnara stops using it.
  • Associated workspaces: a token can be linked to several workspaces, and a workspace can have several tokens.

Token permissions

Create the token with these permissions on the provider:

  • GitHub: a classic token with the repo scope, or a fine-grained token with read and write access to Contents, Issues and Pull requests.
  • GitLab: a token with the api scope. A personal, group or project access token all work.
  • Bitbucket: repository read access, plus issue and pull request write access if Vulnara should open issues and fix pull requests.
  • Azure DevOps: Code (Read), or Code (Read & Write) for fix pull requests, and Work Items (Read & Write) for issues. An Azure DevOps organisation cannot be imported without a token, and the form warns you.
  • Codeberg / Forgejo: read:repository, plus write:issue and write:repository for issues and fix pull requests.

A token without repository access is marked invalid. No token is needed for public repositories.

Connect GitHub through the GitHub App

For GitHub, you can install the Vulnara GitHub App instead of pasting a personal access token. Vulnara then scans, files issues and opens fix pull requests on the repositories you grant the app, private ones included, and that workspace needs no token. If your organisation would rather not install a third-party app, you can use a GitHub App you own instead, see Use your own GitHub App.

  1. Admins see Install the GitHub App and Already installed? Link it in Add Workspace when they pick GitHub, and on Settings, Integrations, GitHub. Install sends you to GitHub to install the app on an organisation or account; link connects an installation that already exists. If your team has registered its own GitHub App, Vulnara first asks which app to use: the Vulnara GitHub App or yours.

  2. Connect the account

    Back in Vulnara, each linked GitHub account is listed. Choose Connect as a workspace for the ones you want to scan, then tick the ownership confirmation in the Add Workspace form that opens. Accounts that are already workspaces are marked Already a workspace.

If Vulnara says your GitHub account cannot see the installation, sign in to GitHub as someone who can, and try again.

The Connections list on the GitHub integration page shows each GitHub App and access token your team uses, with the accounts and workspaces each one reaches and its status. Each installation says which app it belongs to: Through the Vulnara GitHub App or Through your App followed by its name.

A workspace connected this way shows Connected through the GitHub App on its page, with whether the app has all repositories or selected ones, and a Manage on GitHub link. Scan forms do not ask for a token for it.

If an installation cannot be used yet, the installation list and the workspace's page say why:

  • Needs verification: choose Verify with GitHub.
  • Suspended or removed: the app was suspended or uninstalled on GitHub. Reinstall it.
  • Permissions pending: an owner of the GitHub account has to accept the app's new permissions on GitHub. Until then, public repositories are still scanned, and a private repository with no token to fall back on is refused.

If a scan fails because the app cannot reach a repository, grant that repository to the app in the installation's settings on GitHub.

Unlink on an installation stops Vulnara using it. To remove the app from GitHub as well, uninstall it there. An installation used by a GitHub Projects board cannot be unlinked until you disconnect the board.

Use your own GitHub App

Instead of the Vulnara GitHub App, your team can use a GitHub App that your organisation owns. The private key stays under your control, the app's activity shows in your own audit log, and you can revoke it on GitHub at any time. Your own app works everywhere the Vulnara app does: scans, issues, fix pull requests, GitHub Projects boards and Use only the GitHub App for GitHub.

Admins manage it on Settings, Integrations, GitHub, under Your GitHub Apps (or Use your own GitHub App):

  • Create on GitHub: enter the GitHub organisation that should own the app, or leave it empty for your own account, and choose Continue on GitHub. GitHub opens with the app's name, permissions, events and webhook filled in. Confirm there, and GitHub sends you back to Vulnara, which offers Install it now.
  • Use an existing App: enter the App ID, choose the Private key .pem file GitHub gave you, and enter the Client ID, Client secret and Webhook secret. Vulnara checks the key against the app before saving it, then shows the Webhook URL and Callback URL to set on the app's settings page on GitHub. Then install the app from the integrations page.

Each registered app is listed with its owner, status, number of installations, its webhook URL and when the last webhook arrived. Secrets are stored encrypted and never shown again.

  • Active: the app is ready to install and use.
  • Waiting for GitHub: the app is being created on GitHub and has not come back yet.
  • Needs attention: GitHub refused the app's credentials. Choose Rotate secrets and enter the new values from the app's settings on GitHub. Fields you leave empty keep their current value.

Delete makes Vulnara forget the app and its secrets; the app itself stays on GitHub. An app cannot be deleted while any of its installations is linked, so unlink them first.

If both the Vulnara GitHub App and your own app are installed on the same GitHub account, Vulnara uses your own app, unless it cannot read code there.

Use only the GitHub App for GitHub

On Settings, Integrations, an admin can turn on Use only the GitHub App for GitHub, once at least one installation is ready to use. Before it turns on, Vulnara lists the GitHub workspaces the app does not reach, which stop scanning until the app is installed on them, and the GitHub tokens that will stop being used.

While it is on:

  • Your GitHub workspaces are reached only through the app, never with a token.
  • GitHub tokens cannot be added or linked. Existing ones are kept, marked Not used: GitHub App only, and can be deleted.
  • Scans, fixes and issues for a GitHub workspace the app does not reach are refused, with a link to install the app on it.
  • GitLab, Bitbucket, Azure DevOps and Codeberg / Forgejo are not affected.

Turn it off and your GitHub tokens are used again.

Connect GitLab

On Settings, Integrations, GitLab, the Connections table lists every way Vulnara reaches your GitLab groups. Each row shows its kind (OAuth, Group token, Project token or Personal token), the GitLab user or bot it acts as, its instance, its workspaces and its status. Connect offers three ways in:

  • Connect with GitLab: sign in to GitLab and authorise Vulnara, with no token to copy. Only admins can do this.
  • Add access token: paste a personal, group or project access token with the api scope. Vulnara tells which kind it is by itself. A group or project access token belongs to a bot user rather than a person, so it keeps working when people leave.
  • Use your own GitLab instance: register a GitLab you run yourself, see Self-hosted git servers.

Connect with GitLab

  1. Authorise Vulnara

    Choose Connect, then Connect with GitLab. If your team has added its own GitLab instances with OAuth set up, pick gitlab.com or the instance first. GitLab asks you to authorise Vulnara, then sends you back.

  2. Pick the groups

    Vulnara shows the groups your GitLab user maintains. Tick the ones to add as workspaces, confirm that you own them or have their owner's permission to scan them, and choose Add workspaces. A group that is already a workspace is linked to the connection instead of being added twice. You can choose Skip and add workspaces later.

If the link expired or was started by someone else, Vulnara says so; choose Start again. Connecting the same GitLab user again renews the existing connection and keeps its workspaces.

A workspace reached this way shows Connected through GitLab on its page, with the user and kind, and a Manage on GitLab link. Vulnara keeps the connection fresh by itself. If GitLab revokes it, the connection reads Needs attention, syncs and scans of its workspaces fail, and you choose Reconnect on its row to authorise Vulnara again. An OAuth connection has no Edit: reconnecting is the only way to change it.

Do it

  1. Add the workspace

    Open Workspaces in the web app at vulnara.rso.dev and choose Add Workspace. Pick the provider, enter the handle or URL, tick the ownership confirmation and save. For Azure DevOps, add the access token in the same form. For GitHub, an admin can choose Install the GitHub App here instead, see Connect GitHub through the GitHub App. For GitLab, an admin can also add workspaces straight from Connect with GitLab. For a workspace on your own server, pick it under Instance.

  2. Add a git token

    Skip this step for a GitHub workspace connected through a GitHub App, or a GitLab workspace added through Connect with GitLab. Otherwise, in the workspace, open the Git Tokens tab and add a token. Paste the value; Vulnara checks it and fills in its expiry. A token created from a workspace is linked to that workspace.

  3. Import the repositories

    Choose Sync now in the workspace. Progress appears in the tasks bar. Run it again later to pick up new repositories; the workspace is flagged when it has not been imported in over 30 days.

The same steps are available outside the web app:

Good to know

  • Token values are stored encrypted. Once a token is saved, Vulnara shows only its last four characters.
  • Scans and imports that name an invalid or expired token are refused. When a token turns invalid, Vulnara notifies you.
  • A token that expires within 14 days is flagged as expiring, and an expired or invalid token is marked as bad and is not offered in scan forms.
  • If a workspace has no git token, GitLab connection or usable GitHub App installation, its page warns that only public repositories will be imported.
  • A token can only be linked to workspaces on the same instance (gitlab.com, github.com or one of your own servers).
  • Deleting a workspace cancels any work still running for it. You can also transfer a workspace to another team.
  • You can cancel an import from the tasks bar. The workspace is then not marked as imported.
  • If the provider is busy when you add a workspace, the workspace is still created and its details are filled in shortly after.