Toranj.ai

Azure DevOps Integration

Integrate Toranj with Azure DevOps and Azure Pipelines

Overview

Toranj integrates seamlessly with Azure DevOps Services and Azure Pipelines to provide continuous security scanning throughout your development lifecycle. Automatically scan code for vulnerabilities on every commit, pull request, and deployment.

Pipeline Integration

Seamless YAML pipeline configuration

Secure Authentication

Service connections and secure variables

Detailed Reporting

Build artifacts and security dashboards

Prerequisites

Requirements for setting up Azure DevOps integration

Azure DevOps Account

Active Azure DevOps organization and project

Toranj API Key

Valid API key from Toranj dashboard

Build Agent Access

Microsoft-hosted or self-hosted agents

Repository Access

Azure Repos, GitHub, or external Git repository

Service Connection Setup

Configure service connections for secure API access

Azure Service Principal Creation

create-service-connection.ps1
# PowerShell script to create Azure service connection
$subscriptionId = "your-subscription-id"
$resourceGroupName = "toranj-rg"
$servicePrincipalName = "toranj-sp"

# Create service principal
$sp = az ad sp create-for-rbac --name $servicePrincipalName --role contributor --scopes /subscriptions/$subscriptionId/resourceGroups/$resourceGroupName --sdk-auth

# Extract values for Azure DevOps
$appId = ($sp | ConvertFrom-Json).clientId
$password = ($sp | ConvertFrom-Json).clientSecret
$tenantId = ($sp | ConvertFrom-Json).tenantId

Write-Host "Service Principal Details:"
Write-Host "Application ID: $appId"
Write-Host "Secret: $password"
Write-Host "Tenant ID: $tenantId"
Write-Host "Subscription ID: $subscriptionId"

Service Connection Configuration:

  1. Navigate to Azure DevOps Project Settings
  2. Go to Service connections
  3. Create new Generic service connection
  4. Enter Toranj API endpoint and credentials
  5. Name it "Toranj-Connection"
  6. Grant access to all pipelines

Variable Configuration

Set up pipeline variables for Toranj integration

Required Variables

GATEMIND_API_KEY
Secret
GATEMIND_PROJECT_ID
Required
GATEMIND_API_URL
Optional

Variable Groups

Toranj-Config
Contains API configuration
Link to all pipelines