ApplicationSecurityProfile puts kguardian’s per-workload security profile into the Kubernetes API. You create one per workload and name the profile revision you reviewed. The kguardian-evaluator reads the profile from the broker and writes status: overall posture, each dimension’s status, and whether the workload has changed since the revision you accepted.
It is report-only. kguardian never creates, edits or deletes these resources, never changes the workload, and enforces nothing. Accepting a revision is always your edit.
Enable it
Off by default. It needs the evaluator (on by default):- the
applicationsecurityprofiles.kguardian.devCRD, kept onhelm uninstalllike the SeccompProfile CRD; - evaluator RBAC:
list/watchonapplicationsecurityprofilesandpatchonapplicationsecurityprofiles/status. Nothing else: no create, delete, update, or spec writes; BROKER_URLon the evaluator and, whenbroker.auth.enabled=true, the read-scope token. The evaluator never holds the ingest token;- when
broker.networkPolicy.enabled=true, the evaluator is admitted to the broker.
Use it
workloadRef uses the broker’s workload key. kind is case-sensitive and the field is immutable: to point at another workload, create another resource. Only one resource per workload is reported. If two name the same workload, the older one wins and the other gets ProfileAvailable=False with reason DuplicateWorkloadRef.
kubectl kguardian profile get payments/Deployment/checkout and profile diff), then set spec.acceptedRevision to status.current.revision:
resyncInterval, because profile changes happen on the broker side and raise no Kubernetes event.
Status
Status follows the profile contract (v1.3). Unknown is never shown as safe.
Conditions:
ProfileAvailable:True/ProfileRetrieved, orFalsewithWorkloadNotFound(check kind and name, or the workload has not been observed yet),BrokerUnavailable,BrokerUnauthorized,BrokerError(for example a broker too old to serve the profile routes),DuplicateWorkloadRef.Deviated:True/ProfileChanged,False/MatchesAccepted, orUnknownwithNoAcceptedRevision,AcceptedRevisionNotFoundorProfileUnavailable.
PROFILE_VERSIONS_MAX_PER_WORKLOAD (default 50) per workload for PROFILE_VERSIONS_RETENTION_DAYS (default 90). An accepted revision that has been pruned reports AcceptedRevisionNotFound; accept a current one.
Limits
- The evaluator runs a single replica and reads profiles one at a time. The broker computes each profile live, so a large number of resources with a short
resyncIntervaladds broker load. - Status reflects the broker’s view: a dimension the broker cannot see stays
unknownhere too.