Azure DevOps

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_TOKEN variable

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

  1. Log in to the Azure Portal and navigate to your desired Organization in Azure DevOps.

  2. Select the project you want to configure the Radar CLI to scan.

  3. Navigate to Pipelines in the left sidebar.

  4. 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.
  5. Add the following code to your new or existing azure-pipelines.yml file:

# 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)
  1. Click the Variables button in the top-right corner to configure your credentials.

    Required Variables

    Add the following credentials created in the prerequisites:

    Variable NameValueDescription
    EUREKA_AGENT_TOKENYour tokenAuthentication 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 NameValueDescription
    SRCCLR_API_TOKENYour SCA tokenVeracode Source Clear (SCA) API token
    VERACODE_API_KEY_IDYour API key IDVeracode Static Analysis API key ID
    VERACODE_API_KEY_SECRETYour API secretVeracode Static Analysis API key secret
  2. Click Save variables to apply your configuration.

  3. 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.