Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename event serializers #2300

Merged
merged 42 commits into from
Sep 16, 2022
Merged

Rename event serializers #2300

merged 42 commits into from
Sep 16, 2022

Conversation

shreyamalviya
Copy link
Contributor

What does this PR do?

Fixes #2293

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?
  • Have you checked that you haven't introduced any duplicate code?

Testing Checklist

  • Added relevant unit tests?
  • Have you successfully tested your changes locally? Elaborate:

    UTs pass

  • If applicable, add screenshots or log transcripts of the feature working

@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Base: 59.37% // Head: 59.40% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (dd2ed50) compared to base (54f1bd2).
Patch coverage: 81.60% of modified lines in pull request are covered.

❗ Current head dd2ed50 differs from pull request most recent head 998c1d7. Consider uploading reports for the commit 998c1d7 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2300      +/-   ##
===========================================
+ Coverage    59.37%   59.40%   +0.02%     
===========================================
  Files          531      532       +1     
  Lines        13765    13774       +9     
===========================================
+ Hits          8173     8182       +9     
  Misses        5592     5592              
Impacted Files Coverage Δ
monkey/common/agent_event_serializers/consts.py 100.00% <ø> (ø)
monkey/common/agent_events/__init__.py 100.00% <ø> (ø)
monkey/common/agent_events/abstract_agent_event.py 100.00% <ø> (ø)
monkey/infection_monkey/exploit/mssqlexec.py 0.00% <0.00%> (ø)
monkey/infection_monkey/exploit/smbexec.py 0.00% <0.00%> (ø)
monkey/infection_monkey/exploit/tools/smb_tools.py 0.00% <0.00%> (ø)
monkey/infection_monkey/exploit/wmiexec.py 0.00% <0.00%> (ø)
monkey/infection_monkey/monkey.py 0.00% <0.00%> (ø)
...sland/cc/repository/zero_trust/IEventRepository.py 0.00% <0.00%> (ø)
monkey/monkey_island/cc/server_setup.py 0.00% <0.00%> (ø)
... and 30 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@VakarisZ VakarisZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename monkey/common/events to monkey/common/agent_events?

@VakarisZ
Copy link
Contributor

monkey/infection_monkey/agent_event_forwarder.py:87
logger.debug(f"Sending agent events to Island at {self._server_address}: {events}")

@VakarisZ
Copy link
Contributor

Maybe the resource should also be called AgentEvents, since it's the only thing it accepts? Alternativelly, maybe it can have /api/events/<string:type> url?

@VakarisZ
Copy link
Contributor

monkey/monkey_island/cc/repository/i_event_repository.py should be called i_agent_event_repository.py?

@mssalvatore
Copy link
Collaborator

I agree with @VakarisZ . That being said, the issue was fairly tightly scoped. I'd say fix as many of those things as you can in 30 minutes and create a new issue for the rest.

…er in test_pydantic_agent_event_serializer.py
…ry in test_agent_event_serializer_registry.py
from monkey_island.cc.repository.i_log_repository import ILogRepository
from monkey_island.cc.repository.i_machine_repository import IMachineRepository
from monkey_island.cc.repository.i_report_repository import IReportRepository
from monkey_island.cc.repository.i_simulation_repository import ISimulationRepository
from monkey_island.cc.repository.ICredentials import ICredentialsRepository
from monkey_island.cc.repository.zero_trust.IEventRepository import IEventRepository
from monkey_island.cc.repository.zero_trust.IAgentEventRepository import IAgentEventRepository
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy-noises

@mssalvatore mssalvatore merged commit 4e1ca65 into develop Sep 16, 2022
@mssalvatore mssalvatore deleted the 2293-rename-event-serializers branch September 16, 2022 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename EventSerializers to AgentEventSerializers
3 participants