generated from terraform-linters/tflint-ruleset-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* More rules * azurerm_key_vault_certificate_lifetime_action * remove spellingyml * azurerm_key_vault_key_rotation_policy ---------
- Loading branch information
Showing
48 changed files
with
3,885 additions
and
1 deletion.
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
42 changes: 42 additions & 0 deletions
42
docs/rules/azurerm_key_vault_certificate_lifetime_action.md
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,42 @@ | ||
# azurerm_key_vault_certificate_lifetime_action | ||
|
||
**Severity:** Warning | ||
|
||
|
||
## Example | ||
|
||
```hcl | ||
resource "azurerm_key_vault_certificate" "example" { | ||
certificate_policy { | ||
# missing lifetime_policy | ||
} | ||
} | ||
``` | ||
|
||
## Why | ||
|
||
Setting lifetime_action to AutoRenew or EmailContacts ensures proactive management of certificate expiration, reducing the risk of service interruptions or security vulnerabilities caused by expired certificates. | ||
|
||
## How to Fix | ||
|
||
```hcl | ||
resource "azurerm_key_vault_certificate" "example" { | ||
certificate_policy { | ||
lifetime_action { | ||
action { | ||
action_type = "AutoRenew" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
|
||
## How to disable | ||
|
||
```hcl | ||
rule "azurerm_key_vault_certificate_lifetime_action" { | ||
enabled = false | ||
} | ||
``` | ||
|
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,34 @@ | ||
# azurerm_key_vault_enable_rbac_authorization | ||
|
||
**Severity:** Warning | ||
|
||
|
||
## Example | ||
|
||
```hcl | ||
resource "azurerm_key_vault" "example" { | ||
enable_rbac_authorization = false | ||
} | ||
``` | ||
|
||
## Why | ||
|
||
Enabling enable_rbac_authorization allows access to the Key Vault to be managed through Azure Role-Based Access Control (RBAC), providing granular, centralized, and scalable permissions management. This is considered the current best practice. | ||
|
||
## How to Fix | ||
|
||
```hcl | ||
resource "azurerm_key_vault" "example" { | ||
enable_rbac_authorization = true | ||
} | ||
``` | ||
|
||
|
||
## How to disable | ||
|
||
```hcl | ||
rule "azurerm_key_vault_enable_rbac_authorization" { | ||
enabled = false | ||
} | ||
``` | ||
|
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,38 @@ | ||
# azurerm_key_vault_key_rotation_policy | ||
|
||
**Severity:** Warning | ||
|
||
|
||
## Example | ||
|
||
```hcl | ||
resource "azurerm_key_vault_key" "example" { | ||
rotation_policy { | ||
# mising expire_after | ||
} | ||
} | ||
``` | ||
|
||
## Why | ||
|
||
Defining a rotation_policy with expire_after ensures that keys are rotated regularly, minimizing the risk of key compromise and maintaining compliance with security best practices. | ||
|
||
## How to Fix | ||
|
||
```hcl | ||
resource "azurerm_key_vault_key" "example" { | ||
rotation_policy { | ||
expire_after = "P90D" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## How to disable | ||
|
||
```hcl | ||
rule "azurerm_key_vault_key_rotation_policy" { | ||
enabled = false | ||
} | ||
``` | ||
|
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,38 @@ | ||
# azurerm_linux_function_app_slot_ftps_state | ||
|
||
**Severity:** Warning | ||
|
||
|
||
## Example | ||
|
||
```hcl | ||
resource "azurerm_linux_function_app_slot" "example" { | ||
site_config { | ||
ftps_state = "FtpsOnly" | ||
} | ||
} | ||
``` | ||
|
||
## Why | ||
|
||
Disabling FTPS ensures that file transfer protocols are not used, reducing the risk of data interception and enhancing the overall security of the Linux Function App. | ||
|
||
## How to Fix | ||
|
||
```hcl | ||
resource "azurerm_linux_function_app_slot" "example" { | ||
site_config { | ||
ftps_state = "Disabled" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## How to disable | ||
|
||
```hcl | ||
rule "azurerm_linux_function_app_slot_ftps_state" { | ||
enabled = false | ||
} | ||
``` | ||
|
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,34 @@ | ||
# azurerm_linux_function_app_slot_https_only | ||
|
||
**Severity:** Warning | ||
|
||
|
||
## Example | ||
|
||
```hcl | ||
resource "azurerm_linux_function_app_slot" "example" { | ||
https_only = false | ||
} | ||
``` | ||
|
||
## Why | ||
|
||
Enforcing https_only ensures all communications with the resource are encrypted, protecting sensitive data in transit and mitigating the risk of man-in-the-middle attacks. | ||
|
||
## How to Fix | ||
|
||
```hcl | ||
resource "azurerm_linux_function_app_slot" "example" { | ||
https_only = true | ||
} | ||
``` | ||
|
||
|
||
## How to disable | ||
|
||
```hcl | ||
rule "azurerm_linux_function_app_slot_https_only" { | ||
enabled = false | ||
} | ||
``` | ||
|
38 changes: 38 additions & 0 deletions
38
docs/rules/azurerm_linux_function_app_slot_minimum_tls_version.md
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,38 @@ | ||
# azurerm_linux_function_app_slot_minimum_tls_version | ||
|
||
**Severity:** Warning | ||
|
||
|
||
## Example | ||
|
||
```hcl | ||
resource "azurerm_linux_function_app_slot" "example" { | ||
site_config { | ||
minimum_tls_version = "1.0" | ||
} | ||
} | ||
``` | ||
|
||
## Why | ||
|
||
Enforcing a minimum TLS version of 1.2 ensures secure communication by adhering to modern encryption standards, protecting data in transit from vulnerabilities in older TLS versions, as versions 1.0 and 1.1 are insecure. | ||
|
||
## How to Fix | ||
|
||
```hcl | ||
resource "azurerm_linux_function_app_slot" "example" { | ||
site_config { | ||
minimum_tls_version = "1.2" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## How to disable | ||
|
||
```hcl | ||
rule "azurerm_linux_function_app_slot_minimum_tls_version" { | ||
enabled = false | ||
} | ||
``` | ||
|
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,38 @@ | ||
# azurerm_linux_web_app_slot_ftps_state | ||
|
||
**Severity:** Warning | ||
|
||
|
||
## Example | ||
|
||
```hcl | ||
resource "azurerm_linux_web_app_slot" "example" { | ||
site_config { | ||
ftps_state = "FtpsOnly" | ||
} | ||
} | ||
``` | ||
|
||
## Why | ||
|
||
Disabling FTPS ensures that file transfer protocols are not used, reducing the risk of data interception and enhancing the overall security of the Linux web app. | ||
|
||
## How to Fix | ||
|
||
```hcl | ||
resource "azurerm_linux_web_app_slot" "example" { | ||
site_config { | ||
ftps_state = "Disabled" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## How to disable | ||
|
||
```hcl | ||
rule "azurerm_linux_web_app_slot_ftps_state" { | ||
enabled = false | ||
} | ||
``` | ||
|
Oops, something went wrong.