diff --git a/monkey/monkey_island/cc/repository/i_agent_repository.py b/monkey/monkey_island/cc/repository/i_agent_repository.py index 880b4d7e7..ae12e8eea 100644 --- a/monkey/monkey_island/cc/repository/i_agent_repository.py +++ b/monkey/monkey_island/cc/repository/i_agent_repository.py @@ -40,6 +40,17 @@ class IAgentRepository(ABC): :raises RetrievalError: If an error occurred while attempting to retrieve the `Agents` """ + @abstractmethod + def get_progenitor(self, agent: Agent) -> Agent: + """ + Gets the progenitor `Agent` for the agent. + + :param agent: The Agent for which we want the progenitor + :return: `Agent` progenitor ( an initial agent that started the exploitation chain) + :raises RetrievalError: If an error occured while attempting to retrieve the `Agent` + :raises UnknownRecordError: If the agent ID is not in the repository + """ + @abstractmethod def reset(self): """ diff --git a/vulture_allowlist.py b/vulture_allowlist.py index ef9613fca..1e4196b78 100644 --- a/vulture_allowlist.py +++ b/vulture_allowlist.py @@ -246,6 +246,8 @@ IMitigationsRepository.save_mitigations IAgentRepository.upsert_agent IAgentRepository.get_agent_by_id IAgentRepository.get_running_agents +IAgentRepository.get_progenitor +descendant agent IAttackRepository.get_attack_report IAttackRepository.save_attack_report