Context Filtering in Prowler
Prowler will scan the active Kubernetes context by default. To specify a different Kubernetes context for scanning, use the--context flag followed by the desired context name, for example:
Namespace Filtering
By default,prowler scans all namespaces within the specified context.
To limit the scan to specific namespaces, use the --namespace flag followed by the desired namespace names, separated by spaces: for example:
Proxy and TLS Verification
If your Kubernetes cluster is only accessible via an internal proxy, Prowler will respect theHTTPS_PROXY or https_proxy environment variable:
K8S_SKIP_TLS_VERIFY environment variable:
kubeconfig and in in-cluster mode.
Private Cluster Endpoints
Clusters reached over a private network are a normal setup. Prowler CLI scans them with no extra configuration. On the CLI the operator supplies thekubeconfig themselves, so there is nothing to defend against and the check below does not apply.
Prowler App rejects a kubeconfig whose clusters[*].cluster.server resolves to a non-public address, as an SSRF defense. There the kube-config arrives from a tenant and the worker must not be used to reach the internal network it runs in. To scan a private cluster from Prowler App, declare the trusted ranges explicitly:
169.254.169.254), loopback, and the rest of the internal network remain protected. A kubeconfig declaring several clusters is rejected when any one of them resolves to a non-public address outside the allowlist. Malformed entries are rejected, and a non-empty allowlist is logged as a relaxed security control.
The scan runs in the worker, not the API, so the variable has to reach the worker:
- Docker Compose: set it in the root
.env; it reaches the worker through the shared environment file. - Helm: add it under
api.djangoConfig, which is rendered into the API ConfigMap that the worker inherits throughenvFrom.
PROWLER_IMAGE_PROVIDER_ALLOWED_PRIVATE_NETWORKS.
The check resolves the cluster hostname locally, before the Kubernetes client connects. If egress is only possible through HTTPS_PROXY and the hostname cannot be resolved locally, make the name resolvable to the scanning process. An allowlisted range does not help here: a host that does not resolve is rejected before any address is compared against the allowlist.
