Azure Flexible Server: AZU-0020 & AZU-0021 don't detect ssl_min_protocol_version and connection_throttle.enable set via azurerm_postgresql_flexible_server_configuration #10942
Replies: 1 comment 1 reply
|
This is a genuine gap in Trivy's Azure PostgreSQL checks — the built-in rules for AZU-0020 and AZU-0021 were written for the legacy Single Server resource model and have not Why it happens Trivy's misconfig checks are Rego policies that pattern-match on specific Terraform resource types. AZU-0020 and AZU-0021 look for:
The Flexible Server equivalents are entirely different resource types:
Because the Rego rules never reference these types, Trivy simply never evaluates your Flexible Server configuration resources against those check IDs — hence the silent false negative. You also noticed AZU-0026 firing instead of AZU-0020 for TLS, which confirms Trivy is partially aware of Flexible Server but the rule coverage is inconsistent. Immediate workaround — custom Rego policy Until the built-in rules are updated you can drop a custom policy into your scan. Create Contributing a fix upstream The built-in rules live in |
Uh oh!
There was an error while loading. Please reload this page.
IDs
AZU-0020 & AZU-0021
Description
Trivy's Azure PostgreSQL checks AZU-0020 (Enable SSL Enforcement) and
AZU-0021 (Postgres Configuration Connection Throttling) only evaluate the
legacy single-server resources (
azurerm_postgresql_server/azurerm_postgresql_configuration).They do not recognise the equivalent settings when they are configured for
Azure Database for PostgreSQL – Flexible Server, which uses different
resources and parameter names:
azurerm_postgresql_flexible_server_configurationnameconnection_throttle.enable=onazurerm_postgresql_flexible_server_configurationnamessl_min_protocol_version=TLSv1.2Because of this, these parameters are silently ignored by Trivy even though they
are correctly applied on the server and clearly visible in the Azure Portal
(Server parameters blade). This leads to a false negative / false positive
depending on how the check is written.
Target checks
Reproduction Steps
Target
Filesystem
Scanner
Vulnerability
Target OS
No response
Debug Output
Version
Checklist
-f jsonthat shows data sources and confirmed that the security advisory in data sources was correctAll reactions