Repository navigation
Description
Version: main at 0cbfc3d (#469). All three items are visible from the committed manifests and defaults; I have not deployed them to a cluster, so effects that depend on cluster-side policy are marked as such.
1. ax-server's ClusterRole can read every secret in the cluster
deploy/ax-server.yaml:27-45 binds the ax-server service account to:
kind: ClusterRole
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch"]The only secret access I find in the code is a single GET of a fixed-name secret plus a kubectl get secret fallback: internal/model/client.go:345 (/api/v1/namespaces/<ns>/secrets/<name>) and :372, called through TaskReconciler.SecretResolver with gemini-api-secret / GEMINI_API_KEY (internal/controller/reconciler.go:42-43,89). Nothing lists or watches secrets. list returns secret data, so as written a compromise of the ax-server process or any request-driven path that reaches the API with its token exposes every secret in every namespace.
Suggested direction (untested): verbs: ["get"] with resourceNames: ["gemini-api-secret"] (still cluster-scoped because atespaces map to namespaces, but only that name), or a per-atespace Role/RoleBinding created with the atespace. If Model secretKey names are meant to be resolved by the server later (docs/manifests.md shows anthropic-api-secret), the names would need to be listed or the design stated.
2. The Redis deployment has no authentication, TLS or network restriction
deploy/redis.yaml: redis:7-alpine with no --requirepass/ACL, a ClusterIP Service on 6379, and no NetworkPolicy anywhere in the repo (grep -ri networkpolicy is empty). deploy/ax-server.yaml passes no password: --redis-password defaults to "" (cmd/ax-server/main.go:53) and the manifest sets neither the flag nor REDIS_PASSWORD.
Redis is the task/workspace/model store and the lock backend (internal/store, internal/lock), and the reconciler acts on what the store returns. So any pod that can reach ax-redis.ax-system.svc.cluster.local:6379 can read task specs (including spec.env values) and write or alter them. If the cluster has default-deny network policies or a mesh in front, this is mitigated outside the repo; the manifests as committed don't say so.
Suggested direction: set a password from a Secret in both manifests, add a NetworkPolicy allowing only ax-server to reach Redis, or label deploy/redis.yaml as dev-only if that is the intent.
3. A developer's project bucket is the compiled-in snapshot default
internal/substrate/client.go:211:DefaultSnapshotsBucket = "gs://dberkov-gke-dev3/ate-env/", used inBuildActorTemplatewheneversnapshotsBucketis empty andAX_SNAPSHOTS_BUCKETis unset (:274-282).deploy/ax-server.yaml:83-84setsAX_SNAPSHOTS_BUCKETto the same value.demo.sh:39defaults the task image togcr.io/dberkov-gke-dev3/ax-task-runner@sha256:....
docs/runner.md:26 says Substrate snapshots /workspace on suspend, and the roadmap mentions checkpointed memory. So a deployment that follows the repo and doesn't override the variable points its suspend snapshots at that bucket. What happens depends on the bucket's access policy, which I can't see: either the writes fail, or they succeed into a project the deployer doesn't control. It also exposes an internal dev project name in a public repo.
Suggested direction: no compiled-in default (fail with a clear error when the bucket isn't configured), a placeholder in the manifest, and AX_IMAGE_REPO required or defaulted to the public image already named in v1alpha1.DefaultTaskImage for demo.sh.
Not checked
Actual cluster behaviour (RBAC effect, NetworkPolicies outside the repo, the bucket's IAM), whether Substrate itself constrains the snapshot location, and whether any of this already has an issue. Related but separate: the API server itself has no authentication (#TODO link if filed).
I'm glad to split this into separate issues or send small patches if you prefer.
Activity
controller: stop injecting GEMINI_API_KEY into task sandboxes
api,runner: remove the WorkspaceRef goal field and the agent bootstrap (