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

Add Linux locate plugin #505

Merged
merged 26 commits into from
Feb 19, 2024
Merged

Conversation

JSCU-CNI
Copy link
Contributor

This PR adds support for locate, mlocate and plocate artifacts on Linux targets.

@Horofic
Copy link
Contributor

Horofic commented Jan 16, 2024

@JSCU-CNI Thats quite some cool new parsers, thanks! We will try and schedule a review for this PR as soon as possible.

@Horofic Horofic self-requested a review February 1, 2024 08:25
@Horofic Horofic self-assigned this Feb 1, 2024
JSCU-CNI and others added 2 commits February 5, 2024 17:18
Co-authored-by: Stefan de Reuver <9864602+Horofic@users.noreply.github.com>
@Horofic Horofic self-requested a review February 6, 2024 13:04
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (b5a01cd) 73.79% compared to head (976c4b3) 73.93%.

Files Patch % Lines
dissect/target/plugins/os/unix/locate/plocate.py 85.71% 11 Missing ⚠️
dissect/target/plugins/os/unix/locate/gnulocate.py 95.34% 2 Missing ⚠️
dissect/target/plugins/os/unix/locate/mlocate.py 98.21% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #505      +/-   ##
==========================================
+ Coverage   73.79%   73.93%   +0.13%     
==========================================
  Files         279      283       +4     
  Lines       23272    23453     +181     
==========================================
+ Hits        17174    17339     +165     
- Misses       6098     6114      +16     
Flag Coverage Δ
unittests 73.93% <92.26%> (+0.13%) ⬆️

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.

@JSCU-CNI
Copy link
Contributor Author

JSCU-CNI commented Feb 7, 2024

@Horofic it seems that your changes broke the tests. Could you fix them?

@Horofic
Copy link
Contributor

Horofic commented Feb 8, 2024

Im aware the tests on pypy3.9 still fail. Not sure why this happens, but it's unrelated to the previous tests failing. Will commit a fix for this as well.

@JSCU-CNI
Copy link
Contributor Author

JSCU-CNI commented Feb 8, 2024

Thanks for your effort @Horofic. On a side note, are you planning on running tests against pypy3.10 sometime in the future?

@Horofic
Copy link
Contributor

Horofic commented Feb 12, 2024

Thanks for your effort @Horofic. On a side note, are you planning on running tests against pypy3.10 sometime in the future?

Yes we are! I am currently in the process of adding tests for pypy3.10 to our pipeline(s).

@Horofic
Copy link
Contributor

Horofic commented Feb 14, 2024

I did some digging into this bug, but was unable to figure out what exactly goes wrong in pypy3.9. After some testing, it seems that pypy3.10 works correctly. So, in the light of moving towards pypy3.10 I will try and add some safeguard to the plocate parsing helper, untill we are fully moved.

Ill create a seperate PR where I move the *locate.py helper files into their respective plugin. As is done in #507 as well.

@Schamper
Copy link
Member

We seem to have found somewhat of a workaround for PyPy 3.9. I ain't pretty, but at least it works 😄

@Horofic Horofic merged commit c33fcd8 into fox-it:main Feb 19, 2024
16 checks passed
Poeloe pushed a commit that referenced this pull request Feb 29, 2024
Co-authored-by: Stefan de Reuver <9864602+Horofic@users.noreply.github.com>
Co-authored-by: Schamper <1254028+Schamper@users.noreply.github.com>
Zawadidone pushed a commit to Zawadidone/dissect.target that referenced this pull request Apr 5, 2024
Co-authored-by: Stefan de Reuver <9864602+Horofic@users.noreply.github.com>
Co-authored-by: Schamper <1254028+Schamper@users.noreply.github.com>
@JSCU-CNI JSCU-CNI deleted the feature/add-linux-locate-plugin branch August 1, 2024 11:12
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.

3 participants