Back to Checks
Scheduler pod has profiling disabled
scheduler_profiling
Service: schedulerSeverity: medium
OfficialBuilt-inVerified
Categories:cluster-security
Resource Type:Pod
Kubernetes Scheduler profiling configuration, specifically whether scheduler containers run with --profiling=false to keep the profiling API disabled.
Risk
With profiling enabled, the pprof endpoints can expose runtime internals (stack traces, memory, goroutines), aiding reconnaissance and credential discovery, harming confidentiality.
Extra CPU/heap usage can be abused for DoS, impacting availability.
Run this check with Prowler
Run in Prowler CloudRun
prowler kubernetes --checks scheduler_profilingRecommendation
Disable by default: set --profiling=false on the Scheduler.
If profiling is required, enable it only temporarily, restrict access with network policies, bind to loopback, and log/monitor usage. Apply least privilege and defense in depth to limit exposure.
Remediation
Other
1SSH to the control-plane node
2Edit the scheduler manifest: `sudo vi /etc/kubernetes/manifests/kube-scheduler.yaml`
3In `spec.containers[].command`, add this flag (or change existing to false):
4```
5--profiling=false
6```
7Save the file; kubelet will automatically restart the scheduler with profiling disabled
Check Code
from prowler.lib.check.models import Check, Check_Report_Kubernetes
from prowler.providers.kubernetes.services.scheduler.scheduler_client import (
scheduler_client,
)
class scheduler_profiling(Check):
def execute(self) -> Check_Report_Kubernetes:
findings = []
for pod in scheduler_client.scheduler_pods:
report = Check_Report_Kubernetes(metadata=self.metadata(), resource=pod)
report.status = "FAIL"
report.status_extended = (
f"Scheduler has profiling enabled in pod {pod.name}."
)
for container in pod.containers.values():
if "--profiling=false" in str(container.command):
report.status = "PASS"
report.status_extended = (
f"Scheduler does not have profiling enabled in pod {pod.name}."
)
findings.append(report)
return findings