Check ID: events_rule_network_security_group_changes
Provider: Oracle Cloud (OCI)
Service: events
Severity: MEDIUM
Categories: logging
Resource type: EventRule

What this check verifies

OCI Events rules targeting Network Security Group (NSG) changes are evaluated for notification actions. Monitored events: createnetworksecuritygroup, updatenetworksecuritygroup, deletenetworksecuritygroup, and changenetworksecuritygroupcompartment under com.oraclecloud.virtualnetwork.

Risk

Absent notifications for NSG changes enable silent policy drift.
  • Confidentiality: permissive edits can expose services and drive data exfiltration.
  • Integrity: attackers can reroute traffic or bypass micro-segmentation.
  • Availability: deletions/misconfigurations may isolate workloads or widen DDoS exposure.

Recommendation

Implement Events rules for NSG lifecycle changes with notification actions to a monitored topic/SIEM.
  • Include createnetworksecuritygroup, updatenetworksecuritygroup, deletenetworksecuritygroup, changenetworksecuritygroupcompartment
  • Enforce least privilege and separation of duties on NSG and Events admins
  • Regularly test and tune alerts

Remediation

oci events rule create --compartment-id <compartment_ocid> --display-name <example_resource_name> --condition '{"eventType":["com.oraclecloud.virtualnetwork.changenetworksecuritygroupcompartment","com.oraclecloud.virtualnetwork.createnetworksecuritygroup","com.oraclecloud.virtualnetwork.deletenetworksecuritygroup","com.oraclecloud.virtualnetwork.updatenetworksecuritygroup"]}' --actions '{"actions":[{"actionType":"ONS","topicId":"<topic_ocid>"}]}'

References

Where this check fires

This check runs on every scheduled scan against your Oracle Cloud (OCI) account. Findings appear at Cloud Security → Findings filterable by Check ID = events_rule_network_security_group_changes. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Oracle Cloud (OCI) checks