Synopsis
Read-only views over the broker’s workload security profiles. A profile is keyed by workload (namespace/kind/name), not by pod. It joins what
kguardian observed: Pod Security Standards checks against the reported
securityContext, network peers and audit verdicts, syscalls and any
SeccompProfile CR, running image digests, and compute settings.
kind is case-sensitive and is the owning workload’s kind: Deployment,
StatefulSet, DaemonSet, CronJob, Job, or Pod for a pod with no
owner. A ReplicaSet’s pods are profiled under their Deployment.
profile get
CallsGET /workloads/{namespace}/{kind}/{name}/profile, which the broker
computes live.
- Posture is
okonly when all four core dimensions (network, syscalls, podSecurity, images) are known and ok. Otherwise it is the worst knownwarnorrisk, andunknownwhen nothing known is worse than ok. Coverage is how many of the four kguardian knows. Compute is informational and outside the rollup. Each dimension that is notokgets a one-line reason under the posture. - images stays
unknownuntil a vulnerability source exists. Running digests, mixed rollouts, crash loops and pull failures are still reported as inventory facts and findings; they are not a verdict on the image. - PSS level “at most restricted” means every check kguardian can evaluate
passes, but volumes, host ports, AppArmor, SELinux, procMount and sysctls
are not reported to kguardian and could still fail. That is why
podSecurity is
unknownthere rather thanok, and whypodSecurityRestrictedprintscan't tell. Aprivilegedlevel isrisk;baselineis at leastwarn. - A container that was renamed or removed from the spec prints as a Stale line and is left out of the level, the findings and the patch.
- When the broker has a patch to recommend, the output ends with the
profile exportcommand that prints it.
-o json and -o yaml print the broker’s response unchanged, including
every finding, per-container securityContext, network peer and the
recommendation.
profile list
CallsGET /workloads. Rows come from the broker’s snapshot read model,
refreshed every few minutes.
UNKNOWN lists the core dimensions kguardian has no data for; images is always among them until vulnerability data exists.
--status unknown lists the workloads it cannot judge at all. When more
pages exist, the --after cursor is printed on stderr.
profile diff
CallsGET /workloads/{namespace}/{kind}/{name}/profile/diff. The broker
stores a new revision whenever the observed, policy-relevant behaviour
changes: securityContext, running digests, the syscall set, or the set of
network rules. A revision records what kguardian observed, not what is
applied in the cluster.
unset means a spec field was not set at that revision. unknown means a
derived value (the PSS level, the capture level) was not known at that
revision. If retention has trimmed the revision before --to, the broker
compares with the newest retained one and the output says so in a Note:
line. The latest revision number is shown by profile get.
profile export
Prints a recommendation derived from the profile. kguardian never applies it.
The patch sets only the fields that fail an evaluated Pod Security Standards
check, under the right path for the kind (
spec.template.spec for a
Deployment or DaemonSet, spec.jobTemplate.spec.template.spec for a
CronJob). stdout is the patch and nothing else; caveats go to stderr:
hostNetwork and hostPID breaks components that need the
node’s namespaces, and that a namespace-level PSS exemption is often the
right answer instead. If you still want the patch, apply it yourself:
securityContext has been reported for the workload, the command
exits non-zero: there is nothing to base a recommendation on.
Global flags (--kubeconfig, --context, --broker-namespace,
--broker-service, --broker-token-file, --debug) are listed in the
CLI overview. A 401 or 403 from the broker prints a hint:
these commands need a token with the read scope.