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
Service connections store sensitive credentials. Ensure proper permissions are set.
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:
- Navigate to Azure DevOps Project Settings
- Go to Service connections
- Create new Generic service connection
- Enter Toranj API endpoint and credentials
- Name it "Toranj-Connection"
- Grant access to all pipelines
Variable Configuration
Set up pipeline variables for Toranj integration
Required Variables
GATEMIND_API_KEYSecret
GATEMIND_PROJECT_IDRequired
GATEMIND_API_URLOptional
Variable Groups
Toranj-Config
Contains API configuration
Link to all pipelines