Nifcloud Computing Has Common Private Network

  • Query id: df58dd45-8009-43c2-90f7-c90eb9d53ed9
  • Query name: Nifcloud Computing Has Common Private Network
  • Platform: Terraform
  • Severity: Low
  • Category: Networking and Firewall
  • URL: Github

Description

The instance has common private network
Documentation

Code samples

Code samples with security vulnerabilities

Positive test num. 1 - tf file
resource "nifcloud_instance" "positive" {
  image_id        = data.nifcloud_image.ubuntu.id
  security_group  = nifcloud_security_group.example.group_name
  network_interface {
    network_id = "net-COMMON_PRIVATE"
  }
}
Positive test num. 2 - tf file
resource "nifcloud_instance" "positive" {
  image_id        = data.nifcloud_image.ubuntu.id
  security_group  = nifcloud_security_group.example.group_name
  network_interface {
    network_id = "net-COMMON_GLOBAL"
  }
  network_interface {
    network_id = "net-COMMON_PRIVATE"
  }
}

Code samples without security vulnerabilities

Negative test num. 1 - tf file
resource "nifcloud_instance" "negative" {
  image_id        = data.nifcloud_image.ubuntu.id
  security_group  = nifcloud_security_group.example.group_name
  network_interface {
    network_id = nifcloud_private_lan.main.id
  }
}