azure-pipelines-ci-doctor
v0.1.1
Published
Audit azure-pipelines.yml for cost, security, and reliability gaps. Sister project to ci-doctor, gitlab-ci-doctor, bitbucket-ci-doctor.
Maintainers
Readme
azure-pipelines-ci-doctor
Audit azure-pipelines.yml for waste, cost, and security gaps. MIT, no telemetry.
Sister project to ci-doctor (GitHub Actions), gitlab-ci-doctor, and bitbucket-ci-doctor. Same engine, Azure-native rules.
Install
npx azure-pipelines-ci-doctor # one-shot
# or
npm i -g azure-pipelines-ci-doctorUse
azure-pipelines-ci-doctor # audit ./azure-pipelines.yml
azure-pipelines-ci-doctor --markdown # PR-comment friendly
azure-pipelines-ci-doctor --json # machine-readable
azure-pipelines-ci-doctor --rules # list checks
azure-pipelines-ci-doctor --demo # smoke-test
azure-pipelines-ci-doctor --severity=warn
azure-pipelines-ci-doctor --only=expensive-vm-image,container-no-pinRules
| id | severity | category | what |
| --- | --- | --- | --- |
| expensive-vm-image | warn | cost | macOS-latest (~10x) or windows-latest (~2x) without commands that need them |
| container-no-pin | warn | security | container.image: not pinned to @sha256:<digest> |
| missing-timeout-in-minutes | warn | cost | job has no timeoutInMinutes (default 60 hosted / 360 self-hosted) |
| missing-cache | warn | cost | npm/pip/maven/gradle/cargo/go/bundler installs without Cache@2 task |
| wide-trigger | warn | cost | trigger: or pr: unscoped (no branch or path filter) |
| inline-secret-leak | warn | security | step uses $(SECRET_NAME) macro - expands inline in logs |
| legacy-task-version | warn | reliability | built-in task pinned to outdated major version |
| unbounded-parallelism | warn | cost | strategy.parallel >= 5 or matrix >= 5 legs without maxParallel |
Drop into a pipeline
Add a stage that runs against itself on every PR:
- stage: AuditPipeline
jobs:
- job: cidoctor
timeoutInMinutes: 5
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseNode@2
inputs:
version: '20.x'
- script: npx --yes azure-pipelines-ci-doctor --markdown > $(Build.ArtifactStagingDirectory)/ci-doctor.md
- publish: $(Build.ArtifactStagingDirectory)/ci-doctor.md
artifact: ci-doctor-reportOr via Azure DevOps REST + a PR comment task to post inline on every iteration.
In-browser scanner
Paste any azure-pipelines.yml at https://depmedicdev-byte.github.io/scan-azure.html. No upload, no signup, runs entirely in your tab.
Family
- CLI: https://www.npmjs.com/package/azure-pipelines-ci-doctor
- GitHub Actions port: https://www.npmjs.com/package/ci-doctor
- GitLab port: https://www.npmjs.com/package/gitlab-ci-doctor
- Bitbucket port: https://www.npmjs.com/package/bitbucket-ci-doctor
License
MIT (c) depmedic
Sponsor / support depmedic
If this saved you 10 minutes of CI debugging, consider one of these. All of them keep the free CLIs free:
- Tip what you want — pay-what-you-want, $0 minimum: https://buy.polar.sh/polar_cl_tipjar?utm_source=npm&utm_medium=readme&utm_campaign=azure-pipelines-ci-doctor
- depmedic Pro $5/mo — one license, unlocks Pro tier in every depmedic CLI + the VS Code / Cursor extension, free access to every paid playbook for as long as you stay subscribed: https://buy.polar.sh/polar_cl_SUzmX5RCQCV8MJV3dDEBFMu3MGWu2WQhzZ1s02ZhK09?utm_source=npm&utm_medium=readme&utm_campaign=azure-pipelines-ci-doctor
- Everything Bundle $59 once — every paid playbook (current and future): https://buy.polar.sh/polar_cl_everything_bundle?utm_source=npm&utm_medium=readme&utm_campaign=azure-pipelines-ci-doctor
- Sponsor on GitHub — https://github.com/sponsors/depmedicdev-byte
More from depmedic
| | |
| --- | --- |
| ci-doctor | audit GitHub Actions for cost + security (16 rules) |
| gitlab-ci-doctor | same engine for .gitlab-ci.yml (14 rules) |
| bitbucket-ci-doctor | for bitbucket-pipelines.yml (8 rules) |
| azure-pipelines-ci-doctor | for azure-pipelines.yml (8 rules) |
| circleci-ci-doctor | for .circleci/config.yml (8 rules) |
| gha-budget | $-denominated cost estimate of any GHA workflow |
| pin-actions | one-shot SHA pinner for uses: blocks |
| cursor-rules-init | scaffold .cursor/rules/ for your stack |
| depmedic | all-in-one cli, finds outdated/risky deps |
| depmedic/ci-doctor-action | composite GitHub Action: PR comment + SARIF |
In-browser scanners (no install): GitHub · GitLab · Bitbucket · Azure · CircleCI.
Newsletter (weekly, low-volume): https://depmedicdev-byte.github.io/newsletter.html?utm_source=npm&utm_medium=readme&utm_campaign=azure-pipelines-ci-doctor.
