Protect access to repositories in YAML pipelines
AZDO.1018 is in Maester 3.0.0-preview and not in the stable 2.3.0 release yet. It will be in the next stable release. To use it now, install the preview:
Install-Module Maester -AllowPrerelease -ForceHow to get the preview, and go backUse the preview in GitHub Actions
Part of Maester · Azure DevOps · Pipelines · All checks
Invoke-Maester -TestId AZDO.1018Overview
Section titled “Overview”Access to repositories in YAML pipelines should apply checks and approval before granting access.
Rationale: To enhance security, consider separating your projects, using branch policies, and adding more security measures for forks. Minimize the scope of service connections and use the most secure authentication methods.
Remediation action
Section titled “Remediation action”Enable the policy to apply checks and approvals.
- Sign in to your organization.
- Choose Organization settings.
- Under the Pipelines section choose Settings.
- In the General section, toggle on “Protect access to repositories in YAML pipelines”.
Results: Apply checks and approvals when accessing repositories from YAML pipelines. Also, generate a job access token that is scoped to repositories that are explicitly referenced in the YAML pipeline.
Related links
Section titled “Related links”Details
Section titled “Details”Every attribute of this check
| Field | Value |
|---|---|
| Test ID | AZDO.1018 |
| Severity | High |
| Suite | Maester |
| Product | Azure DevOps |
| Feature | Pipelines |
| Area | Engineering systems |
| Resource type | Tenant |
| User impact | Medium |
| Implementation cost | Medium |
| MITRE ATT&CK | T1550.001 Application Access Token, T1213.003 Code Repositories |
| Supports controls | nist-800-53-r5:AC-3, nist-800-53-r5:AC-6 |
| PowerShell test | Test-AzdoOrganizationProtectAccessToRepository |
| Services | AzureDevOps |
| Learn more | https://learn.microsoft.com/azure/devops/pipelines/security/overview?view=azure-devops#restrict-project-repository-and-service-connection-access |
Source
Section titled “Source”About this check
- Severity
- High
- Effort to fix
- Medium
- Impact on users
- Medium
- Product
- Azure DevOps
- Feature
- Pipelines
- Area
- Engineering systems
- Suite
- Maester