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

fix(azure): SecurityAlertPolicies: don't warn if policy is disabled #1402

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Frankkkkk
Copy link

Hi,

Azure's MSSql SecurityAlertPolicies can be disabled. In this case, it's okay to not have email addresses.

Cheers

@CLAassistant
Copy link

CLAassistant commented Jul 25, 2023

CLA assistant check
All committers have signed the CLA.

Azure's MSSql SecurityAlertPolicies can be disabled. In this case,
it's okay to not have email addresses.

Signed-off-by: Frank Villaro-Dixon <[email protected]>
Signed-off-by: Frank Villaro-Dixon <[email protected]>
@@ -44,6 +44,7 @@ func adaptSecurityAlertPolicies(resource azure.Resource, deployment azure.Deploy
for _, policy := range deployment.GetResourcesByType("Microsoft.Sql/servers/securityAlertPolicies") {
policies = append(policies, database.SecurityAlertPolicy{
Metadata: policy.Metadata,
State: resource.Properties.GetMapValue("state").AsStringValue("", resource.Metadata),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if resource.Properties.GetMapValue("state") is nil, this will panic. We should check the state first and then use it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @simar7 , TBH I don't know how to make it "right". Do you have any tips ? Thanks

Copy link
Member

@simar7 simar7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left comment

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale Stale issues will be closed within 7 days of this label being assigned label Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues will be closed within 7 days of this label being assigned
Projects
None yet
3 participants