-
Notifications
You must be signed in to change notification settings - Fork 21
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
Major Refactor #8
base: master
Are you sure you want to change the base?
Conversation
(cherry picked from commit b404cdd)
(cherry picked from commit c8b5451)
assure flags package doesn't fire off twice during testing test the unit tests actual PID and marshal it to JSON, then CSV, verify parity of the marshaller functions
- pass down any errors we receive during `IsElf` and checksum operations - add test case for errors passed down - clean up repetitive code (cherry picked from commit 71d4fb5) Signed-off-by: [email protected] <[email protected]>
this last commit to this branch, 5e13d28, addresses a rather troublesome scenario that I actually encountered in the wild on my own machine while testing. Previously, if there was an error that occurred during much of the file operations, it would be silently dropped1. In my case, I use a container named Conty. Even as root, if you try and read bytes from applications running in the container, it is not unexpected to receive a permission denied error. While in my case, this was expected behavior, this is also behavior that has been observed as a result of (arguably low caliber) Linux malware evasion techniques. Before this last commit, these errors were silently ignored. Old behavior (current behavior in sandflysecurity/sandfly-entropyscan):sandfly-entropyscan/sandfly-entropyscan.go Lines 120 to 129 in 874da67
Footnotes |
(cherry picked from commit 90e7bb5) Signed-off-by: [email protected] <[email protected]>
I know this PR is a lot. If requested I will happily cherry-pick parts of it, and even make individual issues/PRs if desired. |
Code Refactoring and Enhancements
Refactor of CSV Handling:
Modularization and Code Cleanup:
sandfly-entropyscan.go
for better readability and maintainability./proc
filesBuild System:
build.sh
in favor ofMakefile
for a more standardized build process..gitignore
to exclude build artifacts and IDE files.Improved Reporting:
New Features
JSON Output:
Checksum Toggle:
Concurrency:
Workflows and Tests
Added Unit Tests:
GitHub Actions:
.github/workflows/go.yml
) for automated testing on push and pull requests..github/workflows/release.yml
) for automated releases.