github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/providers/openstack/networking.go (about) 1 package openstack 2 3 import ( 4 defsecTypes "github.com/khulnasoft-lab/defsec/pkg/types" 5 ) 6 7 type Networking struct { 8 SecurityGroups []SecurityGroup 9 } 10 11 type SecurityGroup struct { 12 Metadata defsecTypes.Metadata 13 Name defsecTypes.StringValue 14 Description defsecTypes.StringValue 15 Rules []SecurityGroupRule 16 } 17 18 // SecurityGroupRule describes https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/networking_secgroup_rule_v2 19 type SecurityGroupRule struct { 20 Metadata defsecTypes.Metadata 21 IsIngress defsecTypes.BoolValue 22 EtherType defsecTypes.IntValue // 4 or 6 for ipv4/ipv6 23 Protocol defsecTypes.StringValue // e.g. tcp 24 PortMin defsecTypes.IntValue 25 PortMax defsecTypes.IntValue 26 CIDR defsecTypes.StringValue 27 }