Skip to content
3.0 preview2.3.0 stable

These docs describe the preview. Pick the version you run and every page marks what it doesn't have yet. Get the preview →
Maester 2.x docs (archived) →

Sponsor

Limit job authorization scope to current project for non-release pipelines

AZDO.1016HighAzure DevOpsPipelinesPreview 3.0

Part of Maester · Azure DevOps · Pipelines · All checks

Run this check
Invoke-Maester -TestId AZDO.1016

YAML & build 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 YAML 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.

Enable the policy to restrict the job authorization scope.

  1. Sign in to your organization.
  2. Choose Organization settings.
  3. Under the Pipelines section choose Settings.
  4. In the General section, toggle on “Limit job authorization scope to current project for non-release pipelines”.
Every attribute of this check
FieldValue
Test IDAZDO.1016
SeverityHigh
SuiteMaester
ProductAzure DevOps
FeaturePipelines
AreaEngineering systems
Resource typeTenant
User impactMedium
Implementation costMedium
MITRE ATT&CKT1550.001 Application Access Token, T1213.003 Code Repositories
Supports controlsnist-800-53-r5:AC-6
PowerShell testTest-AzdoOrganizationLimitJobAuthorizationScopeNonReleasePipeline
ServicesAzureDevOps
Learn morehttps://learn.microsoft.com/azure/devops/pipelines/process/access-tokens?view=azure-devops&tabs=yaml#job-authorization-scope