-
Notifications
You must be signed in to change notification settings - Fork 0
Updates to Code #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| { | ||
| private Dictionary<string, string> _users = new Dictionary<string, string>(); | ||
| private const string SqlConnectionString = "Server=localhost;Database=SecurityDb;User Id=sa;Password=MyP@ssw0rd!;"; | ||
| private const string SqlConnectionString = "Server=localhost;Database=SecurityDb;User Id=sa;Password=MyP@ssw0rd!2;"; |
Check failure
Code scanning / CodeQL
Hard-coded connection string with credentials
terraform/main.tf
Outdated
Check failure
Code scanning / defsec
Ensure the Function App can only be accessed via HTTPS. The default is false.
| resource "azurerm_function_app" "bad_example" { | ||
| name = "example-function-app" | ||
| location = azurerm_resource_group.example.location | ||
| resource_group_name = azurerm_resource_group.example.name | ||
| app_service_plan_id = azurerm_app_service_plan.example.id | ||
| } |
Check warning
Code scanning / defsec
App Service authentication is activated
| resource "azurerm_function_app" "bad_example" { | ||
| name = "example-function-app" | ||
| location = azurerm_resource_group.example.location | ||
| resource_group_name = azurerm_resource_group.example.name | ||
| app_service_plan_id = azurerm_app_service_plan.example.id | ||
| } |
Check notice
Code scanning / defsec
Web App has registration with AD enabled
| resource "azurerm_function_app" "bad_example" { | ||
| name = "example-function-app" | ||
| location = azurerm_resource_group.example.location | ||
| resource_group_name = azurerm_resource_group.example.name | ||
| app_service_plan_id = azurerm_app_service_plan.example.id | ||
| } |
Check notice
Code scanning / defsec
Web App uses the latest HTTP version
| resource "azurerm_function_app" "bad_example" { | ||
| name = "example-function-app" | ||
| location = azurerm_resource_group.example.location | ||
| resource_group_name = azurerm_resource_group.example.name | ||
| app_service_plan_id = azurerm_app_service_plan.example.id | ||
| } |
Check notice
Code scanning / defsec
Web App accepts incoming client certificate
| name = "bad_example" | ||
|
|
||
| retention_policy { | ||
| enabled = true | ||
| days = 7 | ||
| } | ||
| } | ||
|
|
||
| resource "azurerm_network_security_rule" "bad_example" { | ||
| name = "bad_example_security_rule" | ||
| direction = "Inbound" | ||
| access = "Allow" | ||
| protocol = "TCP" | ||
| source_port_range = "*" | ||
| destination_port_range = ["3389"] | ||
| source_address_prefix = "*" | ||
| destination_address_prefix = "*" | ||
| } | ||
|
|
||
| resource "azurerm_network_security_group" "example" { | ||
| name = "tf-appsecuritygroup" | ||
| location = azurerm_resource_group.example.location | ||
| resource_group_name = azurerm_resource_group.example.name | ||
|
|
||
| security_rule { | ||
| source_port_range = "any" | ||
| destination_port_range = ["3389"] | ||
| source_address_prefix = "*" | ||
| destination_address_prefix = "*" | ||
| } |
Check notice
Code scanning / defsec
Key vault Secret should have a content type set
| name = "bad_example" | ||
|
|
||
| retention_policy { | ||
| enabled = true | ||
| days = 7 | ||
| } | ||
| } | ||
|
|
||
| resource "azurerm_network_security_rule" "bad_example" { | ||
| name = "bad_example_security_rule" | ||
| direction = "Inbound" | ||
| access = "Allow" | ||
| protocol = "TCP" | ||
| source_port_range = "*" | ||
| destination_port_range = ["3389"] | ||
| source_address_prefix = "*" | ||
| destination_address_prefix = "*" | ||
| } | ||
|
|
||
| resource "azurerm_network_security_group" "example" { | ||
| name = "tf-appsecuritygroup" | ||
| location = azurerm_resource_group.example.location | ||
| resource_group_name = azurerm_resource_group.example.name | ||
|
|
||
| security_rule { | ||
| source_port_range = "any" | ||
| destination_port_range = ["3389"] | ||
| source_address_prefix = "*" | ||
| destination_address_prefix = "*" | ||
| } |
Check notice
Code scanning / defsec
Key Vault Secret should have an expiration date set
No description provided.