Skip to main content
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):
What this adds:
  • the applicationsecurityprofiles.kguardian.dev CRD, kept on helm uninstall like the SeccompProfile CRD;
  • evaluator RBAC: list/watch on applicationsecurityprofiles and patch on applicationsecurityprofiles/status. Nothing else: no create, delete, update, or spec writes;
  • BROKER_URL on the evaluator and, when broker.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.
To accept the current profile, review it (the frontend profile page, or kubectl kguardian profile get payments/Deployment/checkout and profile diff), then set spec.acceptedRevision to status.current.revision:
Spec edits are picked up immediately. Everything else is re-read every 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, or False with WorkloadNotFound (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, or Unknown with NoAcceptedRevision, AcceptedRevisionNotFound or ProfileUnavailable.
Revisions come from the broker’s version history, which keeps the newest 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 resyncInterval adds broker load.
  • Status reflects the broker’s view: a dimension the broker cannot see stays unknown here too.