Configure an AppScan Presence to connect to Azure DevOps repositories using a personal access token (PAT) scoped to your Azure DevOps organization.
Before you begin
- Ensure that you have access to an Azure DevOps organization and permission to access the repositories you plan to scan.
- Ensure that your Azure DevOps organization permits you to create a PAT with the required scopes.
- Create and install an AppScan Presence on a private network with access to Azure DevOps.
About this task
The Azure DevOps server does not have to be publicly accessible. You must have network access to the server and permission to access its repositories.
Procedure
-
Create a PAT for your Azure DevOps organization.
- Sign in to your Azure DevOps organization.
- Open User settings and select Personal access tokens.
- Select + New Token.
- Enter a name, select the organization that contains your repositories, and set an expiration date.
- Under Code, select Read.
This is the minimum PAT scope required for scanning.
- Select Create and copy the token immediately.
-
Open git_connect_settings.json in the AppScan Presence installation directory.
-
In the
GitConnectOptions section, configure the Azure DevOps connection.
| Parameter | Description | Example |
GitServerName | A name for the Azure DevOps server. | Azure DevOps |
GitConnectUrl | The HTTPS URL of the web application exposed by this Presence. | https://my-presence-host-fqdn:443 |
GitPlatformDomain | The URL of the Azure DevOps server. | https://dev.azure.com |
GitPlatformType | The repository provider. | AzureDevOps |
AccessToken | The PAT created for the Azure DevOps organization. | personal-access-token |
OrganizationName | The name of the Azure DevOps organization. | organization-name |
Active | Enable the Azure DevOps connection. The default is false. | true |
Proxy | If a proxy is required to connect to Azure DevOps, uncomment this parameter and enter the proxy details. | 127.0.0.1:8888 |
-
Configure an HTTPS endpoint in the
Kestrel section of git_connect_settings.json.
-
Save the configuration file, then start or restart the Presence.
Logs are written to the console and to files in the logs folder in the Presence installation directory.
What to do next
To scan a repository using the Presence, select Azure DevOps as the provider, select the configured Presence, and select Authorize Presence. Then select the repository and branch and complete the scan configuration.
To connect multiple repositories, see Onboarding multiple repositories for scanning.