CORS allows resources to access function apps
Description
Cross-Origin Resource Sharing (CORS) should not allow all domains to access your Function app. Allow only required domains to interact with your Function app.
Code Example
go
resource "azurerm_function_app" "example" {
...
site_config {
+ cors {
+ allowed_origins = ["192.0.0.1"]
}
}
}Remediation
Terraform
- Resource: azurerm_function_app
- Arguments: site_config.cors
Rule Details
| Field | Value |
|---|---|
| ID | IAC-0570 |
| Severity | LOW |
| IaC Type | arm |
| Frameworks | Terraform, TerraformPlan |
| Checkov ID | CKV_AZURE_62 |