Skip to content
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

Updates to Code #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Updates to Code #2

wants to merge 3 commits into from

Conversation

ahernandez411
Copy link
Owner

No description provided.

@@ -7,7 +7,7 @@
public class DataAccess
{
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

'ConnectionString' property includes hard-coded credentials set in [object creation of type SqlConnection](1).
Comment on lines +113 to +118
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 failure

Code scanning / defsec

Ensure the Function App can only be accessed via HTTPS. The default is false.

Function app does not have HTTPS enforced.
Comment on lines +106 to +111
resource "azurerm_app_service" "bad_example" {
name = "example-app-service"
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

App service does not have authentication enabled.
Comment on lines +106 to +111
resource "azurerm_app_service" "bad_example" {
name = "example-app-service"
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

App service does not have an identity type.
Comment on lines +106 to +111
resource "azurerm_app_service" "bad_example" {
name = "example-app-service"
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

App service does not have HTTP/2 enabled.
Comment on lines +106 to +111
resource "azurerm_app_service" "bad_example" {
name = "example-app-service"
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

App service does not have client certificates enabled.
Comment on lines +61 to +65
resource "azurerm_key_vault_secret" "example" {
name = "secret_password"
value = var.another_password
key_vault_id = azurerm_key_vault.bad_example.id
}

Check notice

Code scanning / defsec

Key vault Secret should have a content type set

Secret does not have a content-type specified.
Comment on lines +61 to +65
resource "azurerm_key_vault_secret" "example" {
name = "secret_password"
value = var.another_password
key_vault_id = azurerm_key_vault.bad_example.id
}

Check notice

Code scanning / defsec

Key Vault Secret should have an expiration date set

Secret should have an expiry date specified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant