Back to Checks
e2enetworks

E2E Networks database clusters with public IPs have IP whitelisting configured

database_cluster_ip_whitelist_configured
Service: databaseSeverity: high
OfficialBuilt-inVerified
Categories:internet-exposed
Resource Type:NotDefined

E2E Networks database clusters that expose a public IP should restrict connectivity through an IP whitelist instead of accepting connections from any address (0.0.0.0/0).

Risk

Publicly exposed database clusters without IP whitelisting accept connections from any source on the internet, greatly increasing the risk of unauthorized access and data exfiltration.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler e2enetworks --checks database_cluster_ip_whitelist_configured

Recommendation

Configure an IP whitelist on publicly exposed database clusters to allow only trusted source ranges, or move the cluster onto private networking.

Check Code

from prowler.lib.check.models import Check, CheckReportE2eNetworks
from prowler.providers.e2enetworks.services.database.database_client import (
    database_client,
)


class database_cluster_ip_whitelist_configured(Check):
    """Check if E2E Networks database clusters with public IPs have IP whitelisting configured."""

    def execute(self) -> list[CheckReportE2eNetworks]:
        findings = []
        for cluster in database_client.clusters:
            if not cluster.master_has_public_ip:
                continue
            report = CheckReportE2eNetworks(metadata=self.metadata(), resource=cluster)
            report.status = "PASS"
            report.status_extended = (
                f"Database cluster {cluster.name} has IP whitelisting configured."
            )
            if not cluster.whitelisted_ips:
                report.status = "FAIL"
                report.status_extended = f"Database cluster {cluster.name} has a public IP but no whitelisted IPs."
            findings.append(report)
        return findings