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

Milestone/4.0.1 #251

Merged
merged 60 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
8dbf57c
Added basic support for vectorscan
akenion Feb 16, 2024
5c8ccf9
Made adjustments to pass flake8 validation
akenion Feb 16, 2024
6247459
Implemented caching for compiled vectorscan signatures
akenion Mar 11, 2024
173e16b
Updated vectorscan implementation to use streaming mode instead of bl…
akenion Mar 22, 2024
db62725
Added profiling support for malware scans
akenion Mar 27, 2024
63352ac
Improved signal handling when compiling vectorscan signatures
akenion Apr 2, 2024
c68f9e8
Made main.py executable
akenion Apr 2, 2024
0665b00
Added option to output profile results to file
akenion Apr 2, 2024
a4579a4
Fixed vectorscan availability output
akenion Apr 2, 2024
f7b87ea
Added lazy option to vectorscan match engine
akenion Apr 2, 2024
15f7e4c
Fixed additional issue where input queue can fill up and cause scans …
akenion Apr 2, 2024
f4b7227
Adjusted profiling options for malware scan command
akenion Apr 2, 2024
4567977
Corrected order of profile results in debug output
akenion Apr 3, 2024
ed25217
Added support for using direct IO to read files when scanning for mal…
akenion Apr 4, 2024
fef75bb
Changed profile output to use INFO log level instead of DEBUG
akenion Apr 5, 2024
62f724e
Fixed arithmetic error in calculating read offset for direct IO
akenion Apr 5, 2024
2699438
Added option to use custom path for precompiled pattern database
akenion Apr 12, 2024
e02c848
Fixed issue with pattern database compilation
akenion Apr 12, 2024
4aabdf7
Added support for downloading pre-compiled signatures
akenion Apr 29, 2024
6cf44b6
Skipped pre-compiled signature check when explicitly compiling signat…
akenion Apr 29, 2024
d46352d
Fixed issues with pre-compiled signature support
akenion Apr 29, 2024
2e20a16
Continued work on pre-compiled pattern support
akenion Apr 30, 2024
bce59dd
Fixed handling of license assignment for nested signature set instances
akenion Apr 30, 2024
b972229
Added support for filtering signatures with pre-compiled databases
akenion Apr 30, 2024
a2f0b71
Improved handling of incompatible pre-compiled signature databases
akenion Apr 30, 2024
b0a805f
Removed unused imports
akenion Apr 30, 2024
5e1914a
Adjusted signature compilation options
akenion Apr 30, 2024
fc1357c
Updated version to 4.0.1rc1
akenion Apr 30, 2024
218ff55
Made overwriting of external pattern database atomic
akenion May 2, 2024
54c6f9e
Fixed platform detection on ARM and corrected vectorscan parameter types
akenion May 7, 2024
68727c6
Added detection for scan workers that terminate abnormally
akenion May 7, 2024
0a6aa1d
Allowed processing to continue after skipping failed files
akenion May 7, 2024
b897889
Added libhyperscan5 recommendation to Debian package control file
akenion May 8, 2024
2cadd94
Fixed issue where vectorscan matcher was yielding inconsistent results
akenion May 8, 2024
28a8cf6
Merge branch 'gh-236' into milestone/4.0.1
akenion May 8, 2024
433ad87
Made exit code handling consistent between directly invoking wordfenc…
akenion May 8, 2024
e1b023e
Updated version to 4.0.1rc2
akenion May 8, 2024
c8cd1b2
Added documentation for Vectorscan integration.
barmat May 8, 2024
e53e176
Merge branch 'milestone/4.0.1' of github.com:wordfence/wordfence-cli …
barmat May 8, 2024
5ee4782
Copy updates for vectorscan docs.
barmat May 9, 2024
2711dff
Added installation instructions for Vectorscan/Hyperscan.
barmat May 9, 2024
56213ef
Create temp files in same directory as destinations to ensure they ar…
akenion May 10, 2024
d3a6f8f
Merge branch 'gh-236' into milestone/4.0.1
akenion May 10, 2024
1338973
Updated version to 4.0.1rc3
akenion May 10, 2024
976aafb
Corrected variable name
akenion May 10, 2024
2157cc8
Merge branch 'gh-236' into milestone/4.0.1
akenion May 10, 2024
fbfa5f6
Updated version to 4.0.1rc4
akenion May 10, 2024
d5b61c8
Added initial vectorscan benchmarks
akenion May 10, 2024
e5f0c23
Refactored vectorscan benchmark section
akenion May 10, 2024
24252ae
Added missing column to row in vectorscan benchmarks table
akenion May 10, 2024
7c3ad71
Added worker count to benchmarks
akenion May 10, 2024
51ead73
Fixed benchmarks table
akenion May 10, 2024
effea2d
Added additional benchmark data
akenion May 10, 2024
5f8b0a1
Updated vectorscan pre-compilation to respect umask when writing data…
akenion May 15, 2024
db7376a
Merge branch 'gh-236' into milestone/4.0.1
akenion May 15, 2024
8f9bad9
Updated version to 4.0.1rc5
akenion May 15, 2024
cc91005
Adjusted logging around signature database pre-compilation
akenion May 15, 2024
996aa1d
Merge branch 'gh-236' into milestone/4.0.1
akenion May 15, 2024
f372a70
Updated version to 4.0.1rc6
akenion May 15, 2024
0a76a06
Updated version to 4.0.1
akenion May 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed issue where vectorscan matcher was yielding inconsistent results
  • Loading branch information
akenion committed May 8, 2024
commit 2cadd9401deb8e1fc72ab7f353884898247823e5
3 changes: 3 additions & 0 deletions wordfence/scanning/matching/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def process_chunk(
):
raise NotImplementedError()

def finalize_content(self) -> None:
pass

def _record_match(self, identifier: str, matched: str) -> None:
self.matches[identifier] = matched

Expand Down
5 changes: 4 additions & 1 deletion wordfence/scanning/matching/vectorscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ def process_chunk(
return True
return self.matched

def finalize_content(self) -> None:
self.matcher.scanner.reset()

def __enter__(self):
self.matcher.scanner.set_callback(self._match_callback)
return super().__enter__()

def __exit__(self, exc_type, exc_value, traceback) -> None:
self.matcher.scanner.reset()
pass


class VectorscanCompiler(Compiler):
Expand Down
1 change: 1 addition & 0 deletions wordfence/scanning/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ def _process_file(self, path: str, workspace: Optional[MatchWorkspace]):
break
finally:
self._put_profile_event(match_timer)
context.finalize_content()
self._put_event(
ScanEventType.FILE_PROCESSED,
{
Expand Down
1 change: 1 addition & 0 deletions wordfence/util/vectorscan/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ def _close_stream(self) -> None:
c_void_p()
)
_assert_success(error)
self._stream = None

def scan(
self,
Expand Down
Loading