Join our Newsletter — 33% off our NHI Course
Home› Guides› Securing the container runtime security and CWPP itself:…
Guide Cloud Security

Securing the container runtime security and CWPP itself: harden the sensors, consoles and roles behind them

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 14 November 2026 14 min read
On this page

A container runtime security or cloud workload protection platform (CWPP) runs a privileged sensor on every node, holds cluster-wide permissions and can often kill processes or block deployments, so whoever controls it controls a large part of your Kubernetes estate. The tool that watches for container escapes is itself built from the things an escape aims for: host PID namespace access, kernel tracing rights, host filesystem mounts, cluster roles and credentials to a central console. This guide covers securing the tool itself as a product class: the console and its admin roles, the node sensor and its privileges, the cluster integration identities, admission and response actions, policy and exception integrity, the audit trail and the lifecycle. It is for platform engineers, detection engineers and the owners of the tool. It is vendor-neutral: confirm exact setting names and permission sets in your vendor's documentation. What runtime security is and how to write detections is covered in the Container Runtime Security Guide; how to roll the tool out in phases is in the Container runtime security and CWPP rollout playbook.

Key takeaways

  • The sensor is a privileged workload by design. Run it in its own namespace under the Kubernetes Privileged profile, but keep every other namespace at Baseline or Restricted and stop anyone else deploying into the sensor namespace.
  • Cluster roles are the real blast radius. The integration service accounts should read what they need and nothing more; rights such as nodes/proxy, secrets list, bind, escalate and webhook configuration are cluster takeover paths.
  • Enforcement is power over production. Process kill, pod deletion, network isolation and admission blocks belong to separate roles with approval, protected namespaces and a documented kill switch.
  • Silence is the attacker's goal. Sensor heartbeat loss, rule changes and new exceptions are the first things an intruder will try, so they must alert outside the tool as well as inside it.
  • The console is a third-party service holding your telemetry. Process trees, command lines and file paths can carry secrets; treat the console as sensitive data storage with SSO, scoped roles and export limits.

Why the tool is a high-value target

NIST SP 800-190 groups container risk into images, registries, orchestrators, containers and host operating systems. A runtime security platform touches the last three at once, and an attacker who controls it inherits that reach. The table reflects a common architecture and is NHI Mgmt Group's view, not a description of any one product; your platform may name, merge or split these components differently.

ComponentWhat it holds or can doIf an attacker controls itPrimary control
Management console and APIPolicies, rules, exceptions, alerts, telemetry, response actions, user roles, cluster enrolment keysDisables rules, adds exceptions for their foothold, runs response actions, reads telemetrySSO with phishing-resistant MFA, least-privilege roles, scoped API keys
Node sensor (usually a DaemonSet)Host PID namespace, kernel tracing or BPF rights, hostPath mounts, sometimes privileged modeCode execution on every node at once (T1611 outcome without an escape)Signed images, pinned digests, minimal capabilities, locked namespace
Cluster integration service accountsRead workloads, namespaces and events; sometimes delete pods or patch network policyCluster reconnaissance (T1613) or destructive changesRead-only ClusterRole for discovery; separate, scoped role for response
Admission controller or webhookSees every admitted object; can block or mutateReads objects, including secrets if matched; blocks all deploymentsNarrow match rules, RBAC on webhook configuration, documented fail mode
Enrolment and outbound credentialsTokens or certificates that bind sensors to the tenantRogue sensors feeding false data, or tenant accessShort-lived enrolment tokens, per-cluster credentials, rotation
Pipeline and registry integrationsTokens to read images and post build resultsTampered build gates, image metadata theftRead-only, repository-scoped tokens with owners and expiry

Admin roles and console access

  • Role design: define at least platform administrator (clusters, integrations, users), policy author (rules and profiles), exception approver, analyst (alerts for owned clusters or namespaces) and responder (response actions). Keep full administrators to a handful and do not give analysts rule-editing rights.
  • Scope by cluster and namespace: application teams need their own workloads' alerts, not the whole fleet. Scoping limits what one compromised analyst account reveals.
  • Authentication: sign in through your identity provider with SSO and phishing-resistant MFA, disable local accounts except one documented break-glass account, and test it. See the Break-Glass Account Guide.
  • Just-in-time elevation: grant administrator and responder roles for a time-bound window with a recorded reason, through your privileged access process.
  • Admin devices: administer from hardened devices. See the Privileged Access Workstations Guide.
  • API keys: issue per-integration keys with the narrowest role, an owner and an expiry. A personal key used by an automation job is an orphaned NHI waiting to happen.

Hardening the node sensor

The Kubernetes Pod Security Standards describe the Privileged profile as purposely open and aimed at system and infrastructure workloads managed by privileged, trusted users. Runtime sensors usually fall into that group. The goal is to contain that exception, not to pretend it away.

