2023-08-02 15:18:05 +02:00
|
|
|
include::../description.adoc[]
|
2022-01-03 16:39:34 +01:00
|
|
|
|
2023-08-02 15:18:05 +02:00
|
|
|
include::../ask-yourself.adoc[]
|
2022-01-03 16:39:34 +01:00
|
|
|
|
2023-08-02 15:18:05 +02:00
|
|
|
include::../recommended.adoc[]
|
2022-01-03 16:39:34 +01:00
|
|
|
|
|
|
|
== Sensitive Code Example
|
|
|
|
|
|
|
|
For https://docs.microsoft.com/en-us/azure/batch/nodes-and-pools#pools[Azure Batch Pools]:
|
|
|
|
|
2023-08-02 15:18:05 +02:00
|
|
|
[source,terraform,diff-id=1,diff-type=noncompliant]
|
2022-01-03 16:39:34 +01:00
|
|
|
----
|
|
|
|
resource "azurerm_batch_pool" "example" {
|
|
|
|
name = "sensitive"
|
|
|
|
|
|
|
|
start_task {
|
|
|
|
user_identity {
|
|
|
|
auto_user {
|
|
|
|
elevation_level = "Admin" # Sensitive
|
|
|
|
scope = "Task"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
For https://azure.microsoft.com/en-us/services/container-registry/[Azure Container Registries]:
|
|
|
|
|
2023-08-02 15:18:05 +02:00
|
|
|
[source,terraform,diff-id=2,diff-type=noncompliant]
|
2022-01-03 16:39:34 +01:00
|
|
|
----
|
|
|
|
resource "azurerm_container_registry" "example" {
|
|
|
|
name = "example"
|
|
|
|
admin_enabled = true # Sensitive
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
|
|
|
For https://docs.microsoft.com/en-us/azure/batch/nodes-and-pools#pools[Azure Batch Pools]:
|
|
|
|
|
2023-08-02 15:18:05 +02:00
|
|
|
[source,terraform,diff-id=1,diff-type=compliant]
|
2022-01-03 16:39:34 +01:00
|
|
|
----
|
|
|
|
resource "azurerm_batch_pool" "example" {
|
|
|
|
name = "example"
|
|
|
|
|
|
|
|
start_task {
|
|
|
|
user_identity {
|
|
|
|
auto_user {
|
|
|
|
elevation_level = "NonAdmin"
|
|
|
|
scope = "Task"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
For https://azure.microsoft.com/en-us/services/container-registry/[Azure Container Registries]:
|
|
|
|
|
2023-08-02 15:18:05 +02:00
|
|
|
[source,terraform,diff-id=2,diff-type=compliant]
|
2022-01-03 16:39:34 +01:00
|
|
|
----
|
|
|
|
resource "azurerm_container_registry" "exemple" {
|
|
|
|
name = "example"
|
|
|
|
admin_enabled = false
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2023-08-02 15:18:05 +02:00
|
|
|
include::../see.adoc[]
|
2022-01-03 16:39:34 +01:00
|
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
|
|
|
|
2023-08-02 15:18:05 +02:00
|
|
|
include::../message.adoc[]
|
2022-01-03 16:39:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
=== Highlighting
|
|
|
|
|
2023-08-02 15:18:05 +02:00
|
|
|
* For ``azurerm_batch_pool``, highlight ``elevation_level = "Admin"``.
|
|
|
|
* For ``azurerm_container_registry``, highlight ``admin_enabled = true``.
|
2022-01-03 16:39:34 +01:00
|
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|