diff --git a/Bitbucket-Create-Group.png b/Bitbucket-Create-Group.png new file mode 100644 index 0000000..6ff5aee Binary files /dev/null and b/Bitbucket-Create-Group.png differ diff --git a/Bitbucket-Grant-User-Repository-Access.png b/Bitbucket-Grant-User-Repository-Access.png new file mode 100644 index 0000000..47098c8 Binary files /dev/null and b/Bitbucket-Grant-User-Repository-Access.png differ diff --git a/Bitbucket-Integration-Authorisation.png b/Bitbucket-Integration-Authorisation.png new file mode 100644 index 0000000..ed08b59 Binary files /dev/null and b/Bitbucket-Integration-Authorisation.png differ diff --git a/Bitbucket-Integration-RepoSelection.png b/Bitbucket-Integration-RepoSelection.png new file mode 100644 index 0000000..47ce131 Binary files /dev/null and b/Bitbucket-Integration-RepoSelection.png differ diff --git a/Bitbucket-Integration-Webhook.png b/Bitbucket-Integration-Webhook.png new file mode 100644 index 0000000..ea237db Binary files /dev/null and b/Bitbucket-Integration-Webhook.png differ diff --git a/Grant-Group-Admin-Permission.png b/Grant-Group-Admin-Permission.png new file mode 100644 index 0000000..da18ee1 Binary files /dev/null and b/Grant-Group-Admin-Permission.png differ diff --git a/Integration-Bitbucket.Png b/Integration-Bitbucket.Png new file mode 100644 index 0000000..2fc3fb4 Binary files /dev/null and b/Integration-Bitbucket.Png differ diff --git a/docs.json b/docs.json index 4eccd92..8182e5a 100644 --- a/docs.json +++ b/docs.json @@ -39,7 +39,8 @@ "platform/repositories/github", "platform/repositories/github-enterprise-server", "platform/repositories/gitlab", - "platform/repositories/azure-devops" + "platform/repositories/azure-devops", + "platform/repositories/bitbucket" ] }, { diff --git a/platform/repositories/bitbucket.mdx b/platform/repositories/bitbucket.mdx new file mode 100644 index 0000000..1a1597c --- /dev/null +++ b/platform/repositories/bitbucket.mdx @@ -0,0 +1,86 @@ +--- +title: "Bitbucket" +description: "Configure repository access for Bitbucket and self-hosted Bitbucket." +--- + +## Prerequisites + +The Bitbucket account used to connect Hacktron must: + +- Have access to the repository you want Hacktron to review. +- Have Admin permission on each selected repository so Hacktron can create and update repository webhooks. +- Be able to sign in to Bitbucket and approve the OAuth Request. + + + We recommend using a dedicated Bitbucket account for the Hacktron integration instead of an employee's personal account. This keeps repository access and automated pull request comments associated with a separate integration identity.

A dedicated account is **optional**; an existing Bitbucket repository administrator can also connect to Hacktron +
+ + + Bitbucket Cloud does not provide native service or bot accounts. A "dedicated Bitbucket account" means a normal, login-capable Bitbucket user created for the integration. + + +## Configure access + + + + You can skip this step if you intend to connect Hacktron using an existing Bitbucket repository administration. + + + In Bitbucket, open **Repository settings** → **Repository permissions** and select **Add users or groups**. + + Add the account that will connect Hacktron, assign the **Admin** permission, and click **Confirm**. + + + For multiple repositories, you can manage access through a Bitbucket group or grant the account **Admin** permission at the project level. + + + ![Grant repository access](/Bitbucket-Grant-User-Repository-Access.png) + + + Sign in with the dedicated Bitbucket account you created in step 1. If you chose to use an existing repository administrator account, sign in with that account instead. + + + In Hacktron, go to **Integrations** and click **Connect** under **Bitbucket** + + ![Integration Bitbucket](/Integration-Bitbucket.Png) + + + Review the permissions requested by Hacktron and click **Accept.** + + Bitbucket will redirect you to Hacktron after authorization is complete. + + GitLab Integration + GitLab Integration + + + Select the repositories you want Hacktron to review and save your selection. + + Hacktron automatically creates the required webhook for each enabled repository. You do not need to configure the webhook manually. + + ![Bitbucket Integration Repo Selection](/Bitbucket-Integration-RepoSelection.png "Bitbucket Integration Repo Selection") + + To verify the webhook, open the repository in Bitbucket and go to **Repository settings** → **Webhooks**. You should see an active webhook named **Hacktron Security Scan** pointing to: `https://iva.hacktron.ai/api/v1/webhooks/bitbucket` + + ![Bitbucket Integration Webhook](/Bitbucket-Integration-Webhook.png "Bitbucket Integration Webhook") + + + +That's it! Hacktron will now run security reviews for every pull request in the selected repositories. + +## Supported Bitbucket deployments + +Hacktron currently supports Bitbucket Cloud. + +Bitbucket Data Center and other self-hosted Bitbucket deployments are not currently supported.