AZDO.1018 - Protect access to repositories in YAML pipelines.
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β
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β
Test Metadataβ
| Field | Value |
|---|---|
| Test ID | AZDO.1018 |
| Severity | High |
| Suite | Maester |
| Category | Azure DevOps |
| 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 |
| Tags | AZDO, AZDO.1018 |
Sourceβ
- Test:
tests/Maester/AzureDevOps/Test.AZDO.1018.ps1 - Documentation:
tests/Maester/AzureDevOps/Test.AZDO.1018.md