SettingWhat to aim forWhy
NamespaceDedicated namespace labelled pod-security.kubernetes.io/enforce: privileged, with no application workloadsConfines the exception; every other namespace stays at Baseline or Restricted
Who can deploy thereOnly the platform team's deployment identity can create or patch DaemonSets, pods or roles in the namespaceThe RBAC good practices note that anyone who can create workloads gains the namespace's service accounts and secrets
Privileged modeUse specific capabilities instead of privileged: true where the vendor documents itPrivileged mode removes most isolation at once
CapabilitiesPrefer CAP_BPF and CAP_PERFMON (Linux 5.8 and later) over CAP_SYS_ADMIN where the sensor supports itThe capabilities manual describes CAP_SYS_ADMIN as overloaded; the narrower capabilities were split out of it
Host mountsRead-only hostPath mounts limited to the paths the vendor lists; no write access to the host rootWritable host mounts turn a sensor bug into host compromise
ImagePull by digest from your own registry mirror; verify signatures at admissionA swapped sensor image runs on every node (T1525, T1195.002)
Scheduling priorityA high PriorityClass so the sensor is not evicted under pressure; limit who can use high priority with ResourceQuotaAn evicted sensor is a silent gap
Service account tokenSet automountServiceAccountToken: false on sensor pods that do not call the API serverRemoves a credential an attacker on the node could take (T1552.007)

Watch for sensor pods with changed specs, new init containers, extra volumes or images from an unexpected registry. These are the signs of someone using your security tool as a deployment channel (T1610). The eBPF Security Guide covers kernel-level risks of BPF programs in more depth.

Cluster integration identities

Most platforms install one or more service accounts with ClusterRoles. Read the manifests or chart values before installing: they define what the tool can really do in your cluster. The Kubernetes RBAC good practices page lists the rights that amount to privilege escalation, and they should be absent from the tool's discovery role.

RightWhy it mattersWhat to do
get, list or watch on secretsList and watch reveal secret contents, not just namesExclude secrets from discovery roles; if secret scanning is a feature, scope it and log it
nodes/proxyKubelet API access including command execution; bypasses audit logging and admission control; get is not read-onlyDo not grant unless the vendor documents a specific need, and alert on use
bind, escalate, impersonateCreate bindings to roles the holder lacks, or act as other usersNever in a monitoring role
Validating or mutating webhook configurationsControl lets the holder read any admitted object and, for mutating webhooks, change itOnly the installer identity, never the running controller
serviceaccounts/token createIssues tokens for existing service accountsExclude
patch on namespacesCan change Pod Security Admission labels and weaken enforcementExclude from the tool's roles
delete on pods, create or patch on network policiesNeeded only for response actionsSeparate response service account, bound per namespace where possible
  • Split discovery from response: one read-only identity for inventory and context, a second for response actions, so a bug in the response path cannot read the cluster and a read token cannot change it.
  • Enrolment credentials: use per-cluster enrolment tokens with a short validity, revoke them after enrolment, and rotate the long-term sensor credential on a schedule. A shared fleet token copied into a public chart value is a common leak.
  • Inventory: record every tool identity per cluster with owner, role and chart version. See the Kubernetes RBAC Guide and the Kubernetes Service Account Token Guide.

Admission and response guardrails

Admission blocks and response actions turn the platform from an observer into an actor in production. The Kubernetes admission webhook good practices give the guardrails that also protect you from your own security tool.

  1. Exclude what keeps the cluster alive: do not match kube-system or kube-node-lease, and exclude the webhook's own namespace so it cannot block its own pods from restarting.
  2. Choose the fail mode on purpose: mutating webhooks default to failurePolicy: Fail; the good practices recommend Ignore for mutation with a validating check behind it. Record the choice and who approved it. See the Kubernetes Admission Control Guide.
  3. Keep timeouts small and run several replicas behind a ClusterIP Service, so a slow webhook does not stall the API server.
  4. Lock the webhook configuration: restrict create, update, patch and delete on webhook configurations with RBAC, and alert when one changes or disappears. Deleting the configuration is a quiet way to switch enforcement off.
  5. Protected workloads: exclude the sensor, the logging pipeline, ingress and DNS from automated kill or isolate actions.
  6. Approval and caps: require a human for fleet-wide actions, cap actions per hour, and log the approver.
  7. Kill switch: document how to pause all enforcement in one step and test it twice a year (our recommendation).

Policy and exception integrity

  • Policy as code: keep rules, profiles and exceptions in a repository with review, deploy them through a pipeline, and alert on drift between the repository and the console.
  • Owner, reason, expiry: every exception needs all three; 90 days is our suggested default. A broad exception such as a whole namespace or an image name pattern deserves a second approver.
  • Separate request and approval: the team that owns a workload may request an exception; a different role approves it.
  • Coverage checks: alert when a cluster stops reporting, a node has no running sensor, a sensor falls back to a degraded mode, or a rule set is disabled. Reconcile node counts from the cluster against sensor counts in the console daily.

The tool's own audit trail

EventSourceAlert?
Role assignment, new local user, SSO or API key changeConsole audit logAlways
Rule disabled, profile changed, exception created or widenedConsole audit logAlways, with approver
Response action run (kill, isolate, delete)Console audit log and Kubernetes audit logFleet-wide or protected workloads
Sensor DaemonSet, namespace or ClusterRole changedKubernetes audit logAlways
Webhook configuration changed or deletedKubernetes audit logAlways
Sensor heartbeat lost, node uncoveredConsole health and your SIEMAbove a set threshold
Bulk telemetry exportConsole audit logAbove a set volume

