mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
Address the remaining review findings: - The materializer now prunes PackageSources it materialized from an earlier revision that the current artifact no longer contains (including a single/multi rename), so a removed package leaves the catalog; installed Packages stay. - A repeat connect updates the fetched OCIRepository's spec, label and name annotation instead of replacing the object, so the operator's finalizer and materialized-revision annotation survive; covered by a test. - OCIRepository write verbs move from the cluster-wide cozystack-api ClusterRole to a namespaced Role in cozy-system (get/list/watch stay cluster-wide for the watch cache), since the API only manages tap sources there. - 'cozypkg validate --require-signature' now pulls the exact manifest digest cosign verified, closing the tag-mutation window between verify and pull. - safeJoin rejects any '..' path segment outright (defense in depth and to satisfy the Zip-Slip scanner) on top of the existing containment check. - Document why the index gate's merge/label steps need a workflow_run split for fork pull requests. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
28 lines
871 B
YAML
28 lines
871 B
YAML
# The cozystack-api ServiceAccount creates, updates, and deletes a community
|
|
# tap's Flux OCIRepository, but only ever in cozy-system. Keep those write verbs
|
|
# in a namespaced Role here (list/watch/get stay cluster-wide in the ClusterRole
|
|
# for the aggregated watch cache) rather than granting them cluster-wide.
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: cozystack-api-tap-sources
|
|
namespace: cozy-system
|
|
rules:
|
|
- apiGroups: ["source.toolkit.fluxcd.io"]
|
|
resources: ["ocirepositories"]
|
|
verbs: ["create", "update", "patch", "delete"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: cozystack-api-tap-sources
|
|
namespace: cozy-system
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: cozystack-api-tap-sources
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: cozystack-api
|
|
namespace: cozy-system
|