github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/providers/aws/ec2/vpc.go (about) 1 package ec2 2 3 import ( 4 defsecTypes "github.com/khulnasoft-lab/defsec/pkg/types" 5 ) 6 7 type NetworkACL struct { 8 Metadata defsecTypes.Metadata 9 Rules []NetworkACLRule 10 IsDefaultRule defsecTypes.BoolValue 11 } 12 13 type SecurityGroup struct { 14 Metadata defsecTypes.Metadata 15 IsDefault defsecTypes.BoolValue 16 Description defsecTypes.StringValue 17 IngressRules []SecurityGroupRule 18 EgressRules []SecurityGroupRule 19 VPCID defsecTypes.StringValue 20 } 21 22 type SecurityGroupRule struct { 23 Metadata defsecTypes.Metadata 24 Description defsecTypes.StringValue 25 CIDRs []defsecTypes.StringValue 26 } 27 28 type VPC struct { 29 Metadata defsecTypes.Metadata 30 ID defsecTypes.StringValue 31 IsDefault defsecTypes.BoolValue 32 SecurityGroups []SecurityGroup 33 FlowLogsEnabled defsecTypes.BoolValue 34 } 35 36 const ( 37 TypeIngress = "ingress" 38 TypeEgress = "egress" 39 ) 40 41 const ( 42 ActionAllow = "allow" 43 ActionDeny = "deny" 44 ) 45 46 type NetworkACLRule struct { 47 Metadata defsecTypes.Metadata 48 Type defsecTypes.StringValue 49 Action defsecTypes.StringValue 50 Protocol defsecTypes.StringValue 51 CIDRs []defsecTypes.StringValue 52 }