|
| 1 | +--- |
| 2 | +name: ado-assessment |
| 3 | +description: 'Review an Azure DevOps organization or project for adherence to Azure DevOps best practices. Use when: running an ADO Quick Review, evaluating org or project configuration, checking adoption of recommended settings, identifying improvement opportunities, ADO best practices, org review, project review.' |
| 4 | +--- |
| 5 | + |
| 6 | +# Azure DevOps Quick Review |
| 7 | + |
| 8 | +Review an Azure DevOps organization or project for adherence to **Azure DevOps best practices** by collecting settings via Azure CLI / REST API and evaluating them against documented Microsoft recommendations. |
| 9 | + |
| 10 | +**This skill does NOT call AzSK.ADO.** It brings best-practice knowledge derived from those controls and uses native Azure CLI and REST API calls to collect and evaluate settings. |
| 11 | + |
| 12 | +## Workflow |
| 13 | + |
| 14 | +### Phase 1 — Collect Settings |
| 15 | + |
| 16 | +Gather the current configuration of an ADO organization or project using `az devops` CLI commands and REST API calls. The reference files below contain the exact commands and API endpoints for each resource type. |
| 17 | + |
| 18 | +### Phase 2 — Assess Against Best Practices |
| 19 | + |
| 20 | +Compare collected settings against the best-practice controls documented in the reference files. Each control has a severity (High/Medium/Low), a rationale, and remediation guidance. Generate a report showing which best practices have been adopted and which remain as improvement opportunities. |
| 21 | + |
| 22 | +## Prerequisites |
| 23 | + |
| 24 | +```powershell |
| 25 | +# Azure CLI 2.81.0+ |
| 26 | +az version |
| 27 | +
|
| 28 | +# Azure DevOps extension |
| 29 | +az extension add --name azure-devops |
| 30 | +
|
| 31 | +# Login |
| 32 | +az login |
| 33 | +
|
| 34 | +# Set defaults |
| 35 | +az devops configure --defaults organization=https://dev.azure.com/<YourOrg> project=<YourProject> |
| 36 | +``` |
| 37 | + |
| 38 | +## Authentication |
| 39 | + |
| 40 | +```powershell |
| 41 | +# Interactive login |
| 42 | +az login |
| 43 | +
|
| 44 | +# PAT-based login (for automation) |
| 45 | +$env:AZURE_DEVOPS_EXT_PAT = '<your-pat>' |
| 46 | +az devops login |
| 47 | +
|
| 48 | +# Get REST API bearer token |
| 49 | +$token = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query accessToken -o tsv |
| 50 | +``` |
| 51 | + |
| 52 | +## Resource Types Covered |
| 53 | + |
| 54 | +| Resource | Controls | Scope | |
| 55 | +|---|---|---| |
| 56 | +| Organization | 35+ controls | Auth, users, extensions, pipelines, feeds, audit | |
| 57 | +| Project | 25+ controls | Visibility, admins, pipelines, permissions, credential scanning | |
| 58 | +| Build Pipelines | 20+ controls | Secrets, permissions, forks, branches, task groups | |
| 59 | +| Release Pipelines | 12+ controls | Secrets, approvals, permissions, task groups | |
| 60 | +| Service Connections | 15+ controls | Auth, scope, access, permissions, branches | |
| 61 | +| Agent Pools | 10+ controls | Permissions, auto-provision, patching, secrets | |
| 62 | +| Repos / Feeds / Secure Files / Environments | 20+ controls | Access, permissions, branches, approvals | |
| 63 | +| Variable Groups | 10+ controls | Secrets, permissions, access, branches | |
| 64 | +| Users / PATs | 6+ controls | PAT scope, expiry, alternate credentials | |
| 65 | + |
| 66 | +Each resource is evaluated against documented Microsoft best practices. |
| 67 | + |
| 68 | +## Reference Files |
| 69 | + |
| 70 | +Read the relevant reference file based on the user's assessment scope. |
| 71 | + |
| 72 | +| File | Keywords | Covers | |
| 73 | +|---|---|---| |
| 74 | +| [references/org-settings.md](./references/org-settings.md) | organization, org, AAD, external users, public projects, extensions, audit, OAuth, SSH, feeds, conditional access, admin | Organization-level settings — collection commands and best-practice controls | |
| 75 | +| [references/project-settings.md](./references/project-settings.md) | project, visibility, admin, credential scanner, permissions, pipeline scoping, inactive | Project-level settings — collection commands and best-practice controls | |
| 76 | +| [references/build-controls.md](./references/build-controls.md) | build, pipeline, CI, secrets, fork, task group, variable, branch, YAML | Build pipeline best-practice controls — collection commands and assessments | |
| 77 | +| [references/release-controls.md](./references/release-controls.md) | release, deployment, approval, CD, production, stage | Release pipeline best-practice controls — collection commands and assessments | |
| 78 | +| [references/service-connection-controls.md](./references/service-connection-controls.md) | service connection, endpoint, SPN, certificate, subscription, ARM | Service connection best-practice controls — collection commands and assessments | |
| 79 | +| [references/agent-pool-controls.md](./references/agent-pool-controls.md) | agent, pool, self-hosted, auto-provision, auto-update | Agent pool best-practice controls — collection commands and assessments | |
| 80 | +| [references/repo-feed-environment-controls.md](./references/repo-feed-environment-controls.md) | repository, repo, feed, artifact, secure file, environment, branch protection | Repos, feeds, secure files, and environment best-practice controls | |
| 81 | +| [references/variable-group-controls.md](./references/variable-group-controls.md) | variable group, secret, key vault, linked | Variable group best-practice controls | |
| 82 | +| [references/user-pat-controls.md](./references/user-pat-controls.md) | user, PAT, personal access token, alternate credentials, inactive | User and PAT hygiene best-practice controls | |
| 83 | +| [references/errors.md](./references/errors.md) | error, 401, 403, permission denied, troubleshoot | Common errors and troubleshooting | |
| 84 | + |
| 85 | +## Assessment Output Format |
| 86 | + |
| 87 | +When reporting results, use this format for each control: |
| 88 | + |
| 89 | +``` |
| 90 | +| Status | Severity | Control | Finding | |
| 91 | +|--------|----------|---------|---------| |
| 92 | +| PASS | High | AAD authentication enabled | Organization uses AAD-backed auth | |
| 93 | +| FAIL | High | External user access | 3 external users found with access | |
| 94 | +| FAIL | Medium | Audit streaming | Audit streaming is not configured | |
| 95 | +``` |
| 96 | + |
| 97 | +Summarize at the end with counts: `X PASS | Y FAIL | Z NOT CHECKED` |
| 98 | + |
| 99 | +## Saving Results |
| 100 | + |
| 101 | +After the assessment completes, save the results as Markdown files **in the workspace root**. Create separate files for the organization and each project: |
| 102 | + |
| 103 | +| File | Contents | |
| 104 | +|---|---| |
| 105 | +| `{org-name}-org-assessment.md` | Organization-level controls (auth, users, extensions, pipelines, feeds, audit, agent pools, PATs) | |
| 106 | +| `{org-name}-{project-name}-assessment.md` | Project-level controls (visibility, admins, pipeline settings, permissions) **plus** all project-scoped resources: build pipelines, release pipelines, service connections, repos, feeds, environments, variable groups, secure files | |
| 107 | + |
| 108 | +### File naming |
| 109 | + |
| 110 | +- Use the organization short name and project name, lowercased and with spaces replaced by hyphens. |
| 111 | +- Examples for org `pbi-demo` with projects `eShop Web Demo` and `CL-DEMO`: |
| 112 | + - `pbi-demo-org-assessment.md` |
| 113 | + - `pbi-demo-eshop-web-demo-assessment.md` |
| 114 | + - `pbi-demo-cl-demo-assessment.md` |
| 115 | + |
| 116 | +### File structure |
| 117 | + |
| 118 | +Each file must include: |
| 119 | + |
| 120 | +1. **Header** — assessment date, organization/project name, assessor |
| 121 | +2. **Control results table** — the standard `Status | Severity | Control | Finding` table |
| 122 | +3. **Summary counts** — `X PASS | Y FAIL | Z NOT CHECKED` |
| 123 | +4. **Critical findings** — list of FAIL items sorted by severity (High first) with remediation steps |
| 124 | + |
| 125 | +### When to write |
| 126 | + |
| 127 | +Write the files at the end of Phase 2 (after all controls are assessed and results are shown to the user). Always create the files — do not ask for confirmation. |
0 commit comments