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

Bootlaoder reliability #600

Merged
merged 1 commit into from
Apr 3, 2020

Conversation

VakarisZ
Copy link
Contributor

@VakarisZ VakarisZ commented Apr 2, 2020

Pyinstaller seems to launch bootloader two times. The second launch seems to error on command launching function/functions and thus gives less information about the machine.
Changes code to only store the first bootloader telem instead of overriding it with the incomplete second one.

@VakarisZ VakarisZ requested a review from ShayNehmad April 2, 2020 16:09
@codecov
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #600 into develop will increase coverage by 0.10%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #600      +/-   ##
===========================================
+ Coverage    56.72%   56.83%   +0.10%     
===========================================
  Files          112      115       +3     
  Lines         3820     3869      +49     
===========================================
+ Hits          2167     2199      +32     
- Misses        1653     1670      +17     
Impacted Files Coverage Δ
monkey/monkey_island/cc/services/bootloader.py 47.16% <0.00%> (ø)
...and/cc/services/attack/test_mitre_api_interface.py 100.00% <0.00%> (ø)
...onkey/monkey_island/cc/services/attack/__init__.py 100.00% <0.00%> (ø)
...y_island/cc/services/attack/mitre_api_interface.py 54.05% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bee46c0...cba2f23. Read the comment docs.

@@ -17,7 +17,7 @@ def parse_bootloader_telem(telem: Dict) -> bool:
telem['os_version'] = "Unknown OS"

telem_id = BootloaderService.get_mongo_id_for_bootloader_telem(telem)
mongo.db.bootloader_telems.update({'_id': telem_id}, telem, upsert=True)
mongo.db.bootloader_telems.update({'_id': telem_id}, {'$setOnInsert': telem}, upsert=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about logging if something already exists?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Log would be redundant, because we expect this to happen 100% of the time

Copy link
Contributor

@ShayNehmad ShayNehmad left a comment

Choose a reason for hiding this comment

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

Approved, but see my comment

@VakarisZ VakarisZ merged commit bf6a838 into guardicore:develop Apr 3, 2020
@VakarisZ VakarisZ deleted the linux_bootloader_hotfix branch October 15, 2020 08:29
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.

2 participants