ado-security-policies
Skill0 starsChanged 8 months agoMITView on GitHub
Use when configuring Azure DevOps security — security groups and permissions, branch policies, PR policies, audit log review, and org/project-level security governance.
In this repository190 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-auditSkill
- accessibility-complianceSkill
- ado-api-cliSkill
- ado-artifactsSkill
- ado-container-deploymentsSkill
- ado-organizationSkill
- ado-pipeline-designSkill
- ado-pipeline-optimizationSkill
- ado-pipeline-securitySkill
- ado-pipelines-opsSkill
- ado-release-managementSkill
- ado-work-trackingSkill
- adr-writingSkill
- agentic-ai-patternsSkill
- agentic-evalSkill
- agentic-memorySkill
- agentic-reliabilitySkill
- agentic-securitySkill
- ai-data-moatSkill
- ai-harnessSkill
- ai-product-designSkill
- ai-product-monetizationSkill
- ai-product-positioningSkill
- ai-product-retentionSkill
- ai-product-validationSkill
- ai-safety-guardrailsSkill
- add-analytics-instrumentationSkill
- analyze-account-healthSkill
- analyze-ai-topicsSkill
- analyze-chartSkill
- analyze-dashboardSkill
- analyze-experimentSkill
- analyze-feedbackSkill
- compare-user-journeysSkill
- create-chartSkill
- create-dashboardSkill
- daily-briefSkill
- debug-replaySkill
- diagnose-errorsSkill
- diff-intakeSkill
- discover-analytics-patternsSkill
- discover-event-surfacesSkill
- discover-opportunitiesSkill
- instrument-eventsSkill
- investigate-ai-sessionSkill
- monitor-ai-qualitySkill
- monitor-reliabilitySkill
- replay-ux-auditSkill
- review-agent-insightsSkill
- taxonomySkill
- weekly-briefSkill
- what-would-lenny-doSkill
- analytics-reportingSkill
- api-contract-testingSkill
- api-designSkill
- authentication-patternsSkill
- blockchain-auditSkill
- brainstormingSkill
- brand-voiceSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 126
No audit log monitoring (security incidents go undetected)
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ADO Security & Policies
When to Use
- Setting up security groups and permission inheritance
- Configuring branch protection policies (required reviewers, builds, etc.)
- Reviewing audit logs for security incidents
- Implementing PR quality policies
- Least-privilege access design for projects
Core Jobs
1. Security Groups & Permissions
# 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 user@company.com
# Create custom group
az devops security group create \
--name "Release Managers" \
--description "Can approve production releases" \
--project MyProjectBuilt-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.
2. Branch Policies
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 pushBypass permissions: Grant "Bypass policies when completing pull requests" ONLY to Release Managers group.
3. PR Policies
# Get policy list for a repo
az repos policy list --branch main --repository MyRepo --project MyProject --output tableUseful 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
4. Audit Log Review
# 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.jsonKey events to monitor:
Security.ModifyPermission— permission changesGit.RefUpdatePoliciesBypassed— branch policy bypassPipelineRun.AccessSecureFile/PipelineRun.AccessVariableGroup— sensitive resource accessExtension.Installed/Extension.Disabled— marketplace changes
Key Concepts
- Security descriptor — unique identifier for a security group
- Inheritance — child permissions inherit from parent (project → team → user); explicit deny overrides
- Branch policy — server-side enforcement on protected branches; cannot be bypassed without explicit grant
- Bypass policy — privilege allowing specific users/groups to merge without meeting policies; audit carefully
- Audit log — org-level activity log; 90-day retention for basic, longer with streaming to SIEM
Checklist
- Main/release branches have branch policies enabled?
- Self-approval disabled (requestors cannot approve own PRs)?
- CI build required before merge on protected branches?
- Audit log streaming configured (SIEM or Azure Monitor)?
- Bypass policy granted to named group (not individuals, not Contributors)?
- No direct permission assignments to individuals (groups only)?
Key Outputs
- Branch policies configured on all protected branches
- Security groups aligned to least-privilege roles
- Audit log export schedule for compliance
- PR quality policies consistently applied
Output Format
- 🔴 Critical — no branch policies on main (anyone can push directly), bypass policy granted to Contributors, audit log not monitored
- 🟡 Warning — self-approval allowed, no required build on PRs, permissions assigned to individuals not groups
- 🟢 Suggestion — stream audit logs to Azure Monitor, add Required Reviewer policy for security-sensitive paths, enable work item linking for traceability
Anti-Patterns
- Granting bypass policy to broad groups (defeats the purpose of branch policies)
- Setting minimum reviewers to 1 with self-approval allowed (= no real review)
- No audit log monitoring (security incidents go undetected)
- Permission sprawl — too many groups with overlapping permissions
Integration
ado-organization— org-level security settings (AAD, guest access)ado-api-cli— automate security group membership and policy configuration
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

