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 find files panic for FS connections. #4258

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Conversation

preslavgerchev
Copy link
Contributor

If files do not exist, we return nil from the handleFsError which means the WalkDir doesn't skip over that specific file. This lead to panics when running files.find query against an FS connection, e.g. files.find(from: "/etc/audit/rules.d",regex:'.*\.rules$' , type: "file")

Copy link
Contributor

github-actions bot commented Jun 18, 2024

Test Results

3 071 tests  ±0   3 070 ✅ ±0   1m 25s ⏱️ -1s
  362 suites ±0       1 💤 ±0 
   27 files   ±0       0 ❌ ±0 

Results for commit 84e41a9. ± Comparison against base commit cd82178.

♻️ This comment has been updated with latest results.

Signed-off-by: Preslav <preslav@mondoo.com>
@preslavgerchev preslavgerchev merged commit 1a4e816 into main Jun 18, 2024
15 checks passed
@preslavgerchev preslavgerchev deleted the preslav/fix-panic branch June 18, 2024 14:41
@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants