allowlist: grant the dropped platform roles only with the injected mount tables #1083
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 637 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.386
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1083"
general
weight: 0.35
joaosa
The CDS drops a container the inventory reports under the credentials role from the workload match before a secret release (allowlist M4, secret release A3). The node grants that role from its measured base, and two of the base's sources granted it by digest and argv alone, with
mounts: any: the role entries the chart renders beside an open-args floor entry (c8s.roleFloorWorkloads, what the kind lane's image-store scan produces) and the node image's ownc8s-get-cert,c8s-probe-file,c8s-get-secretandc8s-get-volumeentries. The component shapes (c8s.injectedShapes, #876) pinned the mount table already.So a pod running its own container from the injected image, with the argv
/c8s probe-file --wait …and an emptyDir of its choosing on the node's disk, took the credentials role, fell out of the match, and the CDS released a secret the entry did not admit that container for. The conformance scenario RELEASE-GATE-18 (a secret client the pod runs as a container of its own stays in the match) observed the 200 on kind.What changes
c8s.injectedMountTablesis the one source of the mount tables the webhook gives each injected invocation: the certificate volume, the secrets volume forget-secret, each without and with the discovery mount.c8s.injectedShapesrenders its shapes from it, unchanged in content and order, so no generated entry is renamed.c8s.roleFloorWorkloadsnow renders the credentials entries from it too, one container per table, instead ofmounts: any. The router pod'sallowlist-proxykeeps its-pinnedentry alone.WorkloadContainersskipsmeshandcredentials), and the floor granted it to/app/c8s armtls-meshwith args and mountsany. The floor's mesh entry now pins the webhook's arguments (c8s.meshArgs, shared withc8s.meshShapes) and the bound certificate table, and the base bindsc8s-certson the role-tagged mesh shapes as well. The node image's mesh entry already did both. Theupstream,acmeandrouterfloor entries are unchanged: the match does not drop those roles.c8s-certs,c8s-secrets):c8s.injectedMountTableswithbindfor the floor and the role-tagged component shapes, as the node image's entries do. The webhook refuses a pod's own mount of those volumes, not another memory volume at the same destination. The cert-wait gate's arguments are pinned exact. The seed carries the tables unbound, since a served entry binds no volume.takesNodeMount, now decides both which node mounts a container is given and which it observes as platform.Verified
go testofinternal/helmchart(apart from the Linux-only host-sweep tests),internal/webhook,internal/cmds/nri-image-policy(the node-image template tests; the socket tests do not bind on macOS),pkg/allowlist,cmd/c8sand the conformance steps module. New tests: the chart's base grants the credentials and mesh roles withexactmounts only, and for the floor render refuses them to aprobe-fileor mesh-endpoint launch carrying a disk volume of the pod's own or its own memory volume at the certificate destination (the mesh cases fail on the previous template); the webhook's measured-base test checks that each injected container's own mounts, with and without a discovery volume, hold the role under the node image's entries and that the same launch with a disk volume holds none.TestCertGateTakesNoSocketDirectory: the gate gets the CDS policy, no socket directory, and keeps the role with the node's own mounts. The failure was reproduced on a local kind cluster; Integration (cluster) passed with the fix at 8e71c800.