microsoft / microsoft/security-devops-azdevops

Which Defender CLI binary should be used in CI/CD pipelines — `aka.ms` or the DevOps CDN endpoint?

Aperta
#166 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
86
Fork
22
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

We're integrating Defender for Cloud image scanning into our Azure DevOps pipelines. Rather than using the MicrosoftDefenderCLI@2 task (which emits ##[error] for any findings regardless of the break setting), we're invoking the CLI binary directly so we can control exit code handling and surface findings as warnings.

We've discovered there are two different CLI binaries available:

Official (aka.ms) DevOps CDN
URL https://aka.ms/defender-cli_linux-x64 https://cli.dfd.security.azure.com/public/v2/latest/Defender_linux-x64
Size ~126 MB ~24 MB
Version v2.0.3334.114 (as of May 2026) Unknown — no --version output tested
Break flag --defender-break (critical only) --fail-on <severity> (configurable threshold)
Documented Yes — Install, Syntax, CI/CD No
Auth Token-based (client ID/secret) or connector Auto-detects SYSTEM_ACCESSTOKEN
SHA-256 79F4F1EDC1DD2F99193BFFC47464023A450CFEFA03F362D7716A5E51D357B0C1 CD31528812D19142DC58DEEA0475E2610F5CC4E4D036F78EAB2FF1243CC5BB3A
Observations
  1. The CDN binary appears purpose-built for CI/CD use. It's significantly smaller (24 MB vs 126 MB), supports a configurable severity threshold (--fail-on low|medium|high|critical), and auto-detects Azure DevOps pipeline authentication via SYSTEM_ACCESSTOKEN. The URL pattern (cli.dfd.security.azure.com/public/v2/latest/) suggests it's the same binary the MicrosoftDefenderCLI@2 task downloads internally.

  2. The aka.ms CLI is the documented standalone CLI. It's referenced in the official CI/CD integration guide for non-ADO platforms (GitHub Actions, Jenkins, etc.). Its --defender-break flag only exits non-zero for "critical issues" with no configurable threshold.

  3. The --help outputs are completely different. The CDN binary exposes flags like --fail-on, --baseline, --severity, --suppress, --quiet, and --timeout that don't exist in the aka.ms binary, and vice versa (e.g. --defender-debug, --defender-output only in aka.ms).

  4. Neither binary's scan image flags match the documented CLI reference exactly. The docs list --defender-break and --defender-output as global options, which align with the aka.ms binary but not the CDN one.

Questions
  1. Is the CDN endpoint (cli.dfd.security.azure.com) a supported, stable distribution channel? Can we rely on it in production pipelines, or is it an internal implementation detail of the ADO task that could change without notice?

  2. Are these intended to be two separate products, or are they converging? The feature sets (especially --fail-on vs --defender-break) suggest they may be independently developed.

  3. For Azure DevOps pipelines where we need to bypass the task wrapper (to avoid ##[error] on non-critical findings), which binary is recommended?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con l'attività MicrosoftDefenderCLI@2 e con la documentazione collegata relativa a installazione, sintassi e CI/CD di Defender CLI, quindi confronta il binario documentato di aka.ms con l'endpoint cli.dfd.security.azure.com. Il lavoro è completato quando sarà stabilito se la CDN è supportata e stabile, se i binari sono prodotti separati e quale di essi dovrebbero usare le pipeline Azure DevOps.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure
Ambito
ci-cd, devops
Tipo di issue
Documentazione
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.