Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions platform/repositories/gitlab.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

## Choose an access level

Hacktron supports two GitLab access options. Choose the service account's role

Check warning on line 8 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L8

Did you really mean 'Hacktron'?
based on who will manage webhooks and repository clone credentials.

<Tip>
**Maintainer: automatic setup (recommended)**

GitLab requires Maintainer access to create project webhooks and read-only
clone credentials. With this role, Hacktron manages both automatically for

Check warning on line 15 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L15

Did you really mean 'Hacktron'?
your selected projects.

</Tip>
Expand All @@ -20,7 +20,7 @@
<Info>
**Developer: manual setup**

Developer access lets Hacktron read merge requests and post review comments.

Check warning on line 23 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L23

Did you really mean 'Hacktron'?
A [read-only deploy token provides repository cloning access](#developer-access-setup),
and a GitLab Maintainer or Owner configures the webhook separately. This lets
the service account stay at Developer access while an authorized person
Expand All @@ -30,7 +30,7 @@

## Prerequisites

You need to be a Hacktron organization admin to connect GitLab and manage its settings.

Check warning on line 33 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L33

Did you really mean 'Hacktron'?

A GitLab group Owner creates the service account. For the Developer option,
you also need someone with permission to create deploy tokens and webhooks:
Expand All @@ -41,7 +41,7 @@

<Steps>
<Step title="Open Service Accounts page">
In GitLab, under the group you want to connect to Hacktron, go to

Check warning on line 44 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L44

Did you really mean 'Hacktron'?
**Settings** and select **Service Accounts**.
<img src="/images/gitlab_sa.png" alt="GitLab Service Accounts" />
</Step>
Expand All @@ -54,7 +54,7 @@

</Step>
<Step title="Choose the service account's access level">
Grant access to the group or projects you want Hacktron to scan.

Check warning on line 57 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L57

Did you really mean 'Hacktron'?

<Tabs>
<Tab title="Maintainer (recommended)">
Expand Down Expand Up @@ -88,17 +88,10 @@
<Info>
**Why these token scopes?**

- `api` lets Hacktron post review comments. With Maintainer access, it also
lets Hacktron create and manage project webhooks and read-only clone
credentials. These write operations need more than read-only API access.
- `read_api` covers reading project and merge request information,
including the diffs Hacktron reviews.
- `read_user` covers reading the connected account's profile so Hacktron
can identify the service account during connection.

GitLab's [`api` scope](https://docs.gitlab.com/security/tokens/access_token_scopes/)
includes these read capabilities. Hacktron's connection form lists all
three scopes. Token scopes do not raise the account's GitLab project role.
- `api`: Post review comments and, with Maintainer access, manage webhooks
and clone credentials.
- `read_api`: Read project and merge request information, including diffs.
- `read_user`: Identify the connected service account.
</Info>

<Warning>
Expand All @@ -107,7 +100,7 @@

</Step>
<Step title="Connect GitLab">
In Hacktron, go to **Integrations** and click **Connect** under **GitLab**.

Check warning on line 103 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L103

Did you really mean 'Hacktron'?
Paste the personal access token and click **Connect GitLab**.

<img
Expand All @@ -117,7 +110,7 @@

</Step>
<Step title="Select projects">
Go to **Repositories** and select the GitLab projects Hacktron can access.

Check warning on line 113 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L113

Did you really mean 'Hacktron'?

With Maintainer access, webhook setup is automatic. With Developer access,
complete the setup below before starting scans.
Expand All @@ -130,7 +123,7 @@

## Developer access setup

Complete these steps when the service account has Developer access. Hacktron

Check warning on line 126 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L126

Did you really mean 'Hacktron'?
shows **Needs setup** until a deploy token is saved.

<Steps>
Expand All @@ -150,7 +143,7 @@
</Note>

</Step>
<Step title="Save the deploy token in Hacktron">

Check warning on line 146 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L146

Did you really mean 'Hacktron'?
Open **Integrations** → **GitLab** → **Manage**. Under **Webhooks and deploy
tokens**, enter **Deploy token username** and **Deploy token**, then click
**Save**.
Expand All @@ -162,7 +155,7 @@

</Step>
<Step title="Configure the webhook in GitLab">
In the same Hacktron panel, copy the webhook **URL** and **Secret token**.

Check warning on line 158 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L158

Did you really mean 'Hacktron'?

In GitLab, open **Settings** → **Webhooks** on each selected project and
click **Add new webhook**. Paste the full URL, including its query string,
Expand Down Expand Up @@ -214,6 +207,6 @@
GitLab Enterprise** and enter your instance's base URL (e.g.
`https://gitlab.example.com`) before entering the token.

- Your GitLab instance must be reachable from Hacktron over HTTPS with a valid TLS certificate.

Check warning on line 210 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L210

Did you really mean 'Hacktron'?
- GitLab installed under a URL subpath (e.g. `https://example.com/gitlab`) is not supported. Use the instance's base URL.

Check warning on line 211 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L211

Did you really mean 'subpath'?
- For Developer access, use the webhook URL and secret shown in Hacktron for this connection.

Check warning on line 212 in platform/repositories/gitlab.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hacktronai) - vale-spellcheck

platform/repositories/gitlab.mdx#L212

Did you really mean 'Hacktron'?
Loading