Azure DevOps
On this page
Follow the step-by-step instructions below to set up the Radar CLI in your Azure DevOps pipeline.
Prerequisites
Before configuring your Azure DevOps pipeline, ensure you have:
Required
- Credential Token: Created in Credentials
- You'll need this for the
EUREKA_AGENT_TOKENvariable
- You'll need this for the
Optional
- Any scanner API credential/token for scanners that require them
Optional
- Any scanner API credential/token for scanners that require them
Step by step instructions
Log in to the Azure Portal and navigate to your desired Organization in Azure DevOps.
Select the project you want to configure the Radar CLI to scan.
Navigate to Pipelines in the left sidebar.
Choose your pipeline setup:
- New pipeline: Follow Microsoft’s documentation to create one.
- Existing pipeline: Select your pipeline from the list and click Edit in the top-right corner.
Add the following code to your new or existing
azure-pipelines.ymlfile:
# Run Radar CLI scan via Azure Pipelines
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '22.x'
displayName: 'Install Node.js'
- script: npm i -g @eurekadevsecops/radar
displayName: 'Install Radar CLI'
- script: radar && radar scanners
displayName: 'Verify Radar installation'
- script: radar scan -s gitleaks,grype,opengrep,veracode-sca
displayName: 'Run Radar scan'
env:
EUREKA_AGENT_TOKEN: $(EUREKA_AGENT_TOKEN)
SRCCLR_API_TOKEN: $(SRCCLR_API_TOKEN)
VERACODE_API_KEY_ID: $(VERACODE_API_KEY_ID)
VERACODE_API_KEY_SECRET: $(VERACODE_API_KEY_SECRET)Click the Variables button in the top-right corner to configure your credentials.
Required Variables
Add the following credentials created in the prerequisites:
Variable Name Value Description EUREKA_AGENT_TOKENYour token Authentication token for uploading scan results to Eureka 💡 Note: Mark these variables as protected and masked to keep your credentials secure.
Optional Scanner Variables
See below for optional variables associated with scanners you may be using:
Veracode
Variable Name Value Description SRCCLR_API_TOKENYour SCA token Veracode Source Clear (SCA) API token VERACODE_API_KEY_IDYour API key ID Veracode Static Analysis API key ID VERACODE_API_KEY_SECRETYour API secret Veracode Static Analysis API key secret Click Save variables to apply your configuration.
Click Run in the top-right corner to trigger the pipeline. Once the job is completed, check the Eureka Web Application for your scan results.