Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
287e366
udpate category and add cognitive service policy
taoyangcloud Apr 22, 2026
56334c5
Add new policies for Cognitive Services and update existing diagnosti…
taoyangcloud Apr 23, 2026
ce2b2cf
Refactor workflow configuration for clarity and consistency in policy…
taoyangcloud Apr 23, 2026
5018990
Add Azure Cosmos DB policies and assignments for security compliance
taoyangcloud Apr 23, 2026
2b9508d
Refactor diagnostic settings policies to use parameterized log and me…
taoyangcloud Apr 23, 2026
dd48979
Fix policy name and update display name for AppInsights diagnostic se…
taoyangcloud Apr 23, 2026
00a3a42
Refactor Cosmos DB diagnostic settings to consolidate log categories …
taoyangcloud Apr 23, 2026
1ccc2cb
Fix profileName value in diagnostic settings policies for consistency
taoyangcloud Apr 24, 2026
2c18b14
Update AzPolicyTest module version to 3.0.0 and improve action.yml fo…
taoyangcloud May 1, 2026
c9fb532
Update AzPolicyTest module version to 3.1.0 in pipeline templates
taoyangcloud May 1, 2026
f89adb7
Update policy assignment and definition resources to use 2026-01-01-p…
taoyangcloud May 2, 2026
a0f51e3
Update policy assignment, definition, exemption, and set definition r…
taoyangcloud May 2, 2026
25c649b
Update policy module versions to 3.1.0 and set action group policy ve…
taoyangcloud May 2, 2026
cfdb5ba
Remove version property from multiple policy definition files
taoyangcloud May 2, 2026
a78ab2a
Update AzPolicyTest module version to 3.1.1 in pipeline templates
taoyangcloud May 2, 2026
8b48fa4
Add PEDNS-016 effect for Cognitive Service Accounts to policy initiative
taoyangcloud May 5, 2026
a688384
Update policy definitions and assignments to use 2026-01-01-preview A…
taoyangcloud May 8, 2026
ff67c20
Update policy assignments and definitions to use 2025-12-01-preview A…
taoyangcloud May 8, 2026
8681af7
Update policy definition references for Cosmos DB initiative and remo…
taoyangcloud May 8, 2026
7618ce5
Update policy definition reference for COSMOS-007 to use new policy ID
taoyangcloud May 8, 2026
f6c5316
Add allowed locations for COSMOS-007 and update integration test temp…
taoyangcloud May 11, 2026
054fccf
Add PEDNS-017 effect and update integration tests for Azure Cosmos DB…
taoyangcloud May 11, 2026
a8f39d4
Update minimalTlsVersion formatting in Cosmos DB policy templates for…
taoyangcloud May 11, 2026
63a027a
Update policy definition groups and clean up deprecated entries in Co…
taoyangcloud May 11, 2026
a403bc3
Refactor policy definitions for Cognitive Services: update field refe…
taoyangcloud May 11, 2026
34b0acf
Add new policy definitions and assignments for Cognitive Services: re…
taoyangcloud May 11, 2026
3675579
Update Azure Cognitive Services policy assignments: modify effects an…
taoyangcloud May 11, 2026
078d650
Update modelFormat structure in policy definitions for Cognitive Serv…
taoyangcloud May 11, 2026
9ce287a
Rename allowedFormats and allowedNames parameters to listOfAllowedFor…
taoyangcloud May 11, 2026
7b5ab41
Add integration tests and configuration for Cognitive Services policies
taoyangcloud May 12, 2026
c4f3b77
Update resource identifiers in Azure Private Endpoint DNS Records pol…
taoyangcloud May 12, 2026
6aadf69
Update storage account API version to 2025-08-01 in integration test …
taoyangcloud May 12, 2026
2af5d5d
Remove unused variable resourceSubnetName from cognitive service test…
taoyangcloud May 12, 2026
ff400fe
Enhance Cosmos DB policy to include capability checks and update poli…
taoyangcloud May 12, 2026
29be506
Refactor Cognitive Services policy assignments to update allowed mode…
taoyangcloud May 12, 2026
444b7b8
Refactor policy rule in Cosmos DB audit policy to check for capabilit…
taoyangcloud May 12, 2026
e636376
Add unique suffix to Cognitive Service account names in test templates
taoyangcloud May 12, 2026
612b1ff
Update Cognitive Services and Cosmos DB resource definitions to use l…
taoyangcloud May 12, 2026
dee51ef
Update COSMOS-001 Effect to Modify in Cosmos DB policy assignments an…
taoyangcloud May 13, 2026
b3f42ed
Update identity to SystemAssigned and modify roleDefinitionIds in Cos…
taoyangcloud May 13, 2026
39f84e5
Update COSMOS-001 Effect to Modify in Cosmos DB policy definitions an…
taoyangcloud May 13, 2026
3aeb625
Update identity to SystemAssigned and add roleDefinitionIds in Cognit…
taoyangcloud May 13, 2026
46c0d53
Update COG-001 Effect to Modify in both dev and prod Cognitive Servic…
taoyangcloud May 13, 2026
cd3a3ce
Update allowed names and resource references in Cognitive Services po…
taoyangcloud May 13, 2026
189799c
Update COG-004 Effect to Audit and modify allowed names in Cognitive …
taoyangcloud May 13, 2026
cfda2b9
Update workflow triggers and format in policy-initiatives.yml; modify…
taoyangcloud May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azuredevops/templates/template-stage-policy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ stages:
- template: ./template-task-install-ps-modules.yml
parameters:
displayName: "Install AzPolicyTest Module"
moduleNames: "AzPolicyTest`@2.8.2"
moduleNames: "AzPolicyTest`@3.1.1"
shouldInstall: ${{ or(eq(parameters.runPolicyJsonPesterTests, true), eq(parameters.runPolicyInitiativePesterTests, true), eq(parameters.runPolicyDefinitionPesterTests, true)) }}

