Skip to content

Conversation

VakarisZ
Copy link
Contributor

What does this PR do?

Fixes #2267

Scan telemetry got deprecated by scan events

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:

    Tested by running the agent manually, checking the map and reports

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

return [NodeService.monkey_to_net_node(x) for x in mongo.db.monkey.find({})]
return legacy_agents + legacy_nodes + monkey_island

def _get_monkey_net_nodes(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing scan telemetries broke the map, because the OS version relied on it. I think a good way of refactoring map are these steps:

  1. Gradually replace the data gathered for display nodes/edges from legacy documents with the data gathered from events.
  2. Once all data for map display relies only on events, migrate the logic to the front end.

This gives us 2 advantages over just breaking the map and fixing it in one issue: 1. develop is always in a working state 2. When we migrate the logic to the front end the scope of it is clear (we just need to re-write python to javascript)

Copy link
Collaborator

Choose a reason for hiding this comment

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

We're rewriting the map this week anyway.

Copy link
Contributor

@ilija-lazoroski ilija-lazoroski left a comment

Choose a reason for hiding this comment

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

Unit tests are failing.

@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Base: 61.10% // Head: 61.12% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (ec2031b) compared to base (f077954).
Patch coverage: 34.04% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2428      +/-   ##
===========================================
+ Coverage    61.10%   61.12%   +0.02%     
===========================================
  Files          559      556       -3     
  Lines        14844    14733     -111     
===========================================
- Hits          9070     9006      -64     
+ Misses        5774     5727      -47     
Impacted Files Coverage Δ
monkey/common/common_consts/telem_categories.py 100.00% <ø> (ø)
monkey/infection_monkey/master/propagator.py 98.98% <ø> (-0.02%) ⬇️
monkey/infection_monkey/model/host.py 83.33% <ø> (-0.88%) ⬇️
...onkey/monkey_island/cc/resources/telemetry_feed.py 46.15% <0.00%> (-2.24%) ⬇️
monkey/monkey_island/cc/services/edge/edge.py 71.42% <ø> (+7.04%) ⬆️
...and/cc/services/telemetry/processing/processing.py 57.89% <ø> (-2.11%) ⬇️
...onkey/monkey_island/cc/services/netmap/net_node.py 33.33% <29.16%> (-9.53%) ⬇️
monkey/monkey_island/cc/services/netmap/utils.py 30.00% <30.00%> (ø)
monkey/monkey_island/cc/resources/node.py 55.55% <42.85%> (-8.74%) ⬇️
monkey/monkey_island/cc/resources/netmap.py 69.23% <50.00%> (-0.77%) ⬇️
... and 2 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.

@mssalvatore mssalvatore merged commit aa5cf55 into develop Oct 13, 2022
@VakarisZ VakarisZ deleted the 2267-remove-scan-telem branch October 13, 2022 14:40
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.

Create and handle TCP scan events
3 participants