Skip to content

Conversation

@yagreut
Copy link
Contributor

@yagreut yagreut commented Oct 16, 2025

Update SecurityCenter schema

Add Email and EnableAlertsToAdmins

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@github-actions github-actions bot added the apidiff Indicates Go API changes relevant to library consumers (CLI compatibility may be unaffected) label Oct 16, 2025
@github-actions
Copy link

github-actions bot commented Oct 16, 2025

📊 API Changes Detected

Semver impact: major

github.com/aquasecurity/trivy/pkg/iac/providers/azure/securitycenter
  Compatible changes:
  - Contact.Email: added
  - Contact.EnableAlertsToAdmins: added
  - Contact.IsEnabled: added
  - Contact.MinimalSeverity: added

github.com/aquasecurity/trivy/pkg/iac/providers/azure/compute
  Incompatible changes:
  - LinuxVirtualMachine: old is comparable, new is not
  - VirtualMachine: old is comparable, new is not
  - WindowsVirtualMachine: old is comparable, new is not
  Compatible changes:
  - LinuxVirtualMachine.NetworkInterfaceIDs: added
  - VirtualMachine.NetworkInterfaceIDs: added
  - WindowsVirtualMachine.NetworkInterfaceIDs: added

@aqua-bot aqua-bot requested a review from a team October 16, 2025 11:42
@yagreut yagreut force-pushed the reut-azure-securitycenter branch from 42aa18c to e484cef Compare October 16, 2025 11:47
// https://learn.microsoft.com/en-us/azure/templates/microsoft.security/securitycontacts?pivots=deployment-language-arm-template#securitycontactproperties-1
EnableAlertNotifications: resource.Properties.GetMapValue("email").AsBoolValue(false, resource.Metadata),
Metadata: resource.Metadata,
EnableAlertNotifications: resource.Properties.GetMapValue("alertNotifications").AsBoolValue(false, resource.Metadata),
Copy link
Contributor

Choose a reason for hiding this comment

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

The alertNotifications field was last present in version 2020-01-01 as an object, then it was removed.

I glanced at the latest documentation, and it seems to me that now, instead of alertNotifications, notificationsSources is used with the following configuration to configure the alert level:

"notificationsSources": [
  {
    "sourceType": "Alert",
    "minimalSeverity": "High"
  }
]

You also need to consider the isEnabled field, which indicates whether the security contact is enabled.

@yagreut yagreut requested a review from knqyf263 as a code owner October 23, 2025 05:00
@yagreut yagreut force-pushed the reut-azure-securitycenter branch from fa224de to c585c03 Compare October 27, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apidiff Indicates Go API changes relevant to library consumers (CLI compatibility may be unaffected)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants