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

Improve compatibility checks on various plugins #1008

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

JSCU-CNI
Copy link
Contributor

No description provided.

@Schamper
Copy link
Member

Can you sneak this in too? I've had this pending locally for a while but didn't get around to making a PR for it:

diff --git a/dissect/target/plugins/filesystem/walkfs.py b/dissect/target/plugins/filesystem/walkfs.py
index 9e2a989f..5404b5d1 100644
--- a/dissect/target/plugins/filesystem/walkfs.py
+++ b/dissect/target/plugins/filesystem/walkfs.py
@@ -37,6 +37,10 @@ class WalkFSPlugin(Plugin):
     @arg("--walkfs-path", default="/", help="path to recursively walk")
     def walkfs(self, walkfs_path: str = "/") -> Iterator[FilesystemRecord]:
         """Walk a target's filesystem and return all filesystem entries."""
+        if not self.target.fs.exists(walkfs_path):
+            self.target.log.warning("Path does not exist: %s", walkfs_path)
+            return
+
         for entry in self.target.fs.recurse(walkfs_path):
             try:
                 yield generate_record(self.target, entry)

@JSCU-CNI
Copy link
Contributor Author

Applied the changes from #973 for walkfs in 5036178.

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 77.91%. Comparing base (ca216f4) to head (092c118).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dissect/target/plugins/filesystem/walkfs.py 42.85% 4 Missing ⚠️
dissect/target/plugins/filesystem/ntfs/usnjrnl.py 33.33% 2 Missing ⚠️
dissect/target/plugins/general/osinfo.py 33.33% 2 Missing ⚠️
dissect/target/plugins/os/windows/env.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1008      +/-   ##
==========================================
- Coverage   77.93%   77.91%   -0.02%     
==========================================
  Files         327      327              
  Lines       28677    28689      +12     
==========================================
+ Hits        22349    22354       +5     
- Misses       6328     6335       +7     
Flag Coverage Δ
unittests 77.91% <50.00%> (-0.02%) ⬇️

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.

@Schamper Schamper merged commit 027629f into fox-it:main Jan 30, 2025
16 of 20 checks passed
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