Limit job authorization scope to current project for classic release pipelines
AZDO.1017 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.1017Overview
Section titled “Overview”Release pipelines should have restricted access to only those repositories that are in the same project as the pipeline.
Rationale: If the scope is not restricted at either the organization level or project level, then every job in your release pipeline gets a collection scoped job access token. In other words, your pipeline has access to any repository in any project of your organization. If an adversary is able to gain access to a single pipeline in a single project, they will be able to gain access to any repository in your organization. This is why it is recommended that you restrict the scope at the highest level (organization settings) in order to contain the attack to a single project.
Remediation action
Section titled “Remediation action”Enable the policy to restrict the job authorization scope.
- Sign in to your organization.
- Choose Organization settings.
- Under the Pipelines section choose Settings.
- In the General section, toggle on “Limit job authorization scope to current project for release pipelines”.
Related links
Section titled “Related links”Details
Section titled “Details”Every attribute of this check
| Field | Value |
|---|---|
| Test ID | AZDO.1017 |
| 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-6 |
| PowerShell test | Test-AzdoOrganizationLimitJobAuthorizationScopeReleasePipeline |
| Services | AzureDevOps |
| Learn more | https://learn.microsoft.com/azure/devops/pipelines/process/access-tokens?view=azure-devops&tabs=yaml#job-authorization-scope |
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