K8sAttackMap
Features

Edge Types

Complete reference for all 19 semantic edge types in the K8sAttackMap attack graph.

Overview

Edges in the K8sAttackMap attack graph represent real attack capabilities — each edge type encodes a specific relationship between Kubernetes resources that an attacker can exploit.

The 19 edge types are defined in model/EdgeType.java. When adding new edge types to the codebase, the corresponding parsing logic in K8sJsonParser, the weight calculation in EdgeRiskScorer, and the console printer in AnalysisSummaryPrinter must all be updated.

RBAC Edges

Edge TypeLabelDescription
USES_SAuses_saPod or workload uses a ServiceAccount. Represents identity assignment — the pod gains all permissions of the SA.
BOUND_TObound_toServiceAccount bound to a Role or ClusterRole via a RoleBinding or ClusterRoleBinding.
CAN_ACCESScan_accessSubject has RBAC permission to access/manipulate a resource. Created for each rule in a Role.
MEMBER_OFmember_ofServiceAccount is a member of a Group (e.g., system:serviceaccounts:default). Indirect permission grant.
EXEC_INTOexec_intoSubject has pods/exec subresource access — can shell into a pod. High-risk lateral movement edge.
MINTS_TOKENmints_tokenSubject has access to serviceaccounts/token — can mint arbitrary tokens for the SA.

Secret / ConfigMap Access Edges

Edge TypeLabelDescription
USES_SECRETuses_secretPod references a secret (via envFrom.secretRef or volume)
MOUNTS_SECRETmounts_secretPod mounts a secret as a volume — broader access than env var reference
ENV_FROM_SECRETenv_from_secretPod reads a specific secret key via env[].valueFrom.secretKeyRef
USES_CONFIGMAPuses_configmapPod references a ConfigMap
MOUNTS_CONFIGMAPmounts_configmapPod mounts a ConfigMap as a volume
ENV_FROM_CONFIGMAPenv_from_configmapPod reads a ConfigMap key via env[].valueFrom.configMapKeyRef

Node Escape Edges

Edge TypeLabelDescription
NODE_ESCAPEnode_escapePrivileged container can escape to the host node. Created when securityContext.privileged=true or hostPID=true. Assigned very low friction (easy escape).
HOST_PATH_ACCESShost_path_accessPod has a hostPath volume mount — direct access to node filesystem.

Workload Relationship Edges

Edge TypeLabelDescription
MANAGESmanagesDeployment → ReplicaSet → Pod ownership via ownerReferences. Represents workload inheritance.
EXPOSESexposesService or Ingress exposes a Pod or another Service. Represents external access risk.
EXPOSES_TO_NODEexposes_to_nodeService with NodePort or LoadBalancer type exposes workload to a Node. Broader attack surface.

Storage Edges

Edge TypeLabelDescription
USES_PVCuses_pvcPod uses a PersistentVolumeClaim.
BINDS_PVbinds_pvPersistentVolumeClaim binds to a PersistentVolume.

Edge Risk Intuition

Risk LevelTypical Edge Types
Very HighNODE_ESCAPE, EXEC_INTO, MINTS_TOKEN
HighUSES_SA, BOUND_TO, CAN_ACCESS (wildcard verbs)
MediumMOUNTS_SECRET, HOST_PATH_ACCESS, EXPOSES
LowerMANAGES, ENV_FROM_CONFIGMAP, USES_PVC

Note: Edge risk is always contextual — a CAN_ACCESS edge to a ClusterRole with wildcard verbs is far more dangerous than one granting get on a single ConfigMap. The EdgeRiskScorer accounts for the target node's sensitivity when computing friction.

On this page