INNER CODE UNIT · Python
IdentitiesKPI
DataDog/KubeHound · scripts/dashboard-demo/main.py:92
class IdentitiesKPI(KPI):
DISPLAY_TITLE = "Identities"
KH_QUERY_MIN_HOPS = "kh.identities().minHopsToCritical()"
KH_QUERY_EXTERNAL_COUNTS = "kh.identities().count()"
KH_QUERY_DETAILS= 'kh.identities().criticalPaths().limit(local,1).dedup().valueMap("name","type","namespace")'
KH_QUERY_EXTERNAL_CRITICAL_PATH = '''kh.V().
has("class","Identity").
has("critical", false).
count().
aggregate("t").
V().
has("class","Identity").
has("critical", false).
hasCriticalPath().
count().
as("e").
math("100 * e/t").by().by(unfold())'''
DESCRIPTION = '''