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

Fix a regression bug inside windows network_manager #936

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

Miauwkeru
Copy link
Contributor

@Miauwkeru Miauwkeru commented Nov 6, 2024

Found a regression inside #870 in the case a registry key doesn't exist or is empty.
I made a small fix for it here, however I also noticed the types aren't correct either. Will save that for another moment

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.03%. Comparing base (a75083f) to head (7ea5eca).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dissect/target/plugins/os/windows/network.py 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #936      +/-   ##
==========================================
- Coverage   77.03%   77.03%   -0.01%     
==========================================
  Files         322      322              
  Lines       27603    27604       +1     
==========================================
  Hits        21265    21265              
- Misses       6338     6339       +1     
Flag Coverage Δ
unittests 77.03% <40.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Miauwkeru Miauwkeru marked this pull request as ready for review November 12, 2024 11:48
Copy link
Contributor

@twiggler twiggler left a comment

Choose a reason for hiding this comment

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

The fix looks ok.
Since it is nice to get this before the next release I approve it.

Can you create a ticket to:

  • add/adjust the unit test for when extract_network_device_config returns nothing
  • Make the return type of _extract_network_device_config more meaningful, for example by adding data classes
  • Improve the readability of the _interfaces method of WindowsNetworkPlugin

@Miauwkeru Miauwkeru merged commit a899df6 into main Nov 12, 2024
16 of 20 checks passed
@Miauwkeru Miauwkeru deleted the small-fix-windows-network branch November 12, 2024 15:06
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