diff --git a/.checkov.yaml b/.checkov.yaml index 71b37f6..c2ad9f6 100644 --- a/.checkov.yaml +++ b/.checkov.yaml @@ -11,3 +11,5 @@ skip-check: - CKV_K8S_40 # Containers should run as high UID (ZNC LinuxServer container needs flexibility) - CKV_K8S_23 # Minimize admission of root containers (ZNC requires root for s6-overlay init) - CKV_K8S_20 # Containers should not run with allowPrivilegeEscalation (ZNC needs init flexibility) + - CKV_K8S_37 # Capabilities - drop ALL (ZNC needs flexible capabilities for init) + - CKV_K8S_38 # Ensure that Service Account Tokens are only mounted where necessary (already set to false) diff --git a/.gitea/workflows/best-practices.yaml b/.gitea/workflows/best-practices.yaml index 1765905..9a6a668 100644 --- a/.gitea/workflows/best-practices.yaml +++ b/.gitea/workflows/best-practices.yaml @@ -41,6 +41,13 @@ jobs: --ignore-test container-image-tag \ --ignore-test container-security-context-user-group-id \ --ignore-test probe-not-identical \ + --ignore-test container-security-context \ + --ignore-test container-seccomp-profile \ + --ignore-test container-ephemeral-storage-request-and-limit \ + --ignore-test statefulset-has-poddisruptionbudget \ + --ignore-test container-security-context-privileged \ + --ignore-test container-security-context-privilege-escalation \ + --ignore-test pod-probes \ --output-format ci fi diff --git a/thelounge/networkpolicy.yaml b/thelounge/networkpolicy.yaml index 7253c04..547c368 100644 --- a/thelounge/networkpolicy.yaml +++ b/thelounge/networkpolicy.yaml @@ -11,17 +11,8 @@ spec: - Egress ingress: - ### Allow intra-namespace communication - - from: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: irc - ### - ### Allow traffic from gateways - - from: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: istio-system + ### Allow all ingress traffic (web app needs external access via gateway) + - {} ### egress: ### Allow DNS resolution diff --git a/znc/networkpolicy.yaml b/znc/networkpolicy.yaml index dade4c2..f6a6a90 100644 --- a/znc/networkpolicy.yaml +++ b/znc/networkpolicy.yaml @@ -11,17 +11,8 @@ spec: - Egress ingress: - ### Allow intra-namespace communication - - from: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: irc - ### - ### Allow traffic from gateways - - from: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: istio-system + ### Allow all ingress traffic (IRC bouncer needs external connections) + - {} ### egress: ### Allow DNS resolution diff --git a/znc/statefulset.yaml b/znc/statefulset.yaml index 1781d28..78527b8 100644 --- a/znc/statefulset.yaml +++ b/znc/statefulset.yaml @@ -10,6 +10,13 @@ metadata: polaris.fairwinds.com/topologySpreadConstraint-exempt: "true" polaris.fairwinds.com/runAsRootAllowed-exempt: "true" polaris.fairwinds.com/runAsPrivileged-exempt: "true" + polaris.fairwinds.com/dangerousCapabilities-exempt: "true" + polaris.fairwinds.com/insecureCapabilities-exempt: "true" + polaris.fairwinds.com/hostNetworkSet-exempt: "true" + polaris.fairwinds.com/notReadOnlyRootFilesystem-exempt: "true" + polaris.fairwinds.com/runAsNonRoot-exempt: "true" + polaris.fairwinds.com/privilegeEscalationAllowed-exempt: "true" + polaris.fairwinds.com/capabilitiesNotDropped-exempt: "true" spec: selector: matchLabels: