When Farhadi attacked his residence with a bomber, Ye Fan had already received a warning message from Lani. Even though he had retreated to a safe place by then, he had formed a precise judgment about Lani's identity.
Additionally, during discussions on countermeasures with Kasam, Kasam revealed that there was a significant figure beside Farhadi who was dissatisfied with the internal chaos in Ba Country and wanted to help Kasam establish a stable regime by providing important information from time to time.
Lani was the one who proactively contacted Kasam as the undercover informant beside Farhadi. Even Kasam himself wasn't sure who was leaking information to him, because Lani wasn't someone Kasam planted next to Farhadi. Instead, Lani had her own realization that the ongoing war in Ba was causing too much suffering for many people. With this understanding and awareness, Lani assumed an important mission and became a fatal threat beside Farhadi.