diff --git a/monkey/common/events/__init__.py b/monkey/common/events/__init__.py index 65d39de0e..da5b88234 100644 --- a/monkey/common/events/__init__.py +++ b/monkey/common/events/__init__.py @@ -1 +1,2 @@ from .abstract_event import AbstractEvent +from .credentials_stolen_events import CredentialsStolenEvent diff --git a/monkey/common/events/credentials_stolen_events.py b/monkey/common/events/credentials_stolen_events.py new file mode 100644 index 000000000..f1db1c142 --- /dev/null +++ b/monkey/common/events/credentials_stolen_events.py @@ -0,0 +1,18 @@ +from dataclasses import dataclass +from typing import Sequence + +from common.credentials import Credentials + +from . import AbstractEvent + + +@dataclass(frozen=True) +class CredentialsStolenEvent(AbstractEvent): + """ + An event that occurs when an agent collects credentials from the victim + + Attributes: + :param stolen_credentials: The credentials that were stolen by an agent + """ + + stolen_credentials: Sequence[Credentials] diff --git a/vulture_allowlist.py b/vulture_allowlist.py index 29359dfe9..7c5f67804 100644 --- a/vulture_allowlist.py +++ b/vulture_allowlist.py @@ -214,6 +214,9 @@ _make_simulation # unused method (monkey/monkey_island/cc/models/simulation.py: AbstractEvent tags +# TODO DELETE IN #2176 +CredentialsStolenEvent + # TODO DELETE AFTER RESOURCE REFACTORING