Skip to main content
Run CybeDefend scans in your on-prem Azure DevOps Server pipeline, maintaining code on your own infrastructure while benefiting from automated security checks.

Prerequisites

  • Personal Access Token (PAT): Create one in your CybeDefend profile and store it as CYBEDEFEND_PAT in Azure DevOps.
  • Agent Permissions: Ensure your self-hosted agent can install or run the CybeDefend CLI.
  • Azure DevOps Access: Sufficient rights to modify your pipeline definition.
Make sure the agent’s OS matches one of our supported CLI binaries (Windows, Linux, or macOS).

Example azure-pipelines.yml

Explanation

  1. checkout: self
    Ensures your code is present on the build agent.
  2. Download & Install
    Grabs the CLI binary, grants permissions, and moves it to /usr/local/bin.
  3. Run the Scan
    The --ci flag keeps the output minimal. We rely on environment variables for the API key and project ID.

Viewing Scan Results

  1. CLI Output
    The console output shows a summary of detected issues.
  2. CLI “results”
    If you want more detail in the pipeline logs, add a step:
  3. CybeDefend Dashboard
    Login to your CybeDefend account to see a full vulnerability breakdown.
Large repos can take extra time to upload. Ensure your pipeline has enough timeout for the scan process.
For advanced gating, fail the job if a certain severity is found. Combine —ci with parsing the CLI exit codes or vulnerability count from the JSON output.