AzureDevOps organization critical builtIn

Description

Additional protections when using public package registries. Learn more: https://devblogs.microsoft.com/devops/changes-to-azure-artifact-upstream-behavior https://learn.microsoft.com/en-us/azure/devops/artifacts/concepts/upstream-sources

Recommendation

1. Go to Organization Settings. 
2. Click on Security -> Policies. 
3. Security policies. 
4. Turn 'On' the setting 'Additional protections when using public package registries'.

Policy Rule

{
  "target": "ADOOrganizationPolicy",
  "if": {
    "allOf": [
      {
        "resource": "ADOOrganizationPolicy",
        "property": "Policy.Name",
        "operator": "equals",
        "value": "Policy.ArtifactsExternalPackageProtectionToken"
      },
      {
        "resource": "ADOOrganizationPolicy",
        "property": "Policy.Value",
        "operator": "equals",
        "value": true
      }
    ]
  },
  "then": {
    "effect": "Audit"
  }
}