Azure DevOps Setup
Connect your Azure DevOps repositories to Cloudgeni to enable automated security scanning, pull request reviews, and compliance monitoring for your Infrastructure as Code.What You'll Get
- Automatic repository discovery from your Azure DevOps organizations
- Pull request security reviews with inline comments
- Service hooks integration for real-time scanning
- Branch policy integration for security gates
Prerequisites
Before You Start
Before You Start
- Azure DevOps account with Project Administrator access
- Repositories containing IaC files (Terraform, Bicep, etc.)
- Azure DevOps Services (cloud) or Server 2020+
Quick Start
Step 1: Navigate to Integrations
- Log in to your Cloudgeni dashboard
- Go to Settings → IaC Repositories
- Click Connect Git Provider
- Select Azure DevOps
Step 2: Authorize Cloudgeni
- Click Connect with Azure DevOps
- Sign in to your Microsoft account if prompted
- Select your Azure DevOps organization
- Review and accept the requested permissions
- Click Accept
Cloudgeni requests access to read your repositories and post pull request comments.
Step 3: Select Projects and Repositories
- After authorization, you’ll see your Azure DevOps projects
- Expand projects to see available repositories
- Toggle repositories you want to monitor
- Click Save Selection
Azure DevOps Server
Configure On-Premises Instance
For Azure DevOps Server (on-premises):- In Cloudgeni, go to Settings → IaC Repositories
- Click Connect Git Provider → Azure DevOps
- Click Use Azure DevOps Server
- Enter your server URL (e.g.,
https://tfs.yourcompany.com/tfs) - Configure authentication (see below)
Authentication Options
| Method | Best For |
|---|---|
| OAuth | Azure DevOps Services (cloud) |
| PAT | Azure DevOps Server, automation |
| Service Principal | Enterprise deployments |
Personal Access Token (PAT)
For Server deployments or automation:- In Azure DevOps, go to User Settings → Personal Access Tokens
- Click New Token
- Configure:
- Name: Cloudgeni Integration
- Organization: Select your organization
- Expiration: Set appropriate expiration
- Scopes: Code (Read & Write), Pull Request Threads (Read & Write)
- Copy the generated token
- Enter in Cloudgeni connection dialog
Permissions
Required Scopes
Cloudgeni requests these Azure DevOps permissions:| Scope | Purpose |
|---|---|
vso.code | Read repository content |
vso.code_write | Post PR comments |
vso.project | List projects and repositories |
vso.hooks | Configure service hooks |
Access Levels
| Azure DevOps Role | Can Connect | Can Scan | PR Comments |
|---|---|---|---|
| Project Administrator | Yes | Yes | Yes |
| Contributor | Limited | Yes | Yes |
| Reader | No | No | No |
Service Hooks
Automatic Setup
Cloudgeni automatically configures service hooks when you connect a repository. Hooks trigger on:- Code pushed to monitored branches
- Pull request created or updated
- Pull request merged
Manual Configuration
If automatic setup fails:- Go to Project Settings → Service hooks
- Click Create subscription
- Select Web Hooks
- Configure:
- Trigger: Code pushed, Pull request created/updated
- URL:
https://api.cloudgeni.ai/webhooks/azure-devops - HTTP headers: Add authentication header (from Cloudgeni)
- Click Finish
Event Types
| Event | Description |
|---|---|
git.push | Code pushed to repository |
git.pullrequest.created | New pull request opened |
git.pullrequest.updated | PR updated with new commits |
git.pullrequest.merged | PR merged to target branch |
Repository Management
Adding Repositories
- Go to Settings → IaC Repositories
- Find your Azure DevOps integration
- Click Manage Repositories
- Toggle additional repositories on
- Click Save
Removing Repositories
- Go to Settings → IaC Repositories
- Find the repository to remove
- Click the … menu → Remove
- Confirm removal
Repository Settings
| Setting | Description |
|---|---|
| Default Branch | Branch to scan on push events |
| Scan Triggers | Which events trigger scans |
| PR Comments | Enable/disable pull request comments |
| Auto-remediation | Enable AI-powered fix suggestions |
Pull Request Integration
How It Works
When a pull request is created or updated:- Cloudgeni receives service hook notification
- Changed IaC files are analyzed
- Security findings are posted as PR comments
- Status is updated on the PR
Comment Format
PR comments include:- Summary of findings by severity
- Inline comments on specific lines
- Remediation suggestions
- Links to detailed findings in Cloudgeni
Thread Resolution
- Comments are posted as threads
- Mark threads as resolved when issues are fixed
- Threads auto-resolve when code is updated
Branch Policies
Configure Required Checks
Add Cloudgeni as a required check for pull requests:- Go to Project Settings → Repositories → Select repo
- Click Policies → Select branch
- Under Build Validation, click Add build policy
- Select your Cloudgeni pipeline
- Configure policy:
- Trigger: Automatic
- Policy requirement: Required
- Build expiration: Immediately
Status Checks
Cloudgeni can post status checks to PRs:| Status | Meaning |
|---|---|
| Succeeded | No critical/high findings |
| Failed | Critical or high findings detected |
| Pending | Scan in progress |
Azure Pipelines Integration
Combine repository connection with CI/CD scanning:Troubleshooting
Connection Issues
Connection Issues
OAuth Failed:
- Verify you have Project Administrator access
- Clear browser cookies and retry
- Check organization policies allow third-party apps
- Ensure you have access to the project
- Check project visibility settings
- Try refreshing the project list
- Verify server URL is correct
- Check PAT has required scopes
- Ensure network connectivity to Cloudgeni
Service Hook Issues
Service Hook Issues
Hooks Not Triggering:
- Verify service hook exists in project settings
- Check webhook URL is correct
- Review hook history for delivery failures
- Verify write permissions are granted
- Check PR reviews are enabled in Cloudgeni
- Review scan logs for errors
Scanning Issues
Scanning Issues
Scans Not Running:
- Verify repository contains IaC files
- Check default branch configuration
- Review scan trigger settings
- Verify policy is configured correctly
- Check build pipeline exists
- Ensure policy applies to target branch
Security Considerations
Token Storage
- OAuth tokens are encrypted at rest
- PATs are securely stored and never exposed
- Access can be revoked at any time
Data Access
Cloudgeni accesses:- Repository file contents (for scanning)
- Pull request metadata (for comments)
- Branch and commit information
- Azure DevOps user credentials
- Pipeline variables or secrets
- Work items or boards
Revoking Access
To disconnect Azure DevOps:- In Cloudgeni: Settings → IaC Repositories → Disconnect
- In Azure DevOps: User Settings → Authorizations → Revoke