-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Azure Policy Bot
committed
Aug 15, 2024
1 parent
181ac23
commit 6ef2659
Showing
81 changed files
with
2,245 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...olicies/policyDefinitions/Azure Government/Kubernetes/MutateMountServiceAccountToken.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"properties": { | ||
"displayName": "[Preview]: Sets automountServiceAccountToken in the Pod spec in containers to false.", | ||
"policyType": "BuiltIn", | ||
"mode": "Microsoft.Kubernetes.Data", | ||
"description": "Setting automountServiceAccountToken to false increases security by avoiding the default auto-mounting of service account tokens", | ||
"metadata": { | ||
"version": "1.0.0-preview", | ||
"category": "Kubernetes", | ||
"preview": true | ||
}, | ||
"version": "1.0.0-preview", | ||
"parameters": { | ||
"effect": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Effect", | ||
"description": "'Mutate' modifies a non-compliant resource to be compliant when creating or updating. 'Disabled' turns off the policy.", | ||
"portalReview": true | ||
}, | ||
"allowedValues": [ | ||
"Mutate", | ||
"Disabled" | ||
], | ||
"defaultValue": "Mutate" | ||
}, | ||
"excludedNamespaces": { | ||
"type": "Array", | ||
"metadata": { | ||
"displayName": "Namespace exclusions", | ||
"description": "List of Kubernetes namespaces to exclude from policy evaluation." | ||
}, | ||
"defaultValue": [ | ||
"kube-system", | ||
"gatekeeper-system", | ||
"azure-arc" | ||
] | ||
} | ||
}, | ||
"policyRule": { | ||
"if": { | ||
"field": "type", | ||
"equals": "Microsoft.ContainerService/managedClusters" | ||
}, | ||
"then": { | ||
"effect": "[parameters('effect')]", | ||
"details": { | ||
"mutationInfo": { | ||
"sourceType": "PublicURL", | ||
"url": "https://store.policy.azure.us/kubernetes/mutate-mount-service-account-token/v1/mutation.yaml" | ||
}, | ||
"excludedNamespaces": "[parameters('excludedNamespaces')]" | ||
} | ||
} | ||
}, | ||
"versions": [ | ||
"1.0.0-PREVIEW" | ||
] | ||
}, | ||
"id": "/providers/Microsoft.Authorization/policyDefinitions/57f274ef-580a-4ed2-bcf8-5c6fa3775253", | ||
"name": "57f274ef-580a-4ed2-bcf8-5c6fa3775253" | ||
} |
62 changes: 62 additions & 0 deletions
62
...es/policyDefinitions/Azure Government/Kubernetes/MutatePrivilegeEscalationContainers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"properties": { | ||
"displayName": "[Preview]: Sets Privilege escalation in the Pod spec to false.", | ||
"policyType": "BuiltIn", | ||
"mode": "Microsoft.Kubernetes.Data", | ||
"description": "Setting Privilege escalation to false increases security by preventing containers from allowing privilege escalation such as via set-user-ID or set-group-ID file mode.", | ||
"metadata": { | ||
"version": "1.0.0-preview", | ||
"category": "Kubernetes", | ||
"preview": true | ||
}, | ||
"version": "1.0.0-preview", | ||
"parameters": { | ||
"effect": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Effect", | ||
"description": "'Mutate' modifies a non-compliant resource to be compliant when creating or updating. 'Disabled' turns off the policy.", | ||
"portalReview": true | ||
}, | ||
"allowedValues": [ | ||
"Mutate", | ||
"Disabled" | ||
], | ||
"defaultValue": "Mutate" | ||
}, | ||
"excludedNamespaces": { | ||
"type": "Array", | ||
"metadata": { | ||
"displayName": "Namespace exclusions", | ||
"description": "List of Kubernetes namespaces to exclude from policy evaluation." | ||
}, | ||
"defaultValue": [ | ||
"kube-system", | ||
"gatekeeper-system", | ||
"azure-arc" | ||
] | ||
} | ||
}, | ||
"policyRule": { | ||
"if": { | ||
"field": "type", | ||
"equals": "Microsoft.ContainerService/managedClusters" | ||
}, | ||
"then": { | ||
"effect": "[parameters('effect')]", | ||
"details": { | ||
"mutationInfo": { | ||
"sourceType": "PublicURL", | ||
"url": "https://store.policy.azure.us/kubernetes/mutate-privilege-escalation-containers/v1/mutation.yaml" | ||
}, | ||
"excludedNamespaces": "[parameters('excludedNamespaces')]" | ||
} | ||
} | ||
}, | ||
"versions": [ | ||
"1.0.0-PREVIEW" | ||
] | ||
}, | ||
"id": "/providers/Microsoft.Authorization/policyDefinitions/d77df159-718b-4aca-b94b-8e8890a98231", | ||
"name": "d77df159-718b-4aca-b94b-8e8890a98231" | ||
} |
62 changes: 62 additions & 0 deletions
62
...olicyDefinitions/Azure Government/Kubernetes/MutatePrivilegeEscalationInitContainers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"properties": { | ||
"displayName": "[Preview]: Sets Privilege escalation in the Pod spec in init containers to false.", | ||
"policyType": "BuiltIn", | ||
"mode": "Microsoft.Kubernetes.Data", | ||
"description": "Setting Privilege escalation to false in init containers increases security by preventing containers from allowing privilege escalation such as via set-user-ID or set-group-ID file mode.", | ||
"metadata": { | ||
"version": "1.0.0-preview", | ||
"category": "Kubernetes", | ||
"preview": true | ||
}, | ||
"version": "1.0.0-preview", | ||
"parameters": { | ||
"effect": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Effect", | ||
"description": "'Mutate' modifies a non-compliant resource to be compliant when creating or updating. 'Disabled' turns off the policy.", | ||
"portalReview": true | ||
}, | ||
"allowedValues": [ | ||
"Mutate", | ||
"Disabled" | ||
], | ||
"defaultValue": "Mutate" | ||
}, | ||
"excludedNamespaces": { | ||
"type": "Array", | ||
"metadata": { | ||
"displayName": "Namespace exclusions", | ||
"description": "List of Kubernetes namespaces to exclude from policy evaluation." | ||
}, | ||
"defaultValue": [ | ||
"kube-system", | ||
"gatekeeper-system", | ||
"azure-arc" | ||
] | ||
} | ||
}, | ||
"policyRule": { | ||
"if": { | ||
"field": "type", | ||
"equals": "Microsoft.ContainerService/managedClusters" | ||
}, | ||
"then": { | ||
"effect": "[parameters('effect')]", | ||
"details": { | ||
"mutationInfo": { | ||
"sourceType": "PublicURL", | ||
"url": "https://store.policy.azure.us/kubernetes/mutate-privilege-escalation-init-containers/v1/mutation.yaml" | ||
}, | ||
"excludedNamespaces": "[parameters('excludedNamespaces')]" | ||
} | ||
} | ||
}, | ||
"versions": [ | ||
"1.0.0-PREVIEW" | ||
] | ||
}, | ||
"id": "/providers/Microsoft.Authorization/policyDefinitions/4ee3ee6a-96ea-4d25-9c00-17f11d2e02c8", | ||
"name": "4ee3ee6a-96ea-4d25-9c00-17f11d2e02c8" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.