- pwsh: |
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://github.com/AzPolicyFactory/AzPolicyFactory/tree/main/docs
url: https://github.com/Azure/AzPolicyFactory/tree/main/docs
about: Check the documentation before opening an issue
9 changes: 6 additions & 3 deletions .github/actions/templates/test-policy-def/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "Policy Definition Pester Tests"
description: "Runs Pester tests for Azure Policy Definitions, Initiatives, and JSON content using the AzPolicyTest module"
description: "Runs Pester tests for Azure Policy Definitions, Initiatives, and
JSON content using the AzPolicyTest module"
author: "Tao Yang"

inputs:
Expand Down Expand Up @@ -41,7 +42,9 @@ runs:
using: "composite"
steps:
- name: Install AzPolicyTest Module
if: inputs.run-policy-json-pester-tests == 'true' || inputs.run-policy-initiative-pester-tests == 'true' || inputs.run-policy-definition-pester-tests == 'true'
if: inputs.run-policy-json-pester-tests == 'true' ||
inputs.run-policy-initiative-pester-tests == 'true' ||
inputs.run-policy-definition-pester-tests == 'true'
shell: pwsh
env:
INPUT_WORKSPACE_DIRECTORY: ${{ github.workspace }}
Expand All @@ -50,7 +53,7 @@ runs:
Write-Output '::group::Install AzPolicyTest Module'
$scriptPath = "$env:INPUT_WORKSPACE_DIRECTORY/scripts/pipelines/pipeline-install-moduleFromRepo.ps1"
& $scriptPath `
-modules 'AzPolicyTest@2.8.2' `
-modules 'AzPolicyTest@3.1.1' `
-repoName 'PSGallery' `
-maxRetry 3 `
-allowPrerelease 'false'
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/policy-initiatives.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: policy-initiatives

on:
workflow_dispatch: # allows a manual run from the UI
workflow_dispatch:
# allows a manual run from the UI
inputs:
debug:
description: "Enable debug logging"
Expand All @@ -28,7 +29,9 @@ jobs:
job_call_initiation:
name: Initiation
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
if:
${{ github.event.workflow_run.conclusion == 'success' || github.event_name
== 'workflow_dispatch' }}
steps:
- name: "Checkout"
uses: actions/checkout@v6
Expand Down Expand Up @@ -79,7 +82,7 @@ jobs:
definition-file-path: "${{env.definitionFileDirectory}}"
template-file-directory: "${{env.templateFileDirectory}}"
bicep-file-path: "${{env.templateFileDirectory}}/${{env.templateFileName}}"
bicep-variable-name: "policyInitiatives"
bicep-variable-name: "policySetDefinitions"
build-artifact-name: "policy_set_bicep_dev"

job_build_prod:
Expand All @@ -100,7 +103,7 @@ jobs:
definition-file-path: "${{env.definitionFileDirectory}}"
template-file-directory: "${{env.templateFileDirectory}}"
bicep-file-path: "${{env.templateFileDirectory}}/${{env.templateFileName}}"
bicep-variable-name: "policyInitiatives"
bicep-variable-name: "policySetDefinitions"
build-artifact-name: "policy_set_bicep_prod"

job_test_dev:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -418,4 +418,6 @@ FodyWeavers.xsd
*.msp

#Mac
.DS_Store
.DS_Store
.github/workflows/package.json
.github/workflows/package-lock.json
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@
"unauthorized",
"vnet",
"whatif"
]
],
"sarif-viewer.connectToGithubCodeScanning": "off"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var identityVar = policyAssignment.?identity == 'SystemAssigned'
}
: null

resource assignment 'Microsoft.Authorization/policyAssignments@2025-03-01' = {
resource assignment 'Microsoft.Authorization/policyAssignments@2025-12-01-preview' = {
name: policyAssignment.name
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var identityVar = policyAssignment.?identity == 'SystemAssigned'
}
: null

resource assignment 'Microsoft.Authorization/policyAssignments@2025-03-01' = {
resource assignment 'Microsoft.Authorization/policyAssignments@2025-12-01-preview' = {
name: policyAssignment.name
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var identityVar = policyAssignment.?identity == 'SystemAssigned'
}
: null

resource assignment 'Microsoft.Authorization/policyAssignments@2025-03-01' = {
resource assignment 'Microsoft.Authorization/policyAssignments@2025-12-01-preview' = {
name: policyAssignment.name
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
2 changes: 1 addition & 1 deletion bicep/modules/authorization/policy-assignment/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var additionalMetadata = {
}

@batchSize(15)
resource policies 'Microsoft.Authorization/policyDefinitions@2025-03-01' = [
resource policies 'Microsoft.Authorization/policyDefinitions@2025-12-01-preview' = [
for policyDefinition in policyDefinitions: {
name: policyDefinition.name
properties: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var additionalMetadata = {
}

@batchSize(15)
resource policies 'Microsoft.Authorization/policyDefinitions@2025-03-01' = [
resource policies 'Microsoft.Authorization/policyDefinitions@2025-12-01-preview' = [
for policyDefinition in policyDefinitions: {
name: policyDefinition.name
properties: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
2 changes: 1 addition & 1 deletion bicep/modules/authorization/policy-definition/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var additionalMetadata = union(policyExemption.?metadata ?? {}, {
hidden_vml_version: loadJsonContent('./version.json').version
})

resource exemption 'Microsoft.Authorization/policyExemptions@2024-12-01-preview' = {
resource exemption 'Microsoft.Authorization/policyExemptions@2025-12-01-preview' = {
name: policyExemption.name
properties: {
displayName: policyExemption.?displayName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.1",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var additionalMetadata = union(policyExemption.?metadata ?? {}, {
hidden_vml_version: loadJsonContent('./version.json').version
})

resource exemption 'Microsoft.Authorization/policyExemptions@2024-12-01-preview' = {
resource exemption 'Microsoft.Authorization/policyExemptions@2025-12-01-preview' = {
name: policyExemption.name
properties: {
displayName: policyExemption.?displayName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.1",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var additionalMetadata = union(policyExemption.?metadata ?? {}, {
hidden_vml_version: loadJsonContent('./version.json').version
})

resource exemption 'Microsoft.Authorization/policyExemptions@2024-12-01-preview' = {
resource exemption 'Microsoft.Authorization/policyExemptions@2025-12-01-preview' = {
name: policyExemption.name
properties: {
displayName: policyExemption.?displayName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.1",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
2 changes: 1 addition & 1 deletion bicep/modules/authorization/policy-exemption/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "1.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var additionalMetadata = {
}

@batchSize(15)
resource policySets 'Microsoft.Authorization/policySetDefinitions@2025-03-01' = [
resource policySets 'Microsoft.Authorization/policySetDefinitions@2025-12-01-preview' = [
for policySetDefinition in policySetDefinitions: {
name: policySetDefinition.name
properties: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var additionalMetadata = {
}

@batchSize(15)
resource policySets 'Microsoft.Authorization/policySetDefinitions@2025-03-01' = [
resource policySets 'Microsoft.Authorization/policySetDefinitions@2025-12-01-preview' = [
for policySetDefinition in policySetDefinitions: {
name: policySetDefinition.name
properties: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "3.0.0",
"version": "3.1.0",
"pathFilters": [
"./main.json"
]
Expand Down
1 change: 1 addition & 0 deletions bicep/templates/policyInitiatives/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var mappedPolicySetDefinitions = map(range(0, length(policySetDefinitions)), i =
'{policyLocationResourceId}',
managementGroupId
)
definitionVersion: policySetDefinitions[i].properties.policyDefinitions[c].?definitionVersion
parameters: policySetDefinitions[i].properties.policyDefinitions[c].?parameters
groupNames: policySetDefinitions[i].properties.policyDefinitions[c].?groupNames
})
Expand Down
61 changes: 61 additions & 0 deletions policyAssignments/dev/pa-d-cog-service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"$schema": "../policyAssignment.schema.json",
"policyAssignment": {
"name": "pa-d-cog-service",
"displayName": "Azure Cognitive Services Policies Dev",
"description": "Policy Assignment for Azure Cognitive Services - Dev",
"metadata": {
"category": "Azure Cognitive Services"
},
"policyDefinitionId": "{policyLocationResourceId}/providers/Microsoft.Authorization/policySetDefinitions/polset-cognitive-service",
"identity": "SystemAssigned",
"parameters": {
"COG-001_Effect": {
"value": "Modify"
},
"COG-002_Effect": {
"value": "Deny"
},
"COG-003_Effect": {
"value": "Deny"
},
"COG-004_Effect": {
"value": "Audit"
},
"COG-005_Effect": {
"value": "Deny"
},
"COG-005_listOfAllowedFormats": {
"value": [
"xAI",
"OpenAI"
]
},
"COG-006_Effect": {
"value": "Deny"
},
"COG-006_listOfAllowedNames": {
"value": [
"gpt-4.1",
"gpt-5.4",
"gpt-5.3-codex"
]
},
"COG-007_Effect": {
"value": "Deny"
},
"COG-007_listOfAllowedNames": {
"value": [
"grok-4",
"grok-4-1-fast-reasoning"
]
}
},
"nonComplianceMessages": [],
"roleDefinitionIds": [
"/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
]
},
"definitionSourceManagementGroupId": "/providers/Microsoft.Management/managementGroups/CONTOSO-DEV",
"managementGroupId": "CONTOSO-DEV"
}
Loading
Loading