AzureDevOps organization critical builtIn

Description

Limit building pull requests from forked GitHub repositories. Disable building pull requests from forked repositories. With this enabled, No pipeline will build pull requests from forked repositories. Learn more: https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/github#contributions-from-forks

Recommendation

1. Navigate to Organization Settings. 
2. Open the Settings link under Pipelines. 
3. Under the 'Triggers' section, turn 'On' the setting 'Limit building pull requests from forked GitHub repositories'. 
4. Turn 'On' the setting 'Disable building pull requests from forked repositories'.

Policy Rule

{
  "target": "ADOOrganizationPipelineSettings",
  "if": {
    "allOf": [
      {
        "resource": "ADOOrganizationPipelineSettings",
        "property": "ForkProtectionEnabled",
        "operator": "equals",
        "value": true
      },
      {
        "resource": "ADOOrganizationPipelineSettings",
        "property": "BuildsEnabledForForks",
        "operator": "equals",
        "value": false
      }
    ]
  },
  "then": {
    "effect": "Audit"
  }
}