skills/ado-security-policies/SKILL.md
Use when configuring Azure DevOps security — security groups and permissions, branch policies, PR policies, audit log review, and org/project-level security governance.
npx skillsauth add kienbui1995/magic-powers ado-security-policiesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
# List security groups in project
az devops security group list --project MyProject --output table
# Add member to group
az devops security group membership add \
--group-id $GROUP_DESCRIPTOR \
--member-id [email protected]
# Create custom group
az devops security group create \
--name "Release Managers" \
--description "Can approve production releases" \
--project MyProject
Built-in groups (project level): | Group | Default permissions | |-------|-------------------| | Contributors | Read/write code, create PRs, run pipelines | | Readers | Read-only access | | Project Administrators | Full project control | | Build Administrators | Manage pipelines and agent pools | | Release Managers | Manage release pipelines |
Principle: Use groups, not individuals. Assign permissions to groups, add users to groups.
Configure via UI: Repos → Branches → branch name → Branch policies
Critical policies for protected branches (main/release):
# Key settings to enable:
Require minimum number of reviewers: 2
Allow requestors to approve: false # no self-approval
Reset votes on new pushes: true
Check for linked work items: true # traceability
Check for comment resolution: true
Limit merge strategies: Squash merge only # clean history
Require a successful build: true
Pipeline: [your CI pipeline]
Trigger: Automatic on every push
Bypass permissions: Grant "Bypass policies when completing pull requests" ONLY to Release Managers group.
# Get policy list for a repo
az repos policy list --branch main --repository MyRepo --project MyProject --output table
Useful policy types:
Minimum number of reviewers — prevents self-mergeRequired reviewer — force specific team review (security team, architects)Work item linking — mandatory traceabilityBuild — CI must pass before mergeComment resolution — all PR comments must be resolved# Get audit log (last 7 days)
az devops audit log query \
--start-time "2026-04-01" \
--end-time "2026-04-12" \
--output table
# Export to file
az devops audit log query \
--start-time "2026-04-01" \
--output json > audit-log.json
Key events to monitor:
Security.ModifyPermission — permission changesGit.RefUpdatePoliciesBypassed — branch policy bypassPipelineRun.AccessSecureFile / PipelineRun.AccessVariableGroup — sensitive resource accessExtension.Installed / Extension.Disabled — marketplace changesado-organization — org-level security settings (AAD, guest access)ado-api-cli — automate security group membership and policy configurationcontent-media
Use when designing for XR (AR/VR/MR), choosing interaction modes, or adapting 2D UI patterns for spatial computing
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when executing a structured workflow — select and run a feature, bugfix, refactor, research, or incident template with correct agent and model assignments per phase.