Skip to content

Added dynamic open path detector #413

Added dynamic open path detector

Added dynamic open path detector #413

GitHub Actions / JUnit Test Report failed Sep 19, 2024 in 0s

1 tests run, 0 passed, 0 skipped, 1 failed.

Annotations

Check failure on line 42 in results_xml_format/network_policy_pod_restarted.xml

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

network_policy_pod_restarted

validate_expected_backend_results, timeout: 4 minutes, error: network policies workloads list is 0 'CyberArmorTests' (code: 200, message: {"total":{"value":0,"relation":"eq"},"response":[],"cursor":""}
). kwargs: '{'cluster': 'kind-systets-efe5b36f-acbd-4224-8304-d268407fef85', 'namespace': 'systest-ns-l6gz', 'expected_workloads_list': [{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'nginx'}, 'spec': {'selector': {'matchLabels': {'app': 'nginx'}}, 'replicas': 1, 'template': {'metadata': {'labels': {'app': 'nginx'}}, 'spec': {'containers': [{'name': 'nginx', 'image': 'nginx@sha256:aa0afebbb3cfa473099a62c4b32e9b3fb73ed23f2a75a65ce1d4b4f55a5c2ef2', 'ports': [{'containerPort': 80}], 'volumeMounts': [{'mountPath': '/etc/nginx', 'readOnly': True, 'name': 'nginx-conf'}], 'env': [{'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}]}], 'volumes': [{'name': 'nginx-conf', 'configMap': {'name': 'nginx-conf', 'items': [{'key': 'nginx.conf', 'path': 'nginx.conf'}]}}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'wikijs', 'labels': {'app': 'wikijs'}}, 'spec': {'selector': {'matchLabels': {'app': 'wikijs'}}, 'template': {'metadata': {'labels': {'app': 'wikijs'}}, 'spec': {'containers': [{'name': 'wikijs', 'image': 'requarks/wiki@sha256:dd83fff15e77843ff934b25c28c865ac000edf7653e5d11adad1dd51df87439d', 'imagePullPolicy': 'Always', 'env': [{'name': 'DB_TYPE', 'value': 'mariadb'}, {'name': 'DB_HOST', 'value': 'mariadb'}, {'name': 'DB_PORT', 'value': '3306'}, {'name': 'DB_NAME', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'DB_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'DB_PASS', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3000, 'name': 'http'}]}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mariadb', 'labels': {'app': 'mariadb'}}, 'spec': {'selector': {'matchLabels': {'app': 'mariadb'}}, 'template': {'metadata': {'labels': {'app': 'mariadb'}}, 'spec': {'containers': [{'name': 'mariadb', 'image': 'mariadb@sha256:821d0411208eaa88f9e1f0daccd1d534f88d19baf724eb9a2777cbedb10b6c66', 'env': [{'name': 'MYSQL_ROOT_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'ROOT_PASSWORD'}}}, {'name': 'MYSQL_DATABASE', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3306, 'name': 'mysql'}], 'volumeMounts': [{'name': 'mariadb-storage', 'mountPath': '/var/lib/mysql'}]}], 'volumes': [{'name': 'mariadb-storage', 'emptyDir': {}}]}}}}], 'expected_network_neighborhood_list': [{'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-wikijs', 'namespace': 'systest-ns-hvt7', 'uid': '6601c441-3774-42c8-8350-39770c6021ea', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:52Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'wikijs'}, 'containers': [{'name': 'wikijs', 'ingress': [], 'egress': [{'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}, {'identifier': '9230d773194d84ea09e198e98b8aaa1dd71fd6f406314796f234240bb5111425', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'namespaceSelector': None, 'ipAddress': ''}]}]}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-mariadb', 'namespace': 'systest-ns-hvt7', 'uid': '45a5f0df-855b-423d-b5d1-bea710fd2cbf', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:50Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'mariadb'}, 'containers': [{'name': 'mariadb', 'ingress': [{'identifier': 'ee5c5b2f07834fa64174c3d2ad0505366e4b26777174906b91e83dcd163f8ec2', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'namespaceSelector': None, 'ipAddress': ''}], 'egress': []}]}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-nginx', 'namespace': 'systest-ns-hvt7', 'uid': '389bed91-3f2d-464d-9b70-7d29309162a5', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:51Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'nginx'}, 'containers': [{'name': 'nginx', 'ingress': [], 'egress': [{'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}]}]}}], 'expected_generated_network_policy_list': [{'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:22:59Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [{'ports': [{'port': 53, 'protocol': 'UDP'}], 'to': [{'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}}]}, {'ports': [{'port': 3306, 'protocol': 'TCP'}], 'to': [{'podSelector': {'matchLabels': {'app': 'mariadb'}}}]}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'policyTypes': ['Egress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:24:41Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'spec': {'ingress': [{'from': [{'podSelector': {'matchLabels': {'app': 'wikijs'}}}], 'ports': [{'port': 3306, 'protocol': 'TCP'}]}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'policyTypes': ['Ingress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:25:02Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [], 'podSelector': {'matchLabels': {'app': 'nginx'}}, 'policyTypes': ['Egress']}}}]}'
Raw output
validate_expected_backend_results, timeout: 4 minutes, error: network policies workloads list is 0 'CyberArmorTests' (code: 200, message: {"total":{"value":0,"relation":"eq"},"response":[],"cursor":""}
). kwargs: '{'cluster': 'kind-systets-efe5b36f-acbd-4224-8304-d268407fef85', 'namespace': 'systest-ns-l6gz', 'expected_workloads_list': [{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'nginx'}, 'spec': {'selector': {'matchLabels': {'app': 'nginx'}}, 'replicas': 1, 'template': {'metadata': {'labels': {'app': 'nginx'}}, 'spec': {'containers': [{'name': 'nginx', 'image': 'nginx@sha256:aa0afebbb3cfa473099a62c4b32e9b3fb73ed23f2a75a65ce1d4b4f55a5c2ef2', 'ports': [{'containerPort': 80}], 'volumeMounts': [{'mountPath': '/etc/nginx', 'readOnly': True, 'name': 'nginx-conf'}], 'env': [{'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}]}], 'volumes': [{'name': 'nginx-conf', 'configMap': {'name': 'nginx-conf', 'items': [{'key': 'nginx.conf', 'path': 'nginx.conf'}]}}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'wikijs', 'labels': {'app': 'wikijs'}}, 'spec': {'selector': {'matchLabels': {'app': 'wikijs'}}, 'template': {'metadata': {'labels': {'app': 'wikijs'}}, 'spec': {'containers': [{'name': 'wikijs', 'image': 'requarks/wiki@sha256:dd83fff15e77843ff934b25c28c865ac000edf7653e5d11adad1dd51df87439d', 'imagePullPolicy': 'Always', 'env': [{'name': 'DB_TYPE', 'value': 'mariadb'}, {'name': 'DB_HOST', 'value': 'mariadb'}, {'name': 'DB_PORT', 'value': '3306'}, {'name': 'DB_NAME', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'DB_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'DB_PASS', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3000, 'name': 'http'}]}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mariadb', 'labels': {'app': 'mariadb'}}, 'spec': {'selector': {'matchLabels': {'app': 'mariadb'}}, 'template': {'metadata': {'labels': {'app': 'mariadb'}}, 'spec': {'containers': [{'name': 'mariadb', 'image': 'mariadb@sha256:821d0411208eaa88f9e1f0daccd1d534f88d19baf724eb9a2777cbedb10b6c66', 'env': [{'name': 'MYSQL_ROOT_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'ROOT_PASSWORD'}}}, {'name': 'MYSQL_DATABASE', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3306, 'name': 'mysql'}], 'volumeMounts': [{'name': 'mariadb-storage', 'mountPath': '/var/lib/mysql'}]}], 'volumes': [{'name': 'mariadb-storage', 'emptyDir': {}}]}}}}], 'expected_network_neighborhood_list': [{'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-wikijs', 'namespace': 'systest-ns-hvt7', 'uid': '6601c441-3774-42c8-8350-39770c6021ea', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:52Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'wikijs'}, 'containers': [{'name': 'wikijs', 'ingress': [], 'egress': [{'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}, {'identifier': '9230d773194d84ea09e198e98b8aaa1dd71fd6f406314796f234240bb5111425', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'namespaceSelector': None, 'ipAddress': ''}]}]}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-mariadb', 'namespace': 'systest-ns-hvt7', 'uid': '45a5f0df-855b-423d-b5d1-bea710fd2cbf', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:50Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'mariadb'}, 'containers': [{'name': 'mariadb', 'ingress': [{'identifier': 'ee5c5b2f07834fa64174c3d2ad0505366e4b26777174906b91e83dcd163f8ec2', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'namespaceSelector': None, 'ipAddress': ''}], 'egress': []}]}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-nginx', 'namespace': 'systest-ns-hvt7', 'uid': '389bed91-3f2d-464d-9b70-7d29309162a5', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:51Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'nginx'}, 'containers': [{'name': 'nginx', 'ingress': [], 'egress': [{'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}]}]}}], 'expected_generated_network_policy_list': [{'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:22:59Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [{'ports': [{'port': 53, 'protocol': 'UDP'}], 'to': [{'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}}]}, {'ports': [{'port': 3306, 'protocol': 'TCP'}], 'to': [{'podSelector': {'matchLabels': {'app': 'mariadb'}}}]}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'policyTypes': ['Egress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:24:41Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'spec': {'ingress': [{'from': [{'podSelector': {'matchLabels': {'app': 'wikijs'}}}], 'ports': [{'port': 3306, 'protocol': 'TCP'}]}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'policyTypes': ['Ingress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:25:02Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [], 'podSelector': {'matchLabels': {'app': 'nginx'}}, 'policyTypes': ['Egress']}}}]}'