K-L3 (#10), with the namespace part already in #21.
lab/policy/defaults.yaml has four Kyverno ValidatingPolicies (CEL) for the defaults Pod Security "restricted" doesn't check. They apply in namespaces labelled inbuxa.org/policy=enforce, and through autogen to Deployments and Jobs, so a bad value is refused when it's applied rather than when a ReplicaSet can't make its pods:
every container has a read-only root filesystem
no service-account token, except the upgrade Job's
no secret in the environment (secretKeyRef, envFrom secrets). This one only warns until the chart's server image is rc.32 (inbuxa-charts#19); then it changes to Deny.
every pod is under a deny-all NetworkPolicy: both directions, no rules, a selector the pod matches
lab/policy/policy-test.sh uses server-side dry runs in a scratch namespace:
the chart as the lab installs it: every Deployment and Job is admitted
networkPolicy.enabled=false is refused (the bad value that fails the run)
a secret in webmail.extraEnv is flagged
the schema refuses webmail.securityContext, so no value turns the defaults off
an edited manifest with a writable root, a token, or an added capability is refused
up.sh installs Kyverno 1.19.2 (chart 3.9.2, released 2026-10-20) without the cleanup and reports controllers, applies the policies and labels the namespace. The README says how.
Run on the lab: policy-test passes. With the policies on, every Deployment in inbuxa restarted cleanly, with the one expected warning for the server's environment secret.
Not in this PR: checking image signatures. The images aren't cosign-signed yet (K-S7, K-W6, K-A2), so a policy for them couldn't be tested. An ImageValidatingPolicy for ghcr.io/inbuxa/* comes with that work. K-L3's done-when is met; I'd tick it and carry the signature check under K-S7.
K-L3 (#10), with the namespace part already in #21.
**`lab/policy/defaults.yaml`** has four Kyverno ValidatingPolicies (CEL) for the defaults Pod Security "restricted" doesn't check. They apply in namespaces labelled `inbuxa.org/policy=enforce`, and through autogen to Deployments and Jobs, so a bad value is refused when it's applied rather than when a ReplicaSet can't make its pods:
- every container has a read-only root filesystem
- no service-account token, except the upgrade Job's
- no secret in the environment (`secretKeyRef`, `envFrom` secrets). This one only warns until the chart's server image is rc.32 (inbuxa-charts#19); then it changes to Deny.
- every pod is under a deny-all NetworkPolicy: both directions, no rules, a selector the pod matches
**`lab/policy/policy-test.sh`** uses server-side dry runs in a scratch namespace:
- the chart as the lab installs it: every Deployment and Job is admitted
- `networkPolicy.enabled=false` is refused (the bad value that fails the run)
- a secret in `webmail.extraEnv` is flagged
- the schema refuses `webmail.securityContext`, so no value turns the defaults off
- an edited manifest with a writable root, a token, or an added capability is refused
**`up.sh`** installs Kyverno 1.19.2 (chart 3.9.2, released 2026-10-20) without the cleanup and reports controllers, applies the policies and labels the namespace. The README says how.
**Run on the lab:** policy-test passes. With the policies on, every Deployment in `inbuxa` restarted cleanly, with the one expected warning for the server's environment secret.
**Not in this PR:** checking image signatures. The images aren't cosign-signed yet (K-S7, K-W6, K-A2), so a policy for them couldn't be tested. An ImageValidatingPolicy for `ghcr.io/inbuxa/*` comes with that work. K-L3's done-when is met; I'd tick it and carry the signature check under K-S7.
lab/policy/defaults.yaml: four ValidatingPolicies for what Pod Security
restricted doesn't check, in namespaces labelled inbuxa.org/policy=enforce:
a read-only root, no service-account token except the upgrade Job's, no
secret in the environment (warn until the chart's server image is rc.32),
and a deny-all NetworkPolicy over every pod. Autogen applies them to
Deployments and Jobs too.
lab/policy/policy-test.sh: the chart as the lab installs it is admitted;
networkPolicy.enabled=false is refused; a secret in extraEnv is flagged;
the schema refuses a securityContext value; a writable root, a token or an
added capability in an edited manifest are refused.
up.sh installs Kyverno 1.19.2 (chart 3.9.2) and the policies.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
K-L3 (#10), with the namespace part already in #21.
lab/policy/defaults.yamlhas four Kyverno ValidatingPolicies (CEL) for the defaults Pod Security "restricted" doesn't check. They apply in namespaces labelledinbuxa.org/policy=enforce, and through autogen to Deployments and Jobs, so a bad value is refused when it's applied rather than when a ReplicaSet can't make its pods:secretKeyRef,envFromsecrets). This one only warns until the chart's server image is rc.32 (inbuxa-charts#19); then it changes to Deny.lab/policy/policy-test.shuses server-side dry runs in a scratch namespace:networkPolicy.enabled=falseis refused (the bad value that fails the run)webmail.extraEnvis flaggedwebmail.securityContext, so no value turns the defaults offup.shinstalls Kyverno 1.19.2 (chart 3.9.2, released 2026-10-20) without the cleanup and reports controllers, applies the policies and labels the namespace. The README says how.Run on the lab: policy-test passes. With the policies on, every Deployment in
inbuxarestarted cleanly, with the one expected warning for the server's environment secret.Not in this PR: checking image signatures. The images aren't cosign-signed yet (K-S7, K-W6, K-A2), so a policy for them couldn't be tested. An ImageValidatingPolicy for
ghcr.io/inbuxa/*comes with that work. K-L3's done-when is met; I'd tick it and carry the signature check under K-S7.