Repository navigation
proposal(kagent): correct the pod-security non-goal for Kagent v1.0.x - #50
harshitnub077 wants to merge 3 commits into
Conversation
Kagent v1.0.x runs agents as Substrate Actors inside WorkerPool worker pods, not in a Deployment or Pod the controller renders. Give the v1.0.x reasons for keeping pod security out of scope: the CRs have no pod fields left, the CRDs enforce digest-pinned images, and the worker settings are checked on WorkerPool by C-0312, C-0313 and C-0317. Signed-off-by: Harshit Kudhial <122823756+harshitnub077@users.noreply.github.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…ift row checkable Signed-off-by: Harshit Kudhial <122823756+harshitnub077@users.noreply.github.com>
matthyx
left a comment
There was a problem hiding this comment.
The Substrate runtime correction is needed and the v1.0.1 schemas support it. Please correct the two coverage statements in the non-goal so readers can apply the existing seven-control scope accurately. DCO and GitGuardian passed, CodeRabbit skipped, and the reviewed commit has no GitHub Actions runs.
| - **Credentials in `spec.env`** are `C-0325`'s finding. | ||
|
|
||
| The dividing line for this proposal is therefore: **a rule earns its place only if | ||
| the misconfiguration sits on a Kagent CR field that no existing control reads.** All |
There was a problem hiding this comment.
Medium — The field-based scope criterion conflicts with the agreed controls. Shipped C-0327 already reads RemoteMCPServer.spec.headersFrom[].value to decide whether authentication is configured. This proposal assigns the same literal value to C-0325 to detect inline credentials. An inline Authorization header can satisfy C-0327 and still warrant a C-0325 finding. Please define scope by whether an existing control detects the same misconfiguration. Shipped C-0327 predicate, maintainer scope decision
| the misconfiguration sits on a Kagent CR field that no existing control reads.** All | ||
| seven rules below meet that test. | ||
|
|
||
| There is no separate shift-left gap either. The worker settings live on the |
There was a problem hiding this comment.
Medium — Narrow the file-scan coverage claim to WorkerPool settings. A Kagent SandboxTemplate can name a digest-pinned image from a registry outside the configured allowlist while its WorkerPool uses an allowed image. The CRD accepts the digest format, C-0313 reads the worker image, and C-0237 matches Kubernetes workloads and checks signatures. A manifest scan can therefore miss the SandboxTemplate image policy gap even when the WorkerPool checks run. Please acknowledge that gap here and keep additional Kagent image-policy controls out of scope for this proposal. Kagent image schema, C-0313 rule and input fields, C-0237 match metadata
…the CR image gap Signed-off-by: Harshit Kudhial <122823756+harshitnub077@users.noreply.github.com>
|
Thanks! Both fixed in 5f10823. The scope line now goes by whether an existing control detects the same misconfiguration, with C-0327 and C-0325 on |
The "Pod security on Kagent CRs" non-goal says the Kagent controller renders
Agent,HarnessandSandboxTemplateinto aDeploymentorPodthat regolibrary already scans. That was the 0.10.x model (manifest_builder.go#L622at v0.10.1 builds anappsv1.Deployment). On v1.0.x the controller compiles them into a SubstrateActorTemplate, and agents and sandboxes run as Substrate Actors inside the worker pods of theWorkerPoolnamed inspec.substrate.workerPoolRef(sandboxes.md at v1.0.1). So C-0009, C-0016, C-0017 and C-0048 see Substrate's shared worker pods, not any one agent.The scope doesn't change, only the reasons. I found this while working on kubescape/regolibrary#1011.
Changes
WorkerPool, which C-0312, C-0313 and C-0317 already check (in file scans too);spec.envare C-0325's.Deploymentthe Kagent controller renders" wording is replaced with how v1.0.x actually runs agents.serviceAccountNamelives in the CR's workload block, but no v1.0.x Kagent CR has that field.Evidence
All three on kind with the stock kagent 1.0.1 CRDs.
The fields a pod-security control would read, counted on
Agent,Harness,SandboxTemplateandAgentTemplate:The same check over all eight CRD files in
helm/kagent-crds/templatesat v1.0.1, with a few more pod fields:What
workloadactually holds:The CRDs reject an unpinned image at admission:
Related issues/PRs
ate.dev/v1in file scans too)