forked from p34709852/monkey
Island: Add `get_progenitor` to IAgentRepository
This commit is contained in:
parent
4f4eea3d66
commit
d10c148533
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue