Skip to content

Harden crucible-kueue RBAC, pull secrets, and manifest validation - #547

Merged
wseaton merged 1 commit into
mainfrom
kueue-security-hardening
Dec 2, 2026
Merged

wseaton merged 1 commit into
mainfrom
kueue-security-hardening

Conversation

@wseaton

@wseaton wseaton commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Batch 1 of the crucible-kueue security & correctness audit:

  • C-1 (RBAC secret-read bypass): extract both secretName and name in access::referenced and allowlist subfields on volumes[].secret and projected.sources[].secret.
  • H-1 & H-5 (deploy RBAC & strict PVC boundary): remove cluster pull_secrets from caller_cluster_role secrets: get, gate persistentvolumeclaims: get on KueueAllowlist::Tenant, and gate LLMInferenceService pvc:// model URIs on persistentVolumeClaim volume-source allowance.
  • H-2 (pull-secret 409 & rollback): verify ownerReferences on copy_pull_secrets 409 instead of blindly ignoring it, roll back newly created workloads (with UID precondition) if post-create pull-secret copy or expose fails, add UID preconditions to workload_delete, and match HTTP 409 specifically on create conflicts.
  • H-4 & H-7 (LLMInferenceService & JobSet validation): allowlist spec.storageInitializer to {enabled: bool} and validate JobSet replicatedJobs[].template.metadata against reserved labels/annotations and extra metadata fields.
  • Manifest hardening: restrict pod and PVC template metadata to prevent finalizers/ownerReferences, apply default_lifetimes when explicit null is provided, reject negative resource quantities and root GIDs (runAsGroup/fsGroup/supplementalGroups: 0), and reject multi-source volumes when name is omitted.

- Check both secretName and name in access::referenced and allowlist
  secret/projected-secret volume subfields to close a dual-field RBAC
  secret-read bypass.
- Remove cluster pull_secrets from caller_cluster_role secrets:get and
  gate persistentvolumeclaims:get on the tenant profile.
- Verify ownerReferences on copy_pull_secrets 409, roll back newly
  created workloads on post-create setup failure, add UID preconditions
  to workload_delete, and match 409 specifically on create conflicts.
- Allowlist LLMInferenceService spec.storageInitializer to {enabled} and
  gate pvc:// model URIs on the persistentVolumeClaim volume source.
- Validate JobSet replicatedJobs[].template.metadata, block finalizers
  and ownerReferences on pod and PVC templates, handle explicit null in
  default_lifetimes, reject negative quantities and root GIDs (0), and
  reject multi-source volumes without a name.

Assisted-by: Claude
@wseaton
wseaton enabled auto-merge December 1, 2026 23:36
@wseaton
wseaton added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 1323a36 Dec 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant