INNER CODE UNIT · Python

EndpointKPI

DataDog/KubeHound · scripts/dashboard-demo/main.py:68

class EndpointKPI(KPI):
    DISPLAY_TITLE = "Endpoints"
    KH_QUERY_MIN_HOPS = "kh.endpoints().minHopsToCritical()"
    KH_QUERY_PORTS = 'kh.endpoints().values("port").dedup()'
    KH_QUERY_EXTERNAL_COUNTS = "kh.endpoints().count()"
    KH_QUERY_DETAILS= 'kh.endpoints().criticalPaths().limit(local,1).dedup().valueMap("serviceEndpoint","port", "namespace")'
    KH_QUERY_EXTERNAL_CRITICAL_PATH = '''kh.V().
    has("class","Endpoint").
    count().
    aggregate("t").
    V().
    has("class","Endpoint").
    hasCriticalPath().
    count().
    as("e").
    math("100 * e/t").by().by(unfold())'''
    DESCRIPTION = '''
### Exposed asset analyis

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…