← Back to Pull requests

allowlist: grant the dropped platform roles only with the injected mount tables #1083

Closed
unknown closed this pull request without merging on Oct 27, 2026 13:26 UTC
View on GitHub
unknown unknown commented on Oct 24, 2026 21:56 UTC
Author

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 own c8s-get-cert, c8s-probe-file, c8s-get-secret and c8s-get-volume entries. 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.injectedMountTables is the one source of the mount tables the webhook gives each injected invocation: the certificate volume, the secrets volume for get-secret, each without and with the discovery mount. c8s.injectedShapes renders its shapes from it, unchanged in content and order, so no generated entry is renamed. c8s.roleFloorWorkloads now renders the credentials entries from it too, one container per table, instead of mounts: any. The router pod's allowlist-proxy keeps its -pinned entry alone.

  • The mesh role is dropped from the match too (WorkloadContainers skips mesh and credentials), and the floor granted it to /app/c8s armtls-mesh with args and mounts any. The floor's mesh entry now pins the webhook's arguments (c8s.meshArgs, shared with c8s.meshShapes) and the bound certificate table, and the base binds c8s-certs on the role-tagged mesh shapes as well. The node image's mesh entry already did both. The upstream, acme and router floor entries are unchanged: the match does not drop those roles.

  • The node image's four injected credential entries declare the same tables, with the certificate volume bound by name as the router's entries do and the discovery destination bound by storage alone, since the webhook mounts the volume the pod's annotation names there.

  • Every credentials grant in the base names the webhook's own volume at the certificate and secrets destinations (c8s-certs, c8s-secrets): c8s.injectedMountTables with bind for 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.

  • The NRI plugin binds the inventory socket directory into socket consumers only. It used to bind it into every container running as the credentials identity, including the cert-wait gate, where the node observes it as a host mount; under exact tables the gate then lost the role and the leaf was issued unnamed (the Integration (cluster) failure). One rule, takesNodeMount, now decides both which node mounts a container is given and which it observes as platform.

  • The conformance harness no longer moves such a container to the front of the pod as the credentials identity: without the role, a container running as that identity is refused at creation, and the scenario wants an ordinary container of the pod. The container runs as the image's user and the entry that admits it keeps mounts open, so the pod deploys and the match fails for want of one entry admitting both containers.
  • Verified

  • go test of internal/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/c8s and the conformance steps module. New tests: the chart's base grants the credentials and mesh roles with exact mounts only, and for the floor render refuses them to a probe-file or 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.

  • The rendered seed and base for a derived-component install are byte-identical in entry names and containers before and after, so no CDS seeding churn.

  • 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.

  • RELEASE-GATE-18 on a cluster: a conformance dispatch of the secrets area is running; result to follow.
  • Diff: 637 lines (+477 / -160) across 7 files Reviewer: joaosa Review duration: 3810m
    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
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 50.4% (MEDIUM) · Higher = larger blast radius
    50.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.9% · Safe to merge
    19.9%