Conversation
295 passed in 4.82s
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.
Firefox download states (test_firefox_downloads.py)
Firefox's DOWNLOAD_STATE dict has 10 entries (0–9) plus an UNKNOWN fallback. Only FINISHED (1) and CANCELLED (3) were tested. Added tests for all remaining states: DOWNLOADING, FAILED, PAUSED, QUEUED, BLOCKED_PARENTAL, SCANNING, DIRTY, BLOCKED_POLICY, UNKNOWN, and the case where the state key is absent from metadata entirely.
Chrome download states (test_chrome_downloads.py)
IN_PROGRESS (0), INTERRUPTED (3 and 4 alias), and the UNKNOWN fallback were untested.
_fileuri_to_path (test_firefox_downloads.py)
Firefox download states (test_firefox_downloads.py) Firefox's DOWNLOAD_STATE dict has 10 entriesck. Only FINISHED (1) and CANCELLED (3) weretested. Added tests for all remaining states: DOWNLOADING, FAILED, PAUSED, QUEUED, BLOCKED_PARENTAL, SCANNING, DIRTY, BLOCKED_POLICY, UNKNOWN, and the case where the state key is absent from metadata entirely.
Chrome download states (test_chrome_downloads.py)
IN_PROGRESS (0), INTERRUPTED (3 and 4 alias), and the UNKNOWN fallback were untested.
_fileuri_to_path (test_firefox_downloads.py)
The Windows-path branch (/C:/... → C:/...) had no test coverage at all. This is a forensically significant code path — Chrome on Windows stores file:///C:/... URIse would break filename extraction andanomaly detection on Windows artifacts. Added direct unit tests for the POSIX case, Windows drive-letter stripping, and percent-encoded paths.
_extract_query (test_base.py)
The function was only exercised indirectly through Chrome and Firefox search integration tests. Added direct unit tests covering all 9 search engines, empty/whitespace-only query params, malformed URLs, and the multiple-values-for-same-param edge case.
CLI error paths (test_main.py)
Wildcard domain matching (test_anomaly.py)
Added a test confirming that xonion does not match the IOC pattern *.onion (the endswith(".onion") check correctly requires the dot boundary).