generated from terraform-linters/tflint-ruleset-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
67 lines (64 loc) · 2.71 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// main.go
package main
import (
"github.com/terraform-linters/tflint-plugin-sdk/plugin"
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
"github.com/terraform-linters/tflint-ruleset-azurerm-security/project"
"github.com/terraform-linters/tflint-ruleset-azurerm-security/rules"
)
func createRuleSet() *tflint.BuiltinRuleSet {
return &tflint.BuiltinRuleSet{
Name: "azurerm-security",
Version: project.Version,
Rules: []tflint.Rule{
rules.NewAzurermEventhubNamespacePublicNetworkAccessEnabled(),
rules.NewAzurermEventhubNamespaceUnsecureTLS(),
rules.NewAzurermIoTHubEndpointEventHubAuthenticationType(),
rules.NewAzureRmKeyVaultFeaturesRule(),
rules.NewAzurermKeyVaultPublicNetworkAccessEnabled(),
rules.NewAzurermKeyVaultRbacDisabled(),
rules.NewAzurermKeyVaultCertificateLifetimeAction(),
rules.NewAzurermKeyVaultKeyRotationPolicy(),
rules.NewAzurermLinuxFunctionAppFtpsState(),
rules.NewAzurermLinuxFunctionAppHTTPSOnly(),
rules.NewAzurermLinuxFunctionAppMinimumTLSVersion(),
rules.NewAzurermLinuxFunctionAppSlotFtpsState(),
rules.NewAzurermLinuxFunctionAppSlotHTTPSOnly(),
rules.NewAzurermLinuxFunctionAppSlotMinimumTLSVersion(),
rules.NewAzurermLinuxWebAppFtpsState(),
rules.NewAzurermLinuxWebAppHTTPSOnly(),
rules.NewAzurermLinuxWebAppMinimumTLSVersion(),
rules.NewAzurermLinuxWebAppSlotFtpsState(),
rules.NewAzurermLinuxWebAppSlotHTTPSOnly(),
rules.NewAzurermLinuxWebAppSlotMinimumTLSVersion(),
rules.NewAzurermMssqlDatabaseEncryption(),
rules.NewAzurermMsSQLFirewallRuleAllAllowed(),
rules.NewAzurermMsSQLServerAdAuthOnly(),
rules.NewAzurermMsSQLServerPublicNetworkAccessEnabled(),
rules.NewAzurermMsSQLServerUnsecureTLS(),
rules.NewAzurermRedisCacheAADAuhtenticationEnabled(),
rules.NewAzurermRedisCacheMinimumTLSVersion(),
rules.NewAzurermRedisCacheNonSSLPortEnabled(),
rules.NewAzurermStorageAccountHTTPSTrafficOnlyEnabled(),
rules.NewAzurermStorageAccountPublicNetworkAccessEnabled(),
rules.NewAzurermStorageAccountUnsecureTLS(),
rules.NewAzurermWindowsFunctionAppFtpsState(),
rules.NewAzurermWindowsFunctionAppHTTPSOnly(),
rules.NewAzurermWindowsFunctionAppMinimumTLSVersion(),
rules.NewAzurermWindowsFunctionAppSlotFtpsState(),
rules.NewAzurermWindowsFunctionAppSlotHTTPSOnly(),
rules.NewAzurermWindowsFunctionAppSlotMinimumTLSVersion(),
rules.NewAzurermWindowsWebAppFtpsState(),
rules.NewAzurermWindowsWebAppHTTPSOnly(),
rules.NewAzurermWindowsWebAppMinimumTLSVersion(),
rules.NewAzurermWindowsWebAppSlotFtpsState(),
rules.NewAzurermWindowsWebAppSlotHTTPSOnly(),
rules.NewAzurermWindowsWebAppSlotMinimumTLSVersion(),
},
}
}
func main() {
plugin.Serve(&plugin.ServeOpts{
RuleSet: createRuleSet(),
})
}