github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/providers/kubernetes/kubernetes.go (about) 1 package kubernetes 2 3 import ( 4 defsecTypes "github.com/khulnasoft-lab/defsec/pkg/types" 5 ) 6 7 type Kubernetes struct { 8 NetworkPolicies []NetworkPolicy 9 } 10 11 type NetworkPolicy struct { 12 Metadata defsecTypes.Metadata 13 Spec NetworkPolicySpec 14 } 15 16 type NetworkPolicySpec struct { 17 Metadata defsecTypes.Metadata 18 Egress Egress 19 Ingress Ingress 20 } 21 22 type Egress struct { 23 Metadata defsecTypes.Metadata 24 Ports []Port 25 DestinationCIDRs []defsecTypes.StringValue 26 } 27 28 type Ingress struct { 29 Metadata defsecTypes.Metadata 30 Ports []Port 31 SourceCIDRs []defsecTypes.StringValue 32 } 33 34 type Port struct { 35 Metadata defsecTypes.Metadata 36 Number defsecTypes.StringValue // e.g. "http" or "80" 37 Protocol defsecTypes.StringValue 38 }