Repository navigation
Conversation
Collaborator
|
Thanks @Adnan9-63 , let us check it |
…ratosphereips#1593) Signed-off-by: Adnan9-63 <muhammad1414114@gmail.com>
Adnan9-63
force-pushed
the
fix-zeek-dir-validation
branch
from
November 4, 2026 12:43
93d32ad to
7be96e5
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Issue
Closes #1593
Changes proposed
get_input_file_type()inslips/main.pyto rigorously validate Zeek directories. It now checks every item in the folder and cleanly throws an error if it encounters subdirectories, empty directories, or invalid files (not ending in.logor.log.labeled), preventingIsADirectoryErrorcrashes.tests/unit/slips/test_main.py(test_get_input_file_type_zeek_folder) covering valid, empty, subdirectory, and invalid file scenarios.Steps I followed to test the changes proposed in this PR:
python3 -m pytest tests/unit/slips/test_main.pydirectly, passing all assertions for the validation logic.Check List
Note to reviewers
Fixes #1593.
ZeekDirInputpreviously threw anIsADirectoryErrorifos.listdir()[0]was a subdirectory. This PR strictly enforces that the-fdirectory contains exclusively valid zeek log files, cleanly printing an error otherwise.