mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-08-23 22:26:34 +00:00
* Add missingNetworkPolicy, automountServiceAccountToken, and linuxHardening checks
33 lines
517 B
YAML
33 lines
517 B
YAML
# This fails because the NetworkPolicy lacks egress rules.
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: test-pod
|
|
labels:
|
|
security: medium
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx
|
|
ports:
|
|
- containerPort: 80
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: test
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
security: medium
|
|
policyTypes:
|
|
- Egress
|
|
- Ingress
|
|
ingress:
|
|
- from:
|
|
- ipBlock:
|
|
cidr: 0.0.0.0/0
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8080
|