diff --git a/docs.json b/docs.json index 6df5935..02d4612 100644 --- a/docs.json +++ b/docs.json @@ -37,7 +37,8 @@ "platform/repositories", "platform/repositories/github", "platform/repositories/github-enterprise-server", - "platform/repositories/gitlab" + "platform/repositories/gitlab", + "platform/repositories/azure-devops" ] }, { diff --git a/images/azure-devops.svg b/images/azure-devops.svg new file mode 100644 index 0000000..c46851c --- /dev/null +++ b/images/azure-devops.svg @@ -0,0 +1 @@ +Icon-devops-261 \ No newline at end of file diff --git a/images/azure.png b/images/azure.png new file mode 100644 index 0000000..1cb04fa Binary files /dev/null and b/images/azure.png differ diff --git a/images/azure_copy_token.png b/images/azure_copy_token.png new file mode 100644 index 0000000..79db849 Binary files /dev/null and b/images/azure_copy_token.png differ diff --git a/images/azure_devops_connect.png b/images/azure_devops_connect.png new file mode 100644 index 0000000..6d6f379 Binary files /dev/null and b/images/azure_devops_connect.png differ diff --git a/images/azure_devops_select_repositories.png b/images/azure_devops_select_repositories.png new file mode 100644 index 0000000..f65c6d8 Binary files /dev/null and b/images/azure_devops_select_repositories.png differ diff --git a/images/azure_new_token.png b/images/azure_new_token.png new file mode 100644 index 0000000..4dbc229 Binary files /dev/null and b/images/azure_new_token.png differ diff --git a/images/azure_pat.png b/images/azure_pat.png new file mode 100644 index 0000000..f0cb735 Binary files /dev/null and b/images/azure_pat.png differ diff --git a/images/azure_scopes.png b/images/azure_scopes.png new file mode 100644 index 0000000..a263118 Binary files /dev/null and b/images/azure_scopes.png differ diff --git a/package.json b/package.json index bad9360..d71b270 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ }, "scripts": { "dev": "mintlify dev", - "lint": "prettier --check ." + "lint": "prettier --check .", + "lint:write": "prettier --write ." }, "devDependencies": { "mintlify": "4.2.678", diff --git a/platform/automations/remediation.mdx b/platform/automations/remediation.mdx index 7769659..694a444 100644 --- a/platform/automations/remediation.mdx +++ b/platform/automations/remediation.mdx @@ -11,7 +11,8 @@ Remediation is a part of [Automations](/platform/automations/overview) that fixe 1. **Verifies that the finding is real.** Tests whether the reported issue is actually exploitable in this code. If the finding is wrong (e.g. the code is unreachable), Hacktron reports it as a false positive. We will never attempt to fix already sound code. 2. **Implements the fix.** Makes the minimal correct fix that addresses the root cause of the vulnerability. 3. **Tests the fix.** Runs the existing test suite for the repository, if any. Adds relevant regression tests & makes sure the fix correctly addresses the issue while avoiding breaking anything else. - + + Remediation runs use [automation credits](/platform/automations/credits). You can start a run yourself from a finding or let it happen automatically through an [automation](/platform/automations/overview)'s Remediation action. diff --git a/platform/integrations.mdx b/platform/integrations.mdx index 06a948a..f2674da 100644 --- a/platform/integrations.mdx +++ b/platform/integrations.mdx @@ -13,14 +13,14 @@ description: "Connect SCM, project management, and communication tools to the Ha Connect your existing GitHub Team, GitHub Enterprise Cloud, GitHub - Enterprise Server, or GitLab account. You choose exactly which + Enterprise Server, GitLab, or Azure DevOps account. You choose exactly which repositories Hacktron has access to. For detailed instructions, choose your Git platform below. @@ -36,6 +36,13 @@ description: "Connect SCM, project management, and communication tools to the Ha Any plan on cloud GitLab.com + + Azure DevOps Services or Server + diff --git a/platform/repositories/azure-devops.mdx b/platform/repositories/azure-devops.mdx new file mode 100644 index 0000000..f30e09a --- /dev/null +++ b/platform/repositories/azure-devops.mdx @@ -0,0 +1,101 @@ +--- +title: "Azure DevOps" +description: "Configure repository access for Azure DevOps Services and Azure DevOps Server." +--- + +## Prerequisites + +You need to be an administrator of the Azure DevOps organization you want to +connect to Hacktron. This is required to create a Personal Access Token with the +scopes Hacktron uses to read code, post pull request statuses, and register the +service hooks that trigger reviews. + +## Configure access + + + + In Azure DevOps, open **User settings** (the icon next to your avatar in the + top right) and select **Personal access tokens**. + + Azure DevOps Personal Access Tokens + + + + Click **New Token**. Give it a descriptive name, e.g. "Hacktron", and select + the organization you want to connect. + + Create Azure DevOps Token + + + **Personal access tokens have expiration dates.** Set the expiration to + cover the duration of your intended use of Hacktron to avoid service + interruption. + + + + + Switch the scope selector to **Show all scopes** and grant the following: + + - **Code** - "Read & write" and "Status" + - **Project and Team** - "Read" + - **Service Connections** - "Read, query & manage" + - **Identity** - "Read" + + + The "Read & write" Code scope lets Hacktron clone repositories and post + review comments; "Status" lets it report pull request check results. The + Service Connections scope lets Hacktron register the service hooks that + notify it when a pull request is opened or updated, so reviews run + automatically. Hacktron does not retain any source code after each review + is complete. + + + Azure DevOps Token Scopes + + Click **Create**, then copy the generated token. Azure DevOps shows it only + once. + + Azure DevOps Copy Token + + + + In Hacktron, go to **Integrations** and click **Connect** under **Azure + DevOps**. + + Azure DevOps Integration + + + + Enter your organization URL (e.g. https://dev.azure.com/hacktronai) and the token you created earlier, and click **Connect**. + + Azure DevOps Integration Connect Step + + + + Select the repositories that you want Hacktron to have access to. + + Azure DevOps Integration Select Repositories + + + + +That's it! Hacktron will now run security reviews for every pull request in the selected repositories. + +## Azure DevOps Server + +Hacktron supports self-hosted Azure DevOps Server through the same Personal +Access Token flow described above. The only difference is one extra step when +you connect. + +Follow the same **Configure access** steps to create a Personal Access Token +with the same scopes on your Azure DevOps Server instance. + +When you open the **Connect Azure DevOps** modal in Hacktron, select **Azure +DevOps Server** and enter your instance's base URL and organization (e.g. +`https://azuredevops.example.com/DefaultCollection`) as well. + + + Self-hosted prerequisites: - Your Azure DevOps Server instance must be + reachable from Hacktron over HTTPS with a valid TLS certificate. - The token + must carry the same scopes listed above on your Azure DevOps Server instance. +