Repository navigation
Description
🤖 Generated by the Agentic Engineer
Evidence
Trivy reports zero misconfigurations on both ResourceGraphDefinition files, measured on the
current tree with the exact CI invocation (trivy fs --scanners misconfig --ignorefile .trivyignore.yaml --skip-dirs tests ., v0.73.0):
k8s/bases/infrastructure/resource-graph-definitions/tenant/resource-graph-definition.yaml misconfigs=0 fails=0
k8s/bases/infrastructure/resource-graph-definitions/webapp/resource-graph-definition.yaml misconfigs=0 fails=0
That is not a clean bill of health — it is the scanner declining to look. Trivy parses the RGD as a
single custom resource and does not descend into the workload templates nested in its resources:
spec, so the Deployments, Services, HTTPRoutes and RBAC those templates generate are never
evaluated. The neighbouring plain cluster-role.yaml files in the same directories do produce
findings (1 and 2 respectively), which is what makes the zero attributable to the nesting rather
than to the directory being skipped.
The same reasoning applies to checkov, and to the Kubescape gate, which scans stored specs.
Why it matters
Tenants and their web applications are the workloads most likely to be added or changed without
platform-level review, and they are precisely the ones no static misconfiguration scanner currently
sees. A tenant template shipping privileged: true, no resource limits, or a workload placed in
kube-system would pass every static gate on this repository.
This was found while scoping KSV-0037 in #3054. That scoping does not cause the gap and does not
widen it — the RGD templates were already unreachable to the check, with and without the exception —
but it is why the exception's comment cannot claim tenant coverage, and the gap deserves its own
tracking rather than a footnote.
Expected behaviour
The workload templates inside an RGD are statically checked for the same misconfiguration classes as
a committed manifest, so a non-compliant tenant template fails a pull request.
Smallest useful first step
Confirm the reach precisely before choosing a mechanism: add a deliberately non-compliant container
spec to a scratch copy of the tenant RGD and confirm no scanner reports it. Then evaluate the
options — rendering the RGD's templates into concrete manifests in a scan-only step, a schema-aware
policy that reads spec.resources[].template, or a Kyverno policy enforcing the same controls at
admission on the generated objects (which would cover them at runtime rather than statically).
Acceptance criteria
- A non-compliant workload template inside
tenantorwebappfails a check on the pull request
that introduces it. - The mechanism is documented next to the RGDs so the next template author knows what gates them.
- No blanket disable or path exclusion is introduced to achieve it.
Metadata
Metadata
Assignees
Labels
Type
Fields
Projects
- StatusShow more project fields✅ Done
Activity
docs(security): correct the KSV-0037 scope note on tenant coverage
coderabbitai commentedon Aug 10, 2026
🔗 Related PRs
#2389 - feat(tenants): pilot the Tenant RGD local-first via an opt-in ascoachingogvaner Tenant CR [merged]
#2408 - fix(rgd): single regex-alternated cosign identity for tenant artifact verification [merged]
#2519 - docs(tenant): record KRO as the chosen Tenant abstraction (ADR) [merged]
#2533 - feat(tenant): optional ResourceQuota/LimitRange guardrails on the KRO Tenant RGD [merged]
#2821 - security: pin the tenant RGD cosign subject to actions and a fixed ref [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
chore: agent-claim #3055 nonce=a32d5cd708041035ee679d7bfcd50241
chore: agent-claim #3055 nonce=57f2bae7df50e8f6b90577cdf911ed72