Export the console audit log to a SIEM or archive that tool administrators cannot alter (NIST SP 800-53 AU-9(2)). Log Kubernetes changes to the tool's namespace and roles at Metadata level or above, and keep secrets at Metadata so their contents never reach the audit log. If you send API server audit events through the webhook backend, remember that batched events are dropped when the buffer overflows, so monitor for gaps. See the Kubernetes Audit Log Detection Guide.

Telemetry as sensitive data

  • Command lines carry secrets: environment variables and arguments often contain tokens and passwords. Turn on masking or redaction for command lines and environment data where the platform offers it, and rotate any real secret that appears.
  • Know where data lives: record the console region, retention period and deletion process in your data protection records, and confirm what vendor staff can see.
  • Restrict exports: limit who can export raw telemetry or forensic captures, and treat captured files as evidence with access control. See the Container and Kubernetes Forensics Guide.

Lifecycle: buy, deploy, run, retire

StageSecurity actions
BuyAsk for the exact ClusterRoles, capabilities and host mounts per feature; whether the sensor can run without privileged mode; SSO and MFA support; audit log export; where telemetry is stored; the vendor's vulnerability disclosure policy and security advisories page. See the Container Security Buyer's Guide.
DeployReview manifests, mirror and pin images, create the locked namespace, deploy discovery roles first and response roles only where agreed, enable SSO and audit export on day one.
RunApply vendor security updates to sensors and controllers promptly; quarterly review of console roles, API keys, exceptions and cluster roles; daily coverage reconciliation.
RetireRemove DaemonSets, webhook configurations, ClusterRoles and bindings from every cluster; revoke enrolment and API credentials; obtain written confirmation of telemetry deletion. A forgotten webhook with Fail can block deployments long after the tool is gone.

Detection and measurement

  1. Sensor coverage: percentage of nodes with a healthy sensor, reconciled against the cluster node list (target: 100 percent, gaps explained).
  2. Tool service accounts holding any of the escalation rights in the table above (target: zero outside a documented response role).
  3. Exceptions past expiry without re-approval (target: zero).
  4. Console admin and responder actions with a matching change or case reference (target: 100 percent).
  5. Median time from sensor heartbeat loss to alert in the SIEM.
  6. Days since the enforcement kill switch was last tested.

Framework mapping

Control areaNIST SP 800-53 Rev. 5NIST CSF 2.0ATT&CK threat addressed
Console roles and scopingAC-2, AC-6, AC-6(5)PR.AA-05T1078 Valid Accounts
Cluster integration identitiesAC-6, IA-5PR.AA-05T1552.007 Container API, T1098 Account Manipulation
Sensor hardening and image integrityCM-6, CM-7, SI-7PR.PS-01T1610 Deploy Container, T1525 Implant Internal Image
Rules, exceptions and webhook changesCM-3PR.PS-01T1685 Disable or Modify Tools
Audit trail and coverageAU-6, AU-9(2), AC-6(9), SI-4PR.PS-04, DE.CM-09T1685 Disable or Modify Tools
Vendor and update riskSA-9, SR-3, SI-2GV.SC-07T1195.002 Compromise Software Supply Chain

Common failure patterns

  • Sensor namespace open to all: the privileged namespace allows any CI identity to deploy, so it becomes the easiest place to run a privileged pod.
  • Discovery role with secrets list: the default chart grants list on secrets cluster-wide for a feature nobody uses.
  • Webhook left behind: an uninstalled tool leaves a webhook configuration with Fail, and the next outage blocks every deployment.
  • Exceptions as noise control: whole namespaces excluded during tuning and never re-enabled.
  • Heartbeat loss treated as an operations issue: missing sensors raise a dashboard tile rather than a security alert.
  • Shared enrolment token: one long-lived token used across clusters and committed in a values file.

Practitioner checklist

  • Classify the platform's service accounts, API keys and enrolment credentials as privileged NHIs and inventory them per cluster.
  • Enforce SSO with phishing-resistant MFA and keep one tested break-glass account.
  • Run the sensor in a dedicated privileged namespace that only the platform team can deploy into.
  • Prefer narrow capabilities and read-only host mounts over privileged mode; pin and verify sensor images.
  • Remove secrets, nodes/proxy, bind, escalate, impersonate and namespace patch from discovery roles.
  • Split response into its own role with approval, caps, protected workloads and a tested kill switch.
  • Keep rules and exceptions in code, with owner, reason and expiry, and alert on drift.
  • Alert on sensor loss, webhook changes and rule changes in your SIEM, not only in the console.
  • Remove every DaemonSet, webhook and binding on retirement.

Standards and references

Related NHI Mgmt Group resources: Container Runtime Security Guide · Container runtime security and CWPP rollout playbook · Container Runtime Protection vs Host EDR · Securing the EDR and XDR platform itself · Securing the CNAPP and CSPM platform itself

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 14 